Show the current choice, keyboard focus, and states apart
Phase 5-5. - The current radio row shows a check mark in the icon column and no fill (UI-051, replaces the radio rule of UI-003). The list of all tabs names pinned tabs in text. - Keyboard focus adds a 2-pixel ring inside menu rows. The global focus ring is 2 pixels with a 1-pixel offset. - Active toggles get the accent color, the selection fill, and a 2-pixel accent bar. Hover gets only a neutral fill. Enabled icon buttons use --rs-text. - Disabled controls use --rs-text-dim at full opacity, not opacity. - The file tree has one Tab stop. Up and Down move, Shift extends the selection, Right opens or enters a folder, Left closes it or goes to its parent, Home and End go to the ends, and typed letters find a row. - The three workbench splitters take focus. The arrow keys move them by 16 pixels, and Home and End go to their limits. - Help names Esc, then Tab, to leave the text. - 5 new catalog rows in French, Japanese, and Simplified Chinese. - Docs: UI-051, ui-design.md, and the user guide. Tests: the new layout/keyboardFocus. backgroundImages now expects the check mark on the current radio row.
This commit is contained in:
+8
-3
@@ -70,6 +70,11 @@ Do not copy feature-specific colors into a shared control.
|
||||
|
||||
- Controls, menu rows, and navigation highlights use `--rs-control-radius`. This includes hover, active, and selected states.
|
||||
- Keep readable labels, visible focus indicators, and comfortable click targets in compact layouts.
|
||||
- Keyboard focus shows a 2-pixel `--rs-focus` ring outside the control. Menu rows draw the ring inside the row. Hover never shows the ring.
|
||||
- Hover gets a neutral fill. An active toggle also gets the accent color, the selection fill, and a 2-pixel accent bar, so it differs from hover.
|
||||
- A disabled control uses `--rs-text-dim` at full opacity. Do not fade a control with opacity.
|
||||
- A composite widget, such as the file tree, has one Tab stop. The arrow keys move inside it.
|
||||
- A splitter takes keyboard focus. The arrow keys move it by 16 pixels, and Home and End go to its limits.
|
||||
- Native form controls, such as checkboxes, take their accent from `--rs-accent`, not the browser default ([UI-030](design-decisions.md#ui-030--settings-installation-checkbox-theme-drift)).
|
||||
- Document tables are the exception. Keep their grid, cells, and cell selection outlines square. Table toolbars and table menus stay rounded.
|
||||
|
||||
@@ -107,9 +112,9 @@ Use one menu design for context menus, action menus, and their submenus in the h
|
||||
- A common text action has the same label, icon, and shortcut in every menu. Build Undo, Redo, the clipboard rows, and the search row with `menuItems.ts`.
|
||||
- Write shortcut labels with `src/lib/ui/shortcuts.ts`: `keys("Mod+Shift+P")` gives Ctrl+Shift+P on Windows and Linux and ⇧⌘P on macOS. A workbench command takes its label from `commandShortcut()` in `workbenchKeys.ts`. Do not write "Ctrl" in interface text or in the catalog. Use a placeholder.
|
||||
- Use inset separators between related groups.
|
||||
- Enabled rows share one hover fill and one keyboard focus fill.
|
||||
- Disabled rows stay readable. Keyboard navigation skips them, and they do not run.
|
||||
- Radio choices mark the current option with the shared fill and no checkmark. The current enabled radio choice gets focus when the menu opens.
|
||||
- Enabled rows share one hover fill. Keyboard focus adds a 2-pixel ring inside the row.
|
||||
- Disabled rows stay readable: dim text at full opacity. Keyboard navigation skips them, and they do not run.
|
||||
- Radio choices mark the current option with a check mark in the icon column, and no fill. The current enabled radio choice gets focus when the menu opens.
|
||||
- A row can have a default action and a submenu. A click on the label, Enter, or Space runs the default action. Hover, the submenu arrow, or Right opens the submenu.
|
||||
|
||||
### Keyboard and viewport
|
||||
|
||||
Reference in New Issue
Block a user