Give way in narrow windows and use one icon for each action
Phase 5-6. - Side panes give way when the window becomes narrow: the outline below 1100 pixels, the side pane below 800 pixels. They come back when the window grows. A pane that the user opens in a narrow window stays open, and the saved layout keeps the wide-window choice. - One function has one icon. The SDK icon set gets duplicate, template, and tab. The reveal action has one label for each platform (Show in Explorer, Show in Finder, Show in file manager). - The file menu follows one order: open, clipboard, organize, show and copy path, history, then Delete and Delete permanently in the error color after a separator. The tree copies paths through a Copy path submenu, as the tab menu does. - The tree uses the shared chevron. Search hits come in groups by file, with counts and marked matches. Bookmarks show the name, the folder, and a remove button. - All boolean settings use one switch design (src/lib/ui/switch.css). Browser settings apply at once, and the Save button is gone. The Settings window opens with the focus on its search. - Targets of at least 24 pixels: the tab close button, outline rows, switches, and the settings search. - Catalog rows in French, Japanese, and Simplified Chinese. - Docs: UI-052, ui-design.md, and the user guide. Tests: the new layout/panesAndSettings. Tests that closed or opened panes by hand around narrow windows now rely on the new behavior, or wait for the panes to give way before they reopen one. Tests that read the old menu labels or the browser Save button use the new ones.
This commit is contained in:
+7
-1
@@ -69,7 +69,7 @@ Do not copy feature-specific colors into a shared control.
|
||||
## Controls, corners, and focus
|
||||
|
||||
- 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.
|
||||
- Keep readable labels, visible focus indicators, and comfortable click targets in compact layouts. A target is at least 24 by 24 pixels.
|
||||
- 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.
|
||||
@@ -110,6 +110,8 @@ Use one menu design for context menus, action menus, and their submenus in the h
|
||||
- A menu with only text choices omits the icon column. A mixed menu reserves the icon column on every row.
|
||||
- Shortcut text and submenu arrows use separate trailing columns.
|
||||
- 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`.
|
||||
- One function has one icon: `copy` puts content on the clipboard, `duplicate` makes a second file or row, `template` marks template actions, and `tab` opens in a new tab. The action that shows a file in the file manager takes its label from `revealLabel()`.
|
||||
- A file menu follows one order: open, clipboard, organize, show and copy path, history, then Delete. Delete and Delete permanently use `danger`, which gives them the error color.
|
||||
- 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. Keyboard focus adds a 2-pixel ring inside the row.
|
||||
@@ -154,6 +156,7 @@ Decisions: [UI-002](design-decisions.md#ui-002--share-the-requested-dropdown-des
|
||||
- Document and plugin tabs share the tab bar. The new-tab button follows the tabs. Tabs keep their order and pin state when a plugin replaces its view.
|
||||
- The main window keeps an empty New tab after its last tab closes. A secondary window closes with its last tab. The unsaved-edit and active-terminal confirmations still apply, and Cancel keeps the tab open.
|
||||
- Sidebar widths and visibility persist across window sessions. A different editor does not restore a hidden outline.
|
||||
- Side panes give way when the window becomes narrow: the outline below 1100 pixels, and the side pane below 800 pixels. They come back when the window grows again. A pane that the user opens in a narrow window stays open, and the saved layout keeps the choice of a wide window.
|
||||
- A detached tab window holds the tab work area and window controls only. It has no side panes, plugin ribbon, or pane switches, and it does not change the main window layout.
|
||||
|
||||
Decisions: [UI-004](design-decisions.md#ui-004--detached-tab-work-area), [UI-039](design-decisions.md#ui-039--close-secondary-windows-after-the-last-tab).
|
||||
@@ -162,6 +165,9 @@ Decisions: [UI-004](design-decisions.md#ui-004--detached-tab-work-area), [UI-039
|
||||
|
||||
- Follow the Obsidian settings pattern. Navigation pairs icons with labels. Each page uses readable text and ordinary controls.
|
||||
- Use the `--rs-settings-*` tokens for spacing, control height, headings, and descriptions.
|
||||
- Every boolean setting uses the one switch design: `<input type="checkbox" role="switch" class="rs-switch">` (`src/lib/ui/switch.css`).
|
||||
- Settings apply at once: a switch or a choice on change, and a text field when it loses focus. No page has a Save button.
|
||||
- The Settings window opens with the focus on its search field.
|
||||
- Put related plugin metadata and actions in compact rows.
|
||||
- Controls wrap at narrow widths, and the content area scrolls. Long navigation must leave room for the selected page.
|
||||
- General offers the interface language through the shared action menu.
|
||||
|
||||
Reference in New Issue
Block a user