106 lines
6.5 KiB
Markdown
106 lines
6.5 KiB
Markdown
# RuneStone project instructions
|
|
|
|
## Documentation
|
|
|
|
Keep the README focused on the project, its usefulness, setup, help, and maintainers.
|
|
Keep agent instructions in this file. Put detailed usage, development notes, and
|
|
product plans in `docs/`, with links from the README.
|
|
Keep the roadmap visual and organized around goals, user outcomes, and milestones.
|
|
Keep detailed capability lists and design constraints in the product scope reference.
|
|
|
|
## Plugin packages
|
|
|
|
Use `docs/plugins.md` as the package and release reference for all plugin work.
|
|
Distribute one standard `.zip` per plugin, with `plugin.json` at the archive root.
|
|
Use `pnpm package:plugin <compiled-folder> [output-folder]` to create release files.
|
|
Use Settings → Plug-ins for local ZIP and experimental Gitea-link installation.
|
|
Do not introduce custom extensions, loose JSON installation, or folder installation instructions.
|
|
Keep the manifest and entry module readable. Include the assets and dependencies needed to run the plugin.
|
|
Follow the Gitea release standard in `docs/plugins.md`: one plugin ZIP per published release, with an explicit tag for prerelease trials.
|
|
Keep the download source separate from package validation and installation.
|
|
GitHub and GitLab adapters remain future work. Do not add untested host support.
|
|
|
|
## UI work: prefer meaningful icons
|
|
|
|
Apply these rules whenever designing, implementing, modifying, or reviewing RuneStone UI.
|
|
Apply them automatically without requiring the user to repeat them.
|
|
|
|
- Favor recognizable icons for actions, navigation, menus, and settings categories.
|
|
Help users recognize functions without relying only on English vocabulary.
|
|
Use icons to save space and reduce clutter.
|
|
- Pair icons with concise visible labels when the meaning could be ambiguous.
|
|
Keep labels that help users learn or distinguish functions.
|
|
- Use icon-only controls for familiar actions in compact spaces.
|
|
Give them accessible names, tooltips on hover and keyboard focus, and comfortable click targets.
|
|
- Reuse existing icon components and artwork. Keep the same icon for the same function.
|
|
Maintain consistent sizing and stroke weight.
|
|
- Do not force icons onto every setting, label, or explanation.
|
|
Use text alone when no clear icon exists. Omit decoration that does not improve understanding.
|
|
Recognition and accessibility take priority over fitting more controls on screen.
|
|
- Use Obsidian's settings pattern as a reference: icons with labels in navigation,
|
|
readable text and ordinary controls in detailed settings.
|
|
|
|
For UI reviews, check changed controls against these rules.
|
|
|
|
## UI work: use rounded corners
|
|
|
|
Apply these rules whenever designing, implementing, modifying, or reviewing RuneStone UI.
|
|
Apply them automatically without requiring the user to repeat them.
|
|
|
|
- Use rounded corners consistently for controls and navigation highlights, including file and folder selections.
|
|
Compact controls and navigation rows share `--rs-control-radius`.
|
|
Selection outlines use `--rs-item-selection-radius`.
|
|
- Round exposed selection corners while keeping adjacent selected rows joined.
|
|
Do not add rounded gaps or selection borders on shared edges.
|
|
- Apply the same treatment to hover, active, and selected navigation states.
|
|
- Tables inside documents are the exception: keep grids, cells, and cell selection outlines square.
|
|
Table toolbar and menu controls still use rounded corners.
|
|
|
|
## UI work: outline only the outer boundary of a selection
|
|
|
|
Apply these rules whenever designing, implementing, modifying, or reviewing selection UI.
|
|
Apply them automatically without requiring the user to repeat them.
|
|
|
|
- Adjacent selected rows or cells share one highlighted region.
|
|
Highlight only its exposed perimeter. Omit selection borders on shared internal edges.
|
|
Apply this to navigation rows, table cells, lists, and grids.
|
|
- Use the shared `--rs-item-selection-*` theme values for fill, border color, and border width.
|
|
Use table-cell selection as the fill and outline reference, with rounded exposed corners outside document tables.
|
|
- Separate groups, divided by unselected items or physical gaps, retain separate outlines.
|
|
A single selected item gets a complete outline.
|
|
- Determine adjacency from visible layout order, including sorting and expanded tree branches.
|
|
At indentation changes, preserve exposed edges and omit the portions shared by selected rows.
|
|
- Keep the fill continuous within each selected region.
|
|
Ordinary table grid lines can remain, but must not become highlighted selection borders inside the region.
|
|
- Check single items, contiguous ranges, separated selections, and nested rows.
|
|
|
|
## UI work: use one menu design
|
|
|
|
Apply these rules to context menus, action menus, and their submenus.
|
|
Apply them automatically when you add, change, or review a menu.
|
|
|
|
- Use `src/lib/ui/actionMenu.ts` for action menus.
|
|
Svelte callers can use `src/lib/layout/ContextMenu.svelte`.
|
|
Keep presentation in `src/lib/ui/menu.css` and theme values in `src/lib/theme/tokens.css`.
|
|
Do not create a separate menu renderer or local style overrides for individual features.
|
|
- Use the same font, row height, padding, icon size, label alignment, separators, and shadow throughout a menu family.
|
|
Use `--rs-menu-*` tokens and `--rs-control-radius`.
|
|
Keep a padding inset around every row so hover and focus backgrounds do not touch the panel border.
|
|
Menu width can change when content requires more space. Keep the other shared measurements.
|
|
- Use the same action icon for the same function across menus.
|
|
Give recognizable actions an icon and a concise label.
|
|
Reserve the icon column when an item has no suitable icon.
|
|
Keep submenu arrows and shortcut text in separate trailing columns.
|
|
- Give enabled rows the same hover and keyboard focus treatment.
|
|
Keep disabled rows readable, skip them during keyboard navigation, and prevent their activation.
|
|
Use the same inset separators between related groups.
|
|
- Support arrow keys, Home, End, Enter, Space, and Escape.
|
|
Open submenus with the Right arrow and return with the Left arrow.
|
|
Restore focus on keyboard dismissal. Keep menus within the viewport and scroll long menus.
|
|
- Check file, folder, pane, tab, editor, table, and submenu examples after changes to shared menu code.
|
|
Check both themes, disabled items, icon alignment, keyboard focus, and viewport edges.
|
|
Run `scripts/menuConsistency.smoke.mjs` against the development server to compare shared styles and behavior.
|
|
|
|
Rich pickers and dialogs can use their own layouts when they contain search fields, descriptions, or forms.
|
|
Plugin menus should use these rules where the host API permits shared components.
|