You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 21b8ff3
Browse filesBrowse the repository at this point in the historyBrowse files
- Add a token-driven type scale in index.css (--font-size-caption/dense/
body/form/title/page-title = 11/12/13/14/16/20px) and map the two
missing sizes as text-caption / text-body in uno.config.ts
- Replace every bare px/rem font-size in components with scale tokens
(136 declarations across 52 files) and collapse text-[8/9/10/11px]
into text-caption, removing sub-11px state text
- Fix base components: CardTitle 24px -> 16px, dialog/alert titles
18px -> 16px, button size variants now xs=24px / sm=28px / default
32px / lg=36px with matching icon-sm / icon-xs
- Compact the shell: navigation rail 64 -> 56px with 36x36 entries,
object tree text 14 -> 12px on uniform 24px rows, connection
selector rows at 13px, status dots unified (8px inline / 10px
standalone), vendor logos fixed to 14/16/20px
- Unify workspace chrome: grid toolbar fixed at 36px like the result
toolbar, dropdown menu icons on the shared 16px size, JSON row
action raised to a 24px target
- AI / transfer surfaces mapped onto the scale with an ordered
markdown heading hierarchy (20/16/14/13/12/11px)
- Document the scale, icon scale, and density rules in DESIGN.md
Copy file name to clipboardExpand all lines: DESIGN.md
+18-11Lines changed: 18 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,16 +136,20 @@ Preserve established icon and data colors during surface or theme refactors. Use
136
136
137
137
### Fonts and hierarchy
138
138
139
-
The global body size is currently 14px, and `src/assets/index.css` does not define a custom brand font. Keep system sans-serif fonts with platform Chinese fallbacks. Do not introduce decorative fonts or remote font dependencies for the client. Keep Monaco's monospace editor font; SQL, types, object identifiers, and code snippets may use the existing `font-mono` utility.
139
+
The global body size is `var(--font-size-form)` (14px), and `src/assets/index.css` does not define a custom brand font. Keep system sans-serif fonts with platform Chinese fallbacks. Do not introduce decorative fonts or remote font dependencies for the client. Keep Monaco's monospace editor font; SQL, types, object identifiers, and code snippets may use the existing `font-mono` utility.
140
+
141
+
The type scale is token-driven. `index.css` defines `--font-size-caption / dense / body / form / title / page-title` (11 / 12 / 13 / 14 / 16 / 20px); `uno.config.ts` maps the two sizes missing from the default scale (`text-caption` = 11px, `text-body` = 13px), and the rest reuse default utilities (`text-xs` = 12, `text-sm` = 14, `text-base` = 16, `text-xl` = 20). Business components must use these utilities or the CSS variables — never a bare px/rem font size. Monaco's editor font size remains a user setting.
140
142
141
143
The following hierarchy constrains new UI; it does not require rewriting all existing page titles.
142
144
143
-
| Role |Size / weight| Usage |
145
+
| Role |Token / utility| Usage |
144
146
| --- | --- | --- |
145
-
| Page title | 20–24px / 600 | Standalone pages such as Connections and Settings; do not add large headings to editor workspaces |
146
-
| Dialog / section title | 14–18px / 500–600 | Dialog titles and major groups |
147
-
| Body / form | 14px / 400 | Descriptions, inputs, buttons; matches the current `text-sm`|
148
-
| Dense data / supporting labels | 12px / 400–500 | Result grids, object trees, toolbars, status bars |
147
+
| Page title |`text-xl` (20px / 600) | Standalone pages such as Connections and Settings; do not add large headings to editor workspaces |
| Query tabs | 35px high, maximum 200px per tab |`QueryTabs.vue`|
169
-
| Result toolbar | 36px high |`QueryResultPanel.vue`|
170
-
| Standard buttons / inputs | 32px high |`ui/button`, `ui/input`|
174
+
| Result toolbar | 36px high (result panel and grid toolbars share this) |`QueryResultPanel.vue`, `DataGrid.vue`|
175
+
| Standard buttons / inputs | 32px high; 24 / 28 / 36px via `xs` / `sm` / `lg`|`ui/button`, `ui/input`|
171
176
| Virtual result rows | 32px estimated height |`grid/DataGrid.vue`; not a shared height for every table |
172
177
173
178
### Spacing and containers
@@ -204,7 +209,9 @@ Keep `--radius: 0.5rem`: `lg` is 8px, `md` is 6px, and `sm` is 4px. Use `rounded
204
209
205
210
- Use corner radius to convey component hierarchy rather than inventing per-page values. Keep continuous straight edges for data grids, split panes, and editors.
206
211
- Limit `rounded-full` to suitable elements such as avatars, small status dots, and existing badges. Do not make every button pill-shaped.
207
-
- Toolbar icons are usually 14–16px and main navigation icons 20px; the visible icon is smaller than its hit target. Keep standard action targets at 32px. Compact grid actions should generally be at least 24px with sufficient spacing and keyboard access.
212
+
- Icon scale: 12px for inline glyphs (chevrons, close buttons, badge icons), 14px for tree, tab, and compact toolbar icons, 16px for standard buttons, menu items, and input adornments, 20px for main navigation. Dropdown-menu icons inherit the shared `size-4` from `DropdownMenuItem`; do not override per menu. The visible icon is smaller than its hit target; keep standard action targets at 32px and compact grid actions at least 24px with sufficient spacing and keyboard access.
213
+
- Database vendor logos use three sizes: 14px inside lists and tabs, 16px in dropdown selected states and forms, 20px on cards and landing states (`DbTypeIcon` defaults to 16).
214
+
- Status dots use 8px (`h-2 w-2`) inline within rows and 10px (`h-2.5 w-2.5`) as a standalone indicator beside a control.
208
215
- Reuse the component's existing Carbon / Lucide style. Do not add icon libraries for color or decoration, or mix emoji into an action group.
209
216
210
217
## Components
@@ -217,7 +224,7 @@ Interactive components must cover default, hover, focus-visible, active / select
217
224
218
225
### Buttons and toolbars
219
226
220
-
-`default`: the single primary action, retaining `bg-primary text-primary-foreground`. Current default height is 32px; large is 36px.
227
+
-`default`: the single primary action, retaining `bg-primary text-primary-foreground`. Heights: `xs` 24px, `sm` 28px, default 32px, `lg` 36px; icon buttons mirror this via `icon-xs` / `icon-sm` / `icon`. Use `sm` for sidebar and toolbar rows instead of overriding heights per component.
221
228
-`outline / secondary`: secondary actions; `ghost`: toolbar and infrequent actions; `link`: explicit text links.
222
229
-`destructive`: genuinely destructive actions such as deletion. Ordinary disconnect and stop-query actions do not automatically become solid red buttons because they stop something.
223
230
- Loading states prevent duplicate submission and keep readable labels. Provide cancellation for cancellable long tasks rather than disabling the entire panel.
0 commit comments