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:
@@ -950,3 +950,18 @@ Native shell, background image, and desktop acceptance remain open.
|
||||
- Evidence: `tests/smoke/layout/titleBar.smoke.mjs` and the Rust command list test.
|
||||
- Replaces / replaced by: The left pane footer, and the ribbon rule "The ribbon has no width when it has no entries."
|
||||
- Limits: Browser checks use desktop service mocks. Snap Layouts, the native drag area, and the macOS title bar need native acceptance. The macOS code path was not compiled here. On Windows 10, Win+Z does nothing.
|
||||
|
||||
### UI-051 — Check marks, focus rings, and control states
|
||||
|
||||
- Type: Rule change
|
||||
- Date: 2026-10-28
|
||||
- Status: Implemented for user review
|
||||
- Decision source: Owner decisions 8 and 13 (keyboard and focus) of 2026-10-27 (interface review issues 4 and 14, and finding 2 on UI-003), stage 5-5.
|
||||
- Previous rule: The current radio row had the hover fill and no check mark, so a hovered row and the current row looked the same. Hover and keyboard focus shared one fill. Hover and active toggles shared one look. Disabled controls faded to 40 to 50% opacity (2.46:1 in light). The focus ring was 1 pixel and inset. Every file tree row was a Tab stop, and the tree had no arrow keys. Splitters took no keyboard focus.
|
||||
- New rule: The current radio row shows a check mark in the icon column and no fill. Keyboard focus adds a 2-pixel ring to the shared hover fill. Active toggles get the accent color, the selection fill, and a 2-pixel accent bar. Disabled controls use `--rs-text-dim` at full opacity, and enabled icon buttons use `--rs-text`. The global focus ring is 2 pixels with a 1-pixel offset. The file tree has one Tab stop, arrow keys, Home, End, and type-ahead. Splitters take focus and move by 16 pixels with the arrow keys. Help names Esc, then Tab, to leave the text.
|
||||
- Reason: The current choice, the pointer, and the keyboard focus must each be visible on their own. Disabled text must stay readable.
|
||||
- Scope: Shared menus and pickers, icon buttons, all disabled buttons, the file tree, and the workbench splitters.
|
||||
- Shared implementation: `actionMenu.ts` (the check mark), `menu.css`, `base.css`, `IconButton.svelte`, `FileTree.svelte`, `TreeNode.svelte`, and `splitterKey` in `Workbench.svelte`.
|
||||
- Evidence: `tests/smoke/layout/keyboardFocus.smoke.mjs`.
|
||||
- Replaces / replaced by: The radio rule of [UI-003](#ui-003--quiet-menu-choices). Other parts of UI-003 remain.
|
||||
- Limits: The check mark replaces the icon of a radio row. The list of all tabs names pinned tabs in text. Browser checks use desktop service mocks.
|
||||
|
||||
+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
|
||||
|
||||
@@ -50,6 +50,7 @@ To show workspace settings and plugin data in the navigator, turn on **Settings
|
||||
|
||||
Right-click a file or folder for more actions, such as **Make a copy**, **Copy workspace path**, and **Open in default app**.
|
||||
With the navigator focused, Ctrl+X, Ctrl+C, and Ctrl+V cut, copy, and paste files.
|
||||
The navigator is one Tab stop. Up and Down move between items, and Shift+Up or Shift+Down extends the selection. Right opens a folder or enters it. Left closes a folder or goes to its parent. Home and End go to the first and last item. Type the start of a name to go to it.
|
||||
Ctrl+Z undoes a file move or rename, and Ctrl+Shift+Z or Ctrl+Y repeats it.
|
||||
|
||||
### Delete files
|
||||
@@ -230,12 +231,14 @@ This table lists the Windows and Linux keys. On macOS, Cmd replaces Ctrl, and Ru
|
||||
| Switch Write and Source | Ctrl+E |
|
||||
| Switch Read and the editor | Ctrl+Shift+E |
|
||||
| Nest a list item / Move it up | Tab / Shift+Tab |
|
||||
| Leave the text, then move the focus on | Esc, then Tab |
|
||||
| Bold / Italic / Link (Write) | Ctrl+B / Ctrl+I / Ctrl+K |
|
||||
| Strikethrough / Highlight (Write) | Ctrl+Shift+X / Ctrl+Shift+H |
|
||||
| Show or hide the sidebar | Ctrl+\ |
|
||||
| Rename | F2 |
|
||||
| Delete to the trash / Delete permanently | Delete / Shift+Delete |
|
||||
| Context menu | Shift+F10 |
|
||||
| Resize a pane | Tab to its divider, then press the arrow keys |
|
||||
| Settings / Help and about | Ctrl+, / F1 |
|
||||
|
||||
The [Terminal guide](guides/terminal.md) lists the terminal shortcuts.
|
||||
|
||||
Reference in New Issue
Block a user