Add the command palette, Write formatting keys, and platform labels
Phase 5-2. - Ctrl+Shift+P opens the command palette: every workbench command with its shortcut, then the plugin commands (UI-048). - In Write, Ctrl+B, Ctrl+I, Ctrl+Shift+X, and Ctrl+Shift+H format the selection, and Ctrl+K inserts a Markdown link. The Format menu shows these shortcuts. - Ctrl+\ toggles the side pane. It matches the physical key on every keyboard layout. Ctrl+B now belongs to Write. - Help lists every shortcut in groups, open by default. The list comes from the command table. - src/lib/ui/shortcuts.ts writes shortcut labels for the platform: Ctrl+Shift+P on Windows and Linux, and the macOS symbols on a Mac. The catalog uses placeholders, so no translation contains "Ctrl". - 19 new catalog rows, and 10 rows converted to placeholders, in French, Japanese, and Simplified Chinese. - Docs: UI-048, the user guide keyboard tables, and a label rule in ui-design.md. New tests: layout/commands, tests/unit/ui/shortcuts.spec.ts, and new cases in workbenchKeys.spec.ts. Tests that read the old labels or pressed Ctrl+B for the side pane now use the new names and Ctrl+\. The smoke harness raises the resource timing buffer to 5000 entries. The new modules pushed the CodeMirror language module past the default 250 entries, so editor/markdownPaste could not find its URL.
This commit is contained in:
@@ -903,3 +903,18 @@ Native shell, background image, and desktop acceptance remain open.
|
||||
- Evidence: `tests/smoke/appearance/themeEditor.smoke.mjs` and `tests/unit/theme/themeEditor.spec.ts`. Screenshots are in `output/phase-5a/5a-5/` in the main checkout.
|
||||
- Replaces / replaced by: The theme choice in the action menu rule of "Choice lists and pickers". Other short choices stay in the action menu.
|
||||
- Limits: The editor changes colors, not fonts. Browser checks use desktop service mocks. Native desktop acceptance remains open.
|
||||
|
||||
### UI-048 — Command palette, formatting shortcuts, and platform labels
|
||||
|
||||
- Type: Rule change
|
||||
- Date: 2026-10-28
|
||||
- Status: Implemented for user review
|
||||
- Decision source: Owner decisions 2, 7 (shortcut labels), and 10 of 2026-10-27 (interface review issues 2, 15, and 22), stage 5-2.
|
||||
- Previous rule: Ctrl+B toggled the sidebar, so Writer had no Ctrl+B, Ctrl+I, or Ctrl+K. Formatting needed the context menu. Interface text wrote "Ctrl" in three styles ("Ctrl T", "Ctrl+T", "Ctrl N"). Help listed 6 shortcuts in a closed section, and no command list existed.
|
||||
- New rule: In Writer, Ctrl+B, Ctrl+I, Ctrl+Shift+X, and Ctrl+Shift+H format the selection, and Ctrl+K inserts a Markdown link. The Format menu shows these shortcuts. Ctrl+\ (the physical key on every layout) toggles the sidebar. Ctrl+Shift+P opens the command palette: every workbench command with its shortcut, then the plugin commands. Help lists every shortcut in groups, open by default. `src/lib/ui/shortcuts.ts` writes each shortcut label for the platform, and the catalog uses placeholders.
|
||||
- Reason: A writing app needs the common formatting keys. A shortcut that a user cannot find does not help.
|
||||
- Scope: The workbench, Writer, Help, the menus, the tooltips, and the catalog.
|
||||
- Shared implementation: `workbenchKeys.ts` (labels, `commandShortcut`, and the Help list), `shortcuts.ts`, `CommandPalette.svelte`, `formatKeys.ts`, and `SettingsDialog.svelte`.
|
||||
- Evidence: `tests/smoke/layout/commands.smoke.mjs`, `tests/unit/ui/shortcuts.spec.ts`, and `tests/unit/layout/workbenchKeys.spec.ts`.
|
||||
- Replaces / replaced by: The Ctrl+B sidebar shortcut in the user guide.
|
||||
- Limits: The macOS labels are tested as unit cases, not on a Mac. Browser checks use desktop service mocks.
|
||||
|
||||
@@ -105,6 +105,7 @@ 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`.
|
||||
- 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.
|
||||
|
||||
+16
-4
@@ -42,7 +42,8 @@ To show workspace settings and plugin data in the navigator, turn on **Settings
|
||||
| Find a file by path | Press Ctrl+P. |
|
||||
| Search all files | Press Ctrl+Shift+F. |
|
||||
| Find in the document | Press Ctrl+F. |
|
||||
| Show or hide the sidebar | Press Ctrl+B. |
|
||||
| Show or hide the sidebar | Press Ctrl+\. |
|
||||
| Find a command | Press Ctrl+Shift+P, type part of the command name, and press Enter. The list also shows each shortcut and the plugin commands. |
|
||||
| Rename | Select an item in the navigator and press F2. RuneStone selects the name without the extension. |
|
||||
| Move | Drag files between folders. |
|
||||
| Bookmark | Right-click a file and choose **Bookmark**. The Bookmarks pane lists it. |
|
||||
@@ -103,6 +104,14 @@ Right-click Markdown text, or press Shift+F10, to open the context menu. Use the
|
||||
| Menu | Actions |
|
||||
| --- | --- |
|
||||
| Format | Bold, italic, strikethrough, highlight, code, math, comment, and clear formatting |
|
||||
|
||||
In Writer, these shortcuts format the selected text:
|
||||
|
||||
| Format | Shortcut |
|
||||
| --- | --- |
|
||||
| Bold / Italic | Ctrl+B / Ctrl+I |
|
||||
| Strikethrough / Highlight | Ctrl+Shift+X / Ctrl+Shift+H |
|
||||
| Link (`[text]()`, with the cursor in the address) | Ctrl+K |
|
||||
| Paragraph | Bulleted and numbered lists, tasks, headings 1–6, body text, and quotes |
|
||||
| Insert | Footnotes, tables, callouts, horizontal rules, code blocks, and math blocks |
|
||||
|
||||
@@ -200,10 +209,11 @@ To open web links from your documents in your system browser instead, turn off *
|
||||
|
||||
## Keyboard reference
|
||||
|
||||
This table lists the Windows and Linux keys.
|
||||
This table lists the Windows and Linux keys. On macOS, Cmd replaces Ctrl, and RuneStone shows the macOS symbols, such as ⇧⌘P. Help lists every shortcut.
|
||||
|
||||
| Action | Shortcut |
|
||||
| --- | --- |
|
||||
| Find a command | Ctrl+Shift+P |
|
||||
| Open a workspace | Ctrl+O |
|
||||
| Find a file / New file | Ctrl+P / Ctrl+N |
|
||||
| New tab / Close tab | Ctrl+T / Ctrl+W |
|
||||
@@ -213,7 +223,9 @@ This table lists the Windows and Linux keys.
|
||||
| Find in document / Search workspace | Ctrl+F / Ctrl+Shift+F |
|
||||
| Switch Writer and IDE | Ctrl+E |
|
||||
| Nest a list item / Move it up | Tab / Shift+Tab |
|
||||
| Show or hide the sidebar | Ctrl+B |
|
||||
| Bold / Italic / Link (Writer) | Ctrl+B / Ctrl+I / Ctrl+K |
|
||||
| Strikethrough / Highlight (Writer) | 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 |
|
||||
@@ -230,6 +242,6 @@ The [Terminal guide](guides/terminal.md) lists the terminal shortcuts.
|
||||
|
||||
## Get help
|
||||
|
||||
Press F1, or select the question mark at the bottom of the sidebar, for **Help and about**. It shows the app version, basic steps, and shortcuts.
|
||||
Press F1, or select the question mark at the bottom of the sidebar, for **Help and about**. It shows the app version, basic steps, and every shortcut.
|
||||
|
||||
When you report a problem, include the app version, operating system, steps, expected result, and error text.
|
||||
|
||||
Reference in New Issue
Block a user