25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
feat(grid): option to open cell details in dialog
lxk9554b48809c8463
diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vueindex 300c792bf5..d94a049b5d 100644--- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue+++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue@@ -755,6 +755,7 @@ const editDefaultAutoKeepResults = ref(settingsStore.editorSettings.defaultAutoKconst editMultiStatementDefaultView = ref<MultiStatementDefaultView>(settingsStore.editorSettings.multiStatementDefaultView);const editDataGridAutoTransposeSingleRow = ref(settingsStore.editorSettings.dataGridAutoTransposeSingleRow);const editDataGridCellDetailButtonVisible = ref(settingsStore.editorSettings.dataGridCellDetailButtonVisible);+const editDataGridCellDetailDialogDefault = ref(settingsStore.editorSettings.dataGridCellDetailDialogDefault);const editDataGridCrosshairHighlight = ref(settingsStore.editorSettings.dataGridCrosshairHighlight);const editDataGridStripedRows = ref(settingsStore.editorSettings.dataGridStripedRows);const editPageSize = ref(settingsStore.editorSettings.pageSize);@@ -1113,6 +1114,7 @@ function currentEditorSettingsDraft(): EditorSettingsDraft {multiStatementDefaultView: editMultiStatementDefaultView.value,dataGridAutoTransposeSingleRow: editDataGridAutoTransposeSingleRow.value,dataGridCellDetailButtonVisible: editDataGridCellDetailButtonVisible.value,+ dataGridCellDetailDialogDefault: editDataGridCellDetailDialogDefault.value,dataGridCrosshairHighlight: editDataGridCrosshairHighlight.value,dataGridStripedRows: editDataGridStripedRows.value,flatteningMultiLineText: editFlatteningMultiLineText.value,@@ -1786,6 +1788,7 @@ function syncEditorSettingsDraftFromStore() {editMultiStatementDefaultView.value = settingsStore.editorSettings.multiStatementDefaultView;editDataGridAutoTransposeSingleRow.value = settingsStore.editorSettings.dataGridAutoTransposeSingleRow;editDataGridCellDetailButtonVisible.value = settingsStore.editorSettings.dataGridCellDetailButtonVisible;+ editDataGridCellDetailDialogDefault.value = settingsStore.editorSettings.dataGridCellDetailDialogDefault;editDataGridCrosshairHighlight.value = settingsStore.editorSettings.dataGridCrosshairHighlight;editDataGridStripedRows.value = settingsStore.editorSettings.dataGridStripedRows;editFlatteningMultiLineText.value = settingsStore.editorSettings.flatteningMultiLineText;@@ -1934,6 +1937,7 @@ const editorSettingsDraftRefs: EditorSettingsDraftRefMap = {multiStatementDefaultView: editMultiStatementDefaultView,dataGridAutoTransposeSingleRow: editDataGridAutoTransposeSingleRow,dataGridCellDetailButtonVisible: editDataGridCellDetailButtonVisible,+ dataGridCellDetailDialogDefault: editDataGridCellDetailDialogDefault,dataGridCrosshairHighlight: editDataGridCrosshairHighlight,dataGridStripedRows: editDataGridStripedRows,pageSize: editPageSize,@@ -2518,6 +2522,7 @@ function resetDefaultsForTab(tab: SettingsCategory) {editMultiStatementDefaultView.value = DEFAULT_EDITOR_SETTINGS.multiStatementDefaultView;editDataGridAutoTransposeSingleRow.value = DEFAULT_EDITOR_SETTINGS.dataGridAutoTransposeSingleRow;editDataGridCellDetailButtonVisible.value = DEFAULT_EDITOR_SETTINGS.dataGridCellDetailButtonVisible;+ editDataGridCellDetailDialogDefault.value = DEFAULT_EDITOR_SETTINGS.dataGridCellDetailDialogDefault;editDataGridCrosshairHighlight.value = DEFAULT_EDITOR_SETTINGS.dataGridCrosshairHighlight;editDataGridStripedRows.value = DEFAULT_EDITOR_SETTINGS.dataGridStripedRows;editFlatteningMultiLineText.value = DEFAULT_EDITOR_SETTINGS.flatteningMultiLineText;@@ -2634,6 +2639,7 @@ function resetAllDefaults() {editMultiStatementDefaultView.value = DEFAULT_EDITOR_SETTINGS.multiStatementDefaultView;editDataGridAutoTransposeSingleRow.value = DEFAULT_EDITOR_SETTINGS.dataGridAutoTransposeSingleRow;editDataGridCellDetailButtonVisible.value = DEFAULT_EDITOR_SETTINGS.dataGridCellDetailButtonVisible;+ editDataGridCellDetailDialogDefault.value = DEFAULT_EDITOR_SETTINGS.dataGridCellDetailDialogDefault;editDataGridCrosshairHighlight.value = DEFAULT_EDITOR_SETTINGS.dataGridCrosshairHighlight;editDataGridStripedRows.value = DEFAULT_EDITOR_SETTINGS.dataGridStripedRows;editFlatteningMultiLineText.value = DEFAULT_EDITOR_SETTINGS.flatteningMultiLineText;@@ -8735,6 +8741,17 @@ onUnmounted(() => {</div><Switch id="data-grid-cell-detail-button-visible" v-model="editDataGridCellDetailButtonVisible" /></div>+ <div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2">+ <div class="space-y-1">+ <Label for="data-grid-cell-detail-dialog-default">+ {{ t("settings.dataGridCellDetailDialogDefault") }}+ </Label>+ <p class="text-xs text-muted-foreground">+ {{ t("settings.dataGridCellDetailDialogDefaultDescription") }}+ </p>+ </div>+ <Switch id="data-grid-cell-detail-dialog-default" v-model="editDataGridCellDetailDialogDefault" />+ </div><div class="settings-item flex items-center justify-between gap-4 rounded-md border bg-muted/20 px-3 py-2"><div class="space-y-1"><Label for="data-grid-crosshair-highlight">diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vueindex 58ff6fb459..de23a841fd 100644--- a/apps/desktop/src/components/grid/DataGrid.vue+++ b/apps/desktop/src/components/grid/DataGrid.vue@@ -434,6 +434,7 @@ const connectionStore = useConnectionStore();const queryStore = useQueryStore();const settingsStore = useSettingsStore();const cellDetailButtonEnabled = computed(() => settingsStore.editorSettings.dataGridCellDetailButtonVisible);+const cellDetailDialogDefault = computed(() => settingsStore.editorSettings.dataGridCellDetailDialogDefault);const dataGridCrosshairHighlight = computed(() => settingsStore.editorSettings.dataGridCrosshairHighlight);const tableFontSize = computed(() => settingsStore.editorSettings.tableFontSize);const rowNumberWidth = ref(DATA_GRID_ROW_NUM_WIDTH);@@ -8487,7 +8488,12 @@ function showCellDetailsForVisibleCell(rowIndex: number, visibleColIdx: number,clearRowSelection();invalidateContextMenuTarget();selectSingleCell(rowIndex, visibleColIdx);- showCellDetails(rowIndex, actualColIdx);+ if (cellDetailDialogDefault.value) {+ showCellDetail.value = false;+ openCellDetailDialog(rowIndex, actualColIdx);+ } else {+ showCellDetails(rowIndex, actualColIdx);+ }}function openCellDetailDialog(rowIndex: number, columnIndex: number) {@@ -8616,7 +8622,12 @@ function showTransposeCellDetails(rowIndex: number, actualColIdx: number) {invalidateContextMenuTarget();selectSingleCell(rowIndex, visibleColIdx);transposeRowIndex.value = rowIndex;- showCellDetails(rowIndex, actualColIdx);+ if (cellDetailDialogDefault.value) {+ showCellDetail.value = false;+ openCellDetailDialog(rowIndex, actualColIdx);+ } else {+ showCellDetails(rowIndex, actualColIdx);+ }gridRef.value?.focus({ preventScroll: true });}diff --git a/apps/desktop/src/components/grid/__tests__/DataGridCellDetailDialogDefault.spec.ts b/apps/desktop/src/components/grid/__tests__/DataGridCellDetailDialogDefault.spec.tsnew file mode 100644index 0000000000..1e7022491d--- /dev/null+++ b/apps/desktop/src/components/grid/__tests__/DataGridCellDetailDialogDefault.spec.ts@@ -0,0 +1,55 @@+import { readFileSync } from "node:fs";+import { resolve } from "node:path";+import { describe, expect, it } from "vitest";++const dataGridSource = readFileSync(resolve(import.meta.dirname, "../DataGrid.vue"), "utf8");+const editorSettingsDialogSource = readFileSync(resolve(import.meta.dirname, "../../editor/EditorSettingsDialog.vue"), "utf8");++describe("DataGrid cell detail dialog default preference (#2303)", () => {+ it("binds cellDetailDialogDefault to settingsStore.editorSettings.dataGridCellDetailDialogDefault", () => {+ expect(dataGridSource).toMatch(/const cellDetailDialogDefault = computed\(\(\) => settingsStore\.editorSettings\.dataGridCellDetailDialogDefault\);/);+ });++ it("opens cell detail dialog directly when cellDetailDialogDefault is enabled in showCellDetailsForVisibleCell", () => {+ expect(dataGridSource).toContain(+ "function showCellDetailsForVisibleCell(rowIndex: number, visibleColIdx: number, actualColIdx: number) {\n" ++ " clearRowSelection();\n" ++ " invalidateContextMenuTarget();\n" ++ " selectSingleCell(rowIndex, visibleColIdx);\n" ++ " if (cellDetailDialogDefault.value) {\n" ++ " showCellDetail.value = false;\n" ++ " openCellDetailDialog(rowIndex, actualColIdx);\n" ++ " } else {\n" ++ " showCellDetails(rowIndex, actualColIdx);\n" ++ " }\n" ++ "}",+ );+ });++ it("opens cell detail dialog directly when cellDetailDialogDefault is enabled in showTransposeCellDetails", () => {+ expect(dataGridSource).toContain(+ "function showTransposeCellDetails(rowIndex: number, actualColIdx: number) {\n" ++ " const visibleColIdx = visibleColumnIndexes.value.indexOf(actualColIdx);\n" ++ " if (visibleColIdx < 0) return;\n" ++ " clearRowSelection();\n" ++ " invalidateContextMenuTarget();\n" ++ " selectSingleCell(rowIndex, visibleColIdx);\n" ++ " transposeRowIndex.value = rowIndex;\n" ++ " if (cellDetailDialogDefault.value) {\n" ++ " showCellDetail.value = false;\n" ++ " openCellDetailDialog(rowIndex, actualColIdx);\n" ++ " } else {\n" ++ " showCellDetails(rowIndex, actualColIdx);\n" ++ " }\n" ++ " gridRef.value?.focus({ preventScroll: true });\n" ++ "}",+ );+ });++ it("renders the dataGridCellDetailDialogDefault switch in EditorSettingsDialog", () => {+ expect(editorSettingsDialogSource).toContain('id="data-grid-cell-detail-dialog-default"');+ expect(editorSettingsDialogSource).toContain('v-model="editDataGridCellDetailDialogDefault"');+ expect(editorSettingsDialogSource).toContain('t("settings.dataGridCellDetailDialogDefault")');+ expect(editorSettingsDialogSource).toContain('t("settings.dataGridCellDetailDialogDefaultDescription")');+ });+});diff --git a/apps/desktop/src/i18n/locales/az.ts b/apps/desktop/src/i18n/locales/az.tsindex 9f56dc2d9e..42195a56bb 100644--- a/apps/desktop/src/i18n/locales/az.ts+++ b/apps/desktop/src/i18n/locales/az.ts@@ -7282,6 +7282,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "Aktiv olduqda yalnız bir sətri və bir neçə sütunu olan SQL sorğu nəticələri avtomatik transpozisiya görünüşünə keçir.",dataGridCellDetailButtonVisible: "Xana təfərrüatları düyməsini göstər",dataGridCellDetailButtonVisibleDescription: "Kursor xananın üzərinə gətirildikdə xana təfərrüatları düyməsini göstər.",+ dataGridCellDetailDialogDefault: "Xana təfərrüatlarını standart olaraq dialoq pəncərəsində aç",+ dataGridCellDetailDialogDefaultDescription: "Xana təfərrüatları düyməsinə kliklədikdə yan və ya aşağı panel yerinə standart olaraq modal dialoq pəncərəsində açır.",dataGridCrosshairHighlight: "Sətir və sütunun çarpaz vurğulanması",dataGridCrosshairHighlightDescription: "Aktiv olduqda aktiv xananın bütün sətrini və sütununu yüngülcə vurğula (Excel-dəki kimi). Fokuslanmış xana seçilmiş üslubunu saxlayır.",infiniteScroll: "Sonsuz sürüşdürmə ilə yükləmə",diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.tsindex cc933aac67..740197aa65 100644--- a/apps/desktop/src/i18n/locales/en.ts+++ b/apps/desktop/src/i18n/locales/en.ts@@ -8159,6 +8159,8 @@ export default {dataGridAutoTransposeSingleRowDescription: "When enabled, SQL query results with exactly one row and multiple columns automatically switch to transpose view.",dataGridCellDetailButtonVisible: "Show cell detail button",dataGridCellDetailButtonVisibleDescription: "Show the cell detail button when hovering over a cell.",+ dataGridCellDetailDialogDefault: "Open cell details in dialog by default",+ dataGridCellDetailDialogDefaultDescription: "Open cell details in a modal dialog by default instead of the side or bottom panel.",dataGridCrosshairHighlight: "Crosshair row & column highlight",dataGridCrosshairHighlightDescription: "When enabled, lightly highlight the entire row and column of the active cell (like Excel). The focused cell keeps its selected style.",infiniteScroll: "Infinite scroll loading",diff --git a/apps/desktop/src/i18n/locales/es.ts b/apps/desktop/src/i18n/locales/es.tsindex 943c083ad2..1d5fa7bf4c 100644--- a/apps/desktop/src/i18n/locales/es.ts+++ b/apps/desktop/src/i18n/locales/es.ts@@ -7493,6 +7493,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "Al activarlo, los resultados de consultas SQL con exactamente una fila y varias columnas cambian automáticamente a la vista transpuesta.",dataGridCellDetailButtonVisible: "Mostrar botón de detalles de celda",dataGridCellDetailButtonVisibleDescription: "Mostrar el botón de detalles de celda al pasar el cursor sobre una celda.",+ dataGridCellDetailDialogDefault: "Abrir detalles de celda en diálogo por defecto",+ dataGridCellDetailDialogDefaultDescription: "Abre los detalles de celda en un diálogo modal por defecto en lugar del panel lateral o inferior.",dataGridCrosshairHighlight: "Resaltado de fila y columna en cruz",dataGridCrosshairHighlightDescription: "Cuando esté activado, resalta ligeramente toda la fila y la columna de la celda activa (como Excel). La celda enfocada conserva su estilo seleccionado.",infiniteScroll: "Carga de desplazamiento infinito",diff --git a/apps/desktop/src/i18n/locales/id.ts b/apps/desktop/src/i18n/locales/id.tsindex 6e30673ff9..74efd7e63f 100644--- a/apps/desktop/src/i18n/locales/id.ts+++ b/apps/desktop/src/i18n/locales/id.ts@@ -7952,6 +7952,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "Jika diaktifkan, hasil kueri SQL dengan tepat satu baris dan beberapa kolom akan otomatis beralih ke tampilan transpos.",dataGridCellDetailButtonVisible: "Tampilkan tombol detail sel",dataGridCellDetailButtonVisibleDescription: "Tampilkan tombol detail sel saat kursor diarahkan ke suatu sel.",+ dataGridCellDetailDialogDefault: "Buka detail sel dalam dialog secara default",+ dataGridCellDetailDialogDefaultDescription: "Buka detail sel dalam dialog modal secara default daripada di panel samping atau bawah.",dataGridCrosshairHighlight: "Sorot baris & kolom crosshair",dataGridCrosshairHighlightDescription: "Jika diaktifkan, sorot secara samar seluruh baris dan kolom dari sel aktif (seperti Excel). Sel yang difokuskan tetap mempertahankan gaya terpilihnya.",infiniteScroll: "Pemuatan gulir tak terbatas",diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.tsindex 724fb68157..295bee9391 100644--- a/apps/desktop/src/i18n/locales/it.ts+++ b/apps/desktop/src/i18n/locales/it.ts@@ -7271,6 +7271,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "Quando è attivata, i risultati delle query SQL con esattamente una riga e più colonne passano automaticamente alla vista trasposta.",dataGridCellDetailButtonVisible: "Mostra il pulsante dei dettagli della cella",dataGridCellDetailButtonVisibleDescription: "Mostra il pulsante dei dettagli della cella al passaggio del mouse su una cella.",+ dataGridCellDetailDialogDefault: "Apri dettagli cella in finestra di dialogo per impostazione predefinita",+ dataGridCellDetailDialogDefaultDescription: "Apre i dettagli della cella in una finestra di dialogo modale per impostazione predefinita anziché nel pannello laterale o inferiore.",dataGridCrosshairHighlight: "Evidenzia riga e colonna a croce",dataGridCrosshairHighlightDescription: "Se attivato, evidenzia leggermente l'intera riga e la colonna della cella attiva (come Excel). La cella focalizzata mantiene il suo stile selezionato.",infiniteScroll: "Caricamento a scorrimento infinito",diff --git a/apps/desktop/src/i18n/locales/ja.ts b/apps/desktop/src/i18n/locales/ja.tsindex 5c1f4beb81..ba4472c1df 100644--- a/apps/desktop/src/i18n/locales/ja.ts+++ b/apps/desktop/src/i18n/locales/ja.ts@@ -7298,6 +7298,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "有効にすると、1 行かつ複数列の SQL クエリ結果が自動的に転置表示に切り替わります。",dataGridCellDetailButtonVisible: "セル詳細ボタンを表示",dataGridCellDetailButtonVisibleDescription: "セルにカーソルを合わせたときにセル詳細ボタンを表示します。",+ dataGridCellDetailDialogDefault: "セル詳細をデフォルトでダイアログ表示",+ dataGridCellDetailDialogDefaultDescription: "セル詳細ボタンをクリックしたときに、サイドや下部パネルではなくモーダルダイアログで表示します。",dataGridCrosshairHighlight: "行と列の十字ハイライト",dataGridCrosshairHighlightDescription: "有効にすると、アクティブなセルの行と列全体を淡くハイライトします(Excel と同様)。フォーカスされたセルは選択スタイルを維持します。",tableColumnTemplateFields: "新規テーブルのプリセット列",diff --git a/apps/desktop/src/i18n/locales/ko.ts b/apps/desktop/src/i18n/locales/ko.tsindex e562b9c71d..52fbd930ae 100644--- a/apps/desktop/src/i18n/locales/ko.ts+++ b/apps/desktop/src/i18n/locales/ko.ts@@ -7075,6 +7075,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "활성화하면 정확히 한 행과 여러 열이 있는 SQL 쿼리 결과가 자동으로 전치 보기로 전환됩니다.",dataGridCellDetailButtonVisible: "셀 세부 정보 버튼 표시",dataGridCellDetailButtonVisibleDescription: "셀 위에 마우스를 올리면 셀 세부 정보 버튼을 표시합니다.",+ dataGridCellDetailDialogDefault: "셀 세부 정보를 기본적으로 대화상자로 표시",+ dataGridCellDetailDialogDefaultDescription: "셀 세부 정보 버튼을 클릭할 때 사이드 또는 하단 패널 대신 모달 대화상자로 표시합니다.",dataGridCrosshairHighlight: "행·열 십자 강조",dataGridCrosshairHighlightDescription: "활성화하면 활성 셀의 전체 행과 열을 연하게 강조합니다(Excel과 유사). 포커스 셀은 기존 선택 스타일을 유지합니다.",infiniteScroll: "무한 스크롤 로딩",diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.tsindex 8fdfda7e14..8fdca77d32 100644--- a/apps/desktop/src/i18n/locales/pt-BR.ts+++ b/apps/desktop/src/i18n/locales/pt-BR.ts@@ -7273,6 +7273,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "Quando ativado, os resultados de consultas SQL com exatamente uma linha e várias colunas alternam automaticamente para a visualização transposta.",dataGridCellDetailButtonVisible: "Mostrar botão de detalhes da célula",dataGridCellDetailButtonVisibleDescription: "Mostrar o botão de detalhes da célula ao passar o mouse sobre uma célula.",+ dataGridCellDetailDialogDefault: "Abrir detalhes da célula em diálogo por padrão",+ dataGridCellDetailDialogDefaultDescription: "Abre os detalhes da célula em uma caixa de diálogo modal por padrão, em vez do painel lateral ou inferior.",dataGridCrosshairHighlight: "Destacar linha e coluna em cruz",dataGridCrosshairHighlightDescription: "Quando ativado, destaca levemente toda a linha e a coluna da célula ativa (como no Excel). A célula focada mantém o estilo selecionado.",infiniteScroll: "Carregamento por rolagem infinita",diff --git a/apps/desktop/src/i18n/locales/ru.ts b/apps/desktop/src/i18n/locales/ru.tsindex a91dd021ae..dc318c28a5 100644--- a/apps/desktop/src/i18n/locales/ru.ts+++ b/apps/desktop/src/i18n/locales/ru.ts@@ -8477,6 +8477,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "Если включено, результаты SQL-запроса ровно с одной строкой и несколькими столбцами автоматически открываются в транспонированном виде.",dataGridCellDetailButtonVisible: "Показывать кнопку подробностей ячейки",dataGridCellDetailButtonVisibleDescription: "Показывать кнопку подробностей при наведении на ячейку.",+ dataGridCellDetailDialogDefault: "По умолчанию открывать сведения о ячейке в диалоговом окне",+ dataGridCellDetailDialogDefaultDescription: "Открывать сведения о ячейке в модальном окне по умолчанию вместо боковой или нижней панели.",dataGridCrosshairHighlight: "Подсветка строки и столбца перекрестием",dataGridCrosshairHighlightDescription: "Если включено, слегка подсвечиваются вся строка и столбец активной ячейки (как в Excel). Ячейка в фокусе сохраняет свой выделенный стиль.",infiniteScroll: "Бесконечная прокрутка с подгрузкой",diff --git a/apps/desktop/src/i18n/locales/tr.ts b/apps/desktop/src/i18n/locales/tr.tsindex 647ac0bcd0..be522f71a2 100644--- a/apps/desktop/src/i18n/locales/tr.ts+++ b/apps/desktop/src/i18n/locales/tr.ts@@ -7166,6 +7166,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "Etkinleştirildiğinde, tam olarak bir satır ve birden çok sütun içeren SQL sorgu sonuçları otomatik olarak devrik görünüme geçer.",dataGridCellDetailButtonVisible: "Hücre ayrıntısı düğmesini göster",dataGridCellDetailButtonVisibleDescription: "Bir hücrenin üzerine gelindiğinde hücre ayrıntısı düğmesini göster.",+ dataGridCellDetailDialogDefault: "Hücre ayrıntılarını varsayılan olarak iletişim kutusunda aç",+ dataGridCellDetailDialogDefaultDescription: "Hücre ayrıntıları düğmesine tıklandığında yan veya alt panel yerine varsayılan olarak bir modal iletişim kutusunda açar.",dataGridCrosshairHighlight: "Artı imleç satır ve sütun vurgusu",dataGridCrosshairHighlightDescription: "Etkinleştirildiğinde etkin hücrenin tüm satırı ve sütunu hafifçe vurgulanır (Excel gibi). Odaklanan hücre kendi seçili biçemini korur.",infiniteScroll: "Sonsuz kaydırmayla yükleme",diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.tsindex b008cd4065..c8ae293e04 100644--- a/apps/desktop/src/i18n/locales/zh-CN.ts+++ b/apps/desktop/src/i18n/locales/zh-CN.ts@@ -8145,6 +8145,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "开启后,SQL 查询结果只有一行且包含多列时,自动切换为转置视图。",dataGridCellDetailButtonVisible: "显示单元格详情按钮",dataGridCellDetailButtonVisibleDescription: "鼠标悬停在单元格上时显示单元格详情按钮。",+ dataGridCellDetailDialogDefault: "单元格详情默认弹窗展示",+ dataGridCellDetailDialogDefaultDescription: "点击单元格详情按钮时,默认使用弹窗展示而非侧边或下方分屏。",dataGridCrosshairHighlight: "行列十字高亮",dataGridCrosshairHighlightDescription: "开启后,以当前活动单元格为中心淡色高亮整行和整列(类似 Excel)。焦点单元格仍保留原有的选中样式。",infiniteScroll: "无限滚动加载",diff --git a/apps/desktop/src/i18n/locales/zh-TW.ts b/apps/desktop/src/i18n/locales/zh-TW.tsindex 24db140171..b422a113b7 100644--- a/apps/desktop/src/i18n/locales/zh-TW.ts+++ b/apps/desktop/src/i18n/locales/zh-TW.ts@@ -6621,6 +6621,8 @@ export default withEnglishFallback({dataGridAutoTransposeSingleRowDescription: "開啟後,SQL 查詢結果只有一行且包含多個欄位時,會自動切換為轉置檢視。",dataGridCellDetailButtonVisible: "顯示儲存格詳細資料按鈕",dataGridCellDetailButtonVisibleDescription: "游標懸停在儲存格上時顯示儲存格詳細資料按鈕。",+ dataGridCellDetailDialogDefault: "儲存格詳情預設彈窗展示",+ dataGridCellDetailDialogDefaultDescription: "點擊儲存格詳情按鈕時,預設使用彈窗展示而非側邊或下方分屏。",dataGridCrosshairHighlight: "行列十字高亮",dataGridCrosshairHighlightDescription: "開啟後,以目前活動儲存格為中心淡色高亮整列和整行(類似 Excel)。焦點儲存格仍保留原有選取樣式。",infiniteScroll: "無限滾動載入",diff --git a/apps/desktop/src/lib/settings/__tests__/editorSettingsDraft.spec.ts b/apps/desktop/src/lib/settings/__tests__/editorSettingsDraft.spec.tsindex 35b902bb3f..d1de1fd003 100644--- a/apps/desktop/src/lib/settings/__tests__/editorSettingsDraft.spec.ts+++ b/apps/desktop/src/lib/settings/__tests__/editorSettingsDraft.spec.ts@@ -143,6 +143,10 @@ describe("EDITOR_SETTINGS_DRAFT_KEYS", () => {expect(EDITOR_SETTINGS_DRAFT_KEYS).toContain("dataGridCellDetailButtonVisible");});+ it("includes dataGridCellDetailDialogDefault", () => {+ expect(EDITOR_SETTINGS_DRAFT_KEYS).toContain("dataGridCellDetailDialogDefault");+ });+it("includes completionTriggerMode", () => {expect(EDITOR_SETTINGS_DRAFT_KEYS).toContain("completionTriggerMode");});@@ -359,6 +363,15 @@ describe("editorSettingsPatchFromDraft", () => {expect(editorSettingsPatchFromDraft(visible, hidden)).toEqual({ dataGridCellDetailButtonVisible: true });});+ it("applies, cancels, and re-enables cell detail dialog default", () => {+ const enabled = editorSettingsDraftFromSettings(makeSettings({ dataGridCellDetailDialogDefault: true }));+ const disabled = editorSettingsDraftFromSettings(makeSettings({ dataGridCellDetailDialogDefault: false }));++ expect(editorSettingsPatchFromDraft(enabled, disabled)).toEqual({ dataGridCellDetailDialogDefault: true });+ expect(editorSettingsPatchFromDraft(enabled, enabled)).toEqual({});+ expect(editorSettingsPatchFromDraft(disabled, enabled)).toEqual({ dataGridCellDetailDialogDefault: false });+ });+it("includes the multi-statement default view when changed", () => {const result = editorSettingsDraftFromSettings(makeSettings({ multiStatementDefaultView: "result" }));const summary = editorSettingsDraftFromSettings(makeSettings({ multiStatementDefaultView: "summary" }));diff --git a/apps/desktop/src/lib/settings/editorSettingsDraft.ts b/apps/desktop/src/lib/settings/editorSettingsDraft.tsindex 26edc1756b..21e22ac3e5 100644--- a/apps/desktop/src/lib/settings/editorSettingsDraft.ts+++ b/apps/desktop/src/lib/settings/editorSettingsDraft.ts@@ -73,6 +73,7 @@ export const EDITOR_SETTINGS_DRAFT_KEYS = ["multiStatementDefaultView","dataGridAutoTransposeSingleRow","dataGridCellDetailButtonVisible",+ "dataGridCellDetailDialogDefault","dataGridCrosshairHighlight","dataGridStripedRows","pageSize",diff --git a/apps/desktop/src/lib/settings/settingsTransfer.ts b/apps/desktop/src/lib/settings/settingsTransfer.tsindex 5c0e842637..87603d46ec 100644--- a/apps/desktop/src/lib/settings/settingsTransfer.ts+++ b/apps/desktop/src/lib/settings/settingsTransfer.ts@@ -166,6 +166,7 @@ const SETTINGS_TRANSFER_CATEGORY_KEYS: Record<SettingsTransferCategoryId, readon"multiStatementDefaultView","dataGridAutoTransposeSingleRow","dataGridCellDetailButtonVisible",+ "dataGridCellDetailDialogDefault","dataGridCrosshairHighlight","dataGridStripedRows","flatteningMultiLineText",diff --git a/apps/desktop/src/stores/__tests__/settingsStore.spec.ts b/apps/desktop/src/stores/__tests__/settingsStore.spec.tsindex a12355f018..e494609984 100644--- a/apps/desktop/src/stores/__tests__/settingsStore.spec.ts+++ b/apps/desktop/src/stores/__tests__/settingsStore.spec.ts@@ -639,6 +639,16 @@ describe("normalizeEditorSettings", () => {}});+ it("defaults cell detail dialog default off and preserves only boolean values", () => {+ expect(normalizeEditorSettings({}).dataGridCellDetailDialogDefault).toBe(false);+ expect(normalizeEditorSettings({ dataGridCellDetailDialogDefault: true }).dataGridCellDetailDialogDefault).toBe(true);+ expect(normalizeEditorSettings({ dataGridCellDetailDialogDefault: false }).dataGridCellDetailDialogDefault).toBe(false);++ for (const invalidValue of [0, 1, "true", null]) {+ expect(normalizeEditorSettings({ dataGridCellDetailDialogDefault: invalidValue as never }).dataGridCellDetailDialogDefault).toBe(false);+ }+ });+it("defaults the crosshair highlight off and preserves only boolean values", () => {expect(normalizeEditorSettings({}).dataGridCrosshairHighlight).toBe(false);expect(normalizeEditorSettings({ dataGridCrosshairHighlight: true }).dataGridCrosshairHighlight).toBe(true);@@ -1473,6 +1483,28 @@ describe("settingsStore persisted settings initialization", () => {expect(restartedStore.editorSettings.dataGridCellDetailButtonVisible).toBe(true);});+ it("defaults cell detail dialog default to off, persists an opt-in, and reloads it", async () => {+ let persistedSettings: Record<string, unknown> = { dataGridCellDetailDialogDefault: true };+ const loadEditorSettings = vi.fn(async () => JSON.parse(JSON.stringify(persistedSettings)));+ const saveEditorSettings = vi.fn(async (settings: Record<string, unknown>) => {+ persistedSettings = JSON.parse(JSON.stringify(settings));+ });+ vi.doMock("@/lib/backend/api", () => ({ loadEditorSettings, saveEditorSettings }));++ const { useSettingsStore } = await import("@/stores/settingsStore");+ const store = useSettingsStore();+ await store.initEditorSettings();++ expect(store.editorSettings.dataGridCellDetailDialogDefault).toBe(true);+ await store.updateEditorSettingsAndPersist({ dataGridCellDetailDialogDefault: false });+ expect(saveEditorSettings).toHaveBeenLastCalledWith(expect.objectContaining({ dataGridCellDetailDialogDefault: false }));++ setActivePinia(createPinia());+ const restartedStore = useSettingsStore();+ await restartedStore.initEditorSettings();+ expect(restartedStore.editorSettings.dataGridCellDetailDialogDefault).toBe(false);+ });+it("defaults the crosshair highlight to off, persists an opt-in, and reloads it", async () => {let persistedSettings: Record<string, unknown> = {};const loadEditorSettings = vi.fn(async () => JSON.parse(JSON.stringify(persistedSettings)));diff --git a/apps/desktop/src/stores/settingsStore.ts b/apps/desktop/src/stores/settingsStore.tsindex 5ced829640..0d5e16fc16 100644--- a/apps/desktop/src/stores/settingsStore.ts+++ b/apps/desktop/src/stores/settingsStore.ts@@ -986,6 +986,7 @@ export interface EditorSettings {multiStatementDefaultView: MultiStatementDefaultView;dataGridAutoTransposeSingleRow: boolean;dataGridCellDetailButtonVisible: boolean;+ dataGridCellDetailDialogDefault: boolean;dataGridCrosshairHighlight: boolean;dataGridStripedRows: boolean;dataGridMultiRowTranspose: boolean;@@ -1285,6 +1286,7 @@ export const DEFAULT_EDITOR_SETTINGS: EditorSettings = {multiStatementDefaultView: "result",dataGridAutoTransposeSingleRow: false,dataGridCellDetailButtonVisible: true,+ dataGridCellDetailDialogDefault: false,dataGridCrosshairHighlight: false,dataGridStripedRows: true,dataGridMultiRowTranspose: false,@@ -1879,6 +1881,7 @@ export function normalizeEditorSettings(settings: Partial<EditorSettings>, existmultiStatementDefaultView: normalizeMultiStatementDefaultView(settings.multiStatementDefaultView),dataGridAutoTransposeSingleRow: settings.dataGridAutoTransposeSingleRow === true,dataGridCellDetailButtonVisible: typeof settings.dataGridCellDetailButtonVisible === "boolean" ? settings.dataGridCellDetailButtonVisible : DEFAULT_EDITOR_SETTINGS.dataGridCellDetailButtonVisible,+ dataGridCellDetailDialogDefault: settings.dataGridCellDetailDialogDefault === true,dataGridCrosshairHighlight: typeof settings.dataGridCrosshairHighlight === "boolean" ? settings.dataGridCrosshairHighlight : DEFAULT_EDITOR_SETTINGS.dataGridCrosshairHighlight,dataGridStripedRows: typeof settings.dataGridStripedRows === "boolean" ? settings.dataGridStripedRows : DEFAULT_EDITOR_SETTINGS.dataGridStripedRows,dataGridMultiRowTranspose: settings.dataGridMultiRowTranspose === true,@@ -2737,6 +2740,7 @@ export const useSettingsStore = defineStore("settings", () => {if (partial.multiStatementDefaultView !== undefined) editorSettings.value.multiStatementDefaultView = normalizeMultiStatementDefaultView(partial.multiStatementDefaultView);if (partial.dataGridAutoTransposeSingleRow !== undefined) editorSettings.value.dataGridAutoTransposeSingleRow = partial.dataGridAutoTransposeSingleRow === true;if (partial.dataGridCellDetailButtonVisible !== undefined) editorSettings.value.dataGridCellDetailButtonVisible = typeof partial.dataGridCellDetailButtonVisible === "boolean" ? partial.dataGridCellDetailButtonVisible : DEFAULT_EDITOR_SETTINGS.dataGridCellDetailButtonVisible;+ if (partial.dataGridCellDetailDialogDefault !== undefined) editorSettings.value.dataGridCellDetailDialogDefault = partial.dataGridCellDetailDialogDefault === true;if (partial.dataGridCrosshairHighlight !== undefined) editorSettings.value.dataGridCrosshairHighlight = typeof partial.dataGridCrosshairHighlight === "boolean" ? partial.dataGridCrosshairHighlight : DEFAULT_EDITOR_SETTINGS.dataGridCrosshairHighlight;if (partial.dataGridStripedRows !== undefined) editorSettings.value.dataGridStripedRows = typeof partial.dataGridStripedRows === "boolean" ? partial.dataGridStripedRows : DEFAULT_EDITOR_SETTINGS.dataGridStripedRows;if (partial.dataGridMultiRowTranspose !== undefined) editorSettings.value.dataGridMultiRowTranspose = partial.dataGridMultiRowTranspose === true;