6.1 KiB
Interface design
RuneStone uses compact controls, clear icons, and shared theme values. This reference describes the interface and its shared dimensions. Agent instructions remain in AGENTS.md.
Design principles
Keep attention on the user's work. Use quiet backgrounds for the active view and reserve strong accents for alerts or actions that need attention. Tabs can join visually with their content area. A selected view does not need a bright border or a repeated heading.
Show each board name once in the main controls. Keep switching and renaming as separate actions with clear targets. Avoid repeated view names, instructions, and descriptions when the visible content already explains the current view.
Use familiar icons and visual previews to explain choices. Keep visible labels when an icon alone has more than one likely meaning. Every icon control needs an accessible name, a tooltip on hover and keyboard focus, and a comfortable target. Use a preview for visual choices such as themes and table styles.
Treat these principles as the basis for shared components and plugin interfaces. Check the user's work area first during reviews. Controls must support that work without competing for attention.
Window and navigation
The main window and Settings use the same 36-pixel titlebar height: --rs-titlebar-height.
The main header holds navigation, document tabs, actions, and window controls.
Files, Search, Bookmarks, and installed sidebar views such as Git share the top navigation group.
Editor views from plugins can use the vertical plugin ribbon. The ribbon uses no width when it has no entries.
The active navigation button shows which view occupies the left pane.
Document and plugin tabs share the tab bar. The new-tab button follows the tabs. Tabs retain their order and pin state when a plugin replaces its current view. The last closed tab leaves an empty New tab. Sidebar widths and visibility persist across window sessions. Opening a different editor does not restore a hidden outline.
Icons and controls
Use a recognizable icon for a familiar action. Pair ambiguous icons with short labels. Icon-only buttons have accessible names and tooltips on hover and keyboard focus. Reuse the same icon for the same action. Shared icon buttons use 28-pixel targets. Do not add icons to explanations or settings that have no clear visual equivalent.
Controls and navigation highlights use --rs-control-radius, currently 5 pixels.
Selection outlines use --rs-item-selection-radius and the shared --rs-item-selection-* color and width values.
Adjacent selected items share one continuous fill and an outline around the exposed perimeter.
Separate groups retain separate outlines. Nested rows retain exposed edges at indentation changes.
Document table cells and their selection outlines stay square. Table toolbar buttons and menus remain rounded.
Menus and dropdown actions
Action menus use src/lib/ui/actionMenu.ts. Svelte callers can use ContextMenu.svelte.
src/lib/ui/menu.css supplies shared presentation. src/lib/theme/tokens.css supplies dimensions and colors.
Feature code does not override menu rows. Menu width can expand when content needs more space.
| Token | Default | Purpose |
|---|---|---|
--rs-menu-width |
248px | Standard menu width |
--rs-menu-padding |
5px | Inset around rows |
--rs-menu-row-height |
26px | Minimum row height |
--rs-menu-row-padding |
3px 8px | Vertical and horizontal row padding |
--rs-menu-font-size |
12px | Shared text size |
--rs-menu-icon-size |
14px | Action icon size |
--rs-menu-icon-gap |
8px | Space between icon and label |
All rows reserve an icon column. Shortcut text and submenu arrows occupy trailing columns. Enabled rows share hover and keyboard focus colors. Disabled rows stay readable and cannot run. Menus support arrow keys, Home, End, Enter, Space, and Escape. Right opens a submenu. Left returns to its parent. Keyboard dismissal restores focus. Menus stay inside the viewport and scroll when their contents exceed its height. Searchable pickers and form dialogs can use richer layouts. Native select controls retain platform behavior.
Settings
Settings navigation pairs icons with labels. Each settings page uses readable text and ordinary controls. Related plugin metadata and actions occupy compact rows. Controls wrap at narrow widths, and the content area scrolls. Long navigation lists must leave room for the selected page.
| Shared token | Default |
|---|---|
--rs-settings-row-padding |
10px |
--rs-settings-control-height |
28px |
--rs-settings-heading-size |
18px |
--rs-settings-description-size |
12px |
--rs-settings-gap |
8px |
--rs-settings-section-gap |
16px |
Typography and tables
The interface uses --rs-font-ui, and prose uses --rs-font-prose.
The IDE and Terminal share --rs-font-mono and --rs-code-font-weight.
The monospace stack starts with Cascadia Mono, then Cascadia Code, JetBrains Mono, Fira Code, and Consolas.
The default code weight is 300. Actual appearance depends on installed fonts and their available weights.
Terminal font-size preferences remain independent.
Tables use shared cell padding and line height. Entering a cell does not change its row height. A plain paragraph after a table remains a paragraph when the separator line is removed. Table rows need an unescaped pipe. Writer and Reading use the same row boundary rule.
Checks for interface changes
Check light and dark themes, keyboard use, focus indicators, narrow windows, and viewport edges. For selection changes, check single items, contiguous ranges, separate groups, and nested rows. For Settings changes, include long plugin lists. For tab changes, include plugin views and pinned tabs.
Run node scripts/menuConsistency.smoke.mjs against the development server after shared menu changes.
The menu check covers file, folder, pane, tab, editor, table, and submenu examples.
Use SMOKE_URL to select the server URL. Use PLAYWRIGHT_MODULE and CHROME_PATH when the environment needs explicit paths.
Browser tests with desktop mocks do not replace native installer and window acceptance checks.