epic(ui): SQL workspace in one visual system and with fewer control rows
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
The issue names sql_workspace_toolbar.dart and sql_query_tab_bar.dart; start by reading those files and the SQL pane’s editor, result bar, and workbench decoration code. The issue proposes two stages, with stage 1 covering shared surfaces, icons, button styles, and responsive labels, then stage 2 changing the layout and editor sizing. Done means satisfying the listed acceptance criteria, including widget and guard tests plus before and after screenshots in both themes.
由索引模型根據 Issue 內容生成。
描述
Why
The SQL workspace is the screen people spend most of their time on, and it is the least consistent one: five control rows around the editor and the grid, three different surface treatments, two different icon-button looks in one toolbar, the same state shown in several places. This issue collects what a visual review of current dev (0.4.22+5, Linux, Demo Playground, 1028 px window, dark theme) found, with measurements, and proposes one target layout. Items are meant to be split into PRs.
What was measured (logical px, from a screenshot of the running app)
| Row | Height |
|---|---|
Connection header (SQLite + Overview / SQL switch) |
44 |
Query tab strip (Query 1, +, Diagram) |
40 |
| Run toolbar (run split button, explain, history, format, open, save, badge, session) | 50 |
| (editor) | 672 of 1308 (initialFraction = 0.65) |
Staged-changes row (Add Row, Delete Row, No changes, Save Changes) |
41 |
Result mode bar (Grid / Groupings / Charts, 12 row(s)., time badge, filter, eye, {}, Export, Save File) |
34 |
| Grid header | 37 |
Five control rows = ~209 px before any data. On a 1366x768 laptop that is ~27% of the window height; the one-line query above gets an editor of ~672 px while the grid beneath shows 8 rows.
Findings
1. Vertical budget
- The editor is given 65% of the pane regardless of content. A one-line query leaves a large empty card and a grid squeezed to the bottom.
- Five control rows (see above), and the status bar repeats part of them (item 4).
2. Three surface languages in one pane
- Editor:
SqlEditorChrome, radius 14, 1 px accent-tinted border, accent glow (blurRadius: 28) from workbench tokens. - Toolbar:
sqlToolbarDecoration, flat strip,workbench.surfaceat 0.85 alpha, hairline bottom border. - Tab strip (
sql_query_tab_bar.dart):Theme.of(context).colorScheme.card/.border, i.e. shadcn tokens, not workbench tokens (also relevant for #1465). - Results: no container at all.
A card with a glow above flat bars and a bare grid reads as three unrelated components.
3. Toolbar (sql_workspace_toolbar.dart)
- Same icon for two different things:
ExplainusesIcons.account_tree_outlined, and theDiagrambutton in the tab strip uses the same icon. At the default width Explain is icon-only, so the two are indistinguishable. - Two looks of icon buttons in one row: Explain and Session are bordered, History / Format / Open / Save are borderless.
- The
Auto-commitbadge is a tiny pill next to 36 px buttons, and the Session menu's label saysSession · auto-commit: the same state twice (badge + menu label). compactis decided on the toolbar's own width (< 900), which is the window minus the sidebar. With the default sidebar the toolbar is compact in a 1028 px window, so the labels (Execute (F5),Explain) are never shown on a normal laptop.
4. The same information in several places
- Row count and elapsed time: result mode bar (
12 row(s).,1 ms) and the status bar (1 ms,12 rows, 8 cols). The wording differs (row(s)vsrows). - Connection name and path: sidebar item, header (
SQLite), status bar.
5. Staged-changes row always visible
Add Row / Delete Row / No changes / Save Changestakes a full row even when nothing is staged and nothing is dirty. It can live in the result mode bar (or appear only once the grid is in edit mode).
6. Related defects found in the same pass
- Status bar stuck on
Running query…: see the bug filed separately. - Raw duplicated exception dump as the error view: see the separate issue.
Proposal
Two stages; stage 1 is cheap and removes the inconsistencies, stage 2 reclaims ~90 px.
Stage 1: one visual system (no layout change)
- One surface rule for the pane: bars use
workbench.surface+ hairline border; the editor and the results are both framed the same way (same radius, no glow on the editor, or glow on both). Drop the accent glow from the editor card or move it to focus state only. - Tab strip on workbench tokens (no
Theme.of(context).colorSchemein the SQL pane). - Toolbar: one icon-button style (ghost,
md), distinct icons (Explain: a plan / magnifier-with-lines icon; Diagram keeps the tree), theAuto-commitbadge at control height or folded into the Session menu label only. compactfrom the window or from a measured threshold per control (labels collapse one by one), not from the content width.- One wording and one place for counts:
12 rowsin the status bar only, the result bar keeps only what is not elsewhere (time of the shown tab, truncation notice).
Stage 2: fewer rows
- Put the run controls on the right of the query tab strip (tabs left,
Run / Explain / History / Format / Open / Save / Sessionright): the toolbar row goes away (-50 px). Overflow into a...menu below ~700 px. - Merge the staged-changes actions into the result mode bar and show them only while the result is editable (-41 px).
- Auto-fit the editor: height = lines of text clamped to 120..40% of the pane, the user's splitter position wins once dragged and is remembered per tab.
Sketch of the target:
SQLite Overview | SQL
Query 1 | Query 2 | + [> Run v] [Explain] [History] [Format] [Open] [Save] [... Session]
+---------------------------------------------------------------+
| SELECT * FROM orders LIMIT 200; | <- auto-fit, min 120 px
+---------------------------------------------------------------+
Grid | Groupings | Charts [filter] [eye] [{}] +Row -Row Save changes Export v Save File v
id | user_id | product_id | ...
Acceptance
- Stage 1: no
Theme.of(context).colorSchemeand no rawColor(0x...)in the SQL workspace files; one border radius and one surface rule for editor, toolbar, tab strip and results (add a widget test that reads the decorations). - Stage 1: Explain and Diagram have different icons; all icon buttons in the toolbar share one style and height (extend
test/guardslikebutton_standard_guards_test.dart). - Stage 1: the toolbar keeps its labels at 1028 px window width with the sidebar open, or collapses control by control.
- Stage 2: control rows above the grid: 3 (header, tabs+actions, result bar); measured heights are listed in the PR.
- Stage 2: a one-line query gets a ~120 px editor; the splitter position survives re-runs and tab switches.
- A screenshot pair (before / after) in the PR for dark and light themes.
Related: #1331, #1465, #1480, #1336 (UI kit gallery), #1340 (height tests); closed predecessor #1150 (one-row toolbar).
- 主要語言
- Dart
- 星號
- 23
- 分支
- 1
- 平均合併
- 31 分鐘
- 30 天內合併 PR
- 570
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
QueryaHub/Querya-Desktop 的其他 Issue
-
enhancement ui
難度 2/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1689 ·
維護者通常 1 天內回覆
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflow未關閉bug frontend
難度 2/5 1-3 小時 新手友好度 82/100
QueryaHub/Querya-Desktop#1642 ·
維護者通常 1 天內回覆
-
bug error-handling settings
難度 1/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1637 ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1 小時以內 新手友好度 88/100
QueryaHub/Querya-Desktop#1636 ·
維護者通常 1 天內回覆
-
enhancement marketplace
難度 2/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1635 ·
維護者通常 1 天內回覆
查看 QueryaHub/Querya-Desktop 的全部 Issue
相似的 Issue
-
Needs Attention platform: android type: infrastructure umbrella
難度 2/5 1-3 小時 新手友好度 78/100
firebase/flutterfire#18832 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
-
from.page-issue
難度 2/5 1-3 小時 新手友好度 69/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
sass/dart-sass#2888 · 2 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
[a11y_assessments] Disabled CheckboxListTile shares mutable state可能已有人在做 @kevmoo 於 12 天前認領。 未關閉a: accessibility fyi-design p: material_ui package team-accessibility
難度 1/5 1 小時以內 新手友好度 85/100
維護者通常 1 天內回覆