Skip to content

Build your personal knowledge base with Trilium Notes

docs(claude): keep separators off menu headings

Elian Doran2c03b50c3f68
diff --git a/.claude/skills/building-client-ui/SKILL.md b/.claude/skills/building-client-ui/SKILL.md
index a4516b3d24..ded1ec7a6f 100644
--- a/.claude/skills/building-client-ui/SKILL.md
+++ b/.claude/skills/building-client-ui/SKILL.md
@@ -130,6 +130,7 @@ Rules for both:
- **A bottom sheet is only ever `mobileBottomSheet`.** Never put `mobile-bottom-menu` in `dropdownContainerClassName`: the stylesheet then pins the popup to the bottom while Floating UI still places it beside its toggle, and Floating UI's inline `max-height` caps the sheet to the room the toggle had. `mobileBottomSheet` also dims the page, so it needs no `mobileBackdrop`.
- **`dropdownRef` holds a `DropdownHandle`** (`show`, `hide`, `toggle`), exported from `Dropdown.tsx`. Type the ref with it, never with Bootstrap's `Dropdown`, which compiles but promises methods the handle doesn't have.
- **Submenus**: `FormDropdownSubmenu` opens a submenu only inside a `Dropdown` menu (elsewhere, its title is rendered as a header above its rows). Which side a submenu opens on, and which way its row's arrow points, is detected from the room around the menu; there is no prop for it.
+- **A menu heading takes the place of a separator; never put one right above it.** In the Next theme, `.dropdown-menu h6::before` draws a full-width line under every `FormListHeader` / `{ kind: "header" }`, so a separator above it shows two lines with only the heading between them. Start a group with its heading alone, as the board's card menu does. A builder that returns a section opening with a heading (`buildAttributeMenuItems()`, which returns `[]` when it has nothing) needs the separator only when it comes back empty: `...(items.length ? items : [ { kind: "separator" } ])`. `Menu` collapses a run of separators but leaves a separator above a heading alone, because the legacy light and dark themes draw no line under a heading.
- **A menu item that needs more input before it completes ends in "..."**. This follows the Windows convention, where a confirmation counts as more input. The rule covers `FormListItem`, `CommandItem` and `contextMenu.show()` items alike. Add the "..." when the item opens:
- a dialog with options (Export..., Board properties...)
- a prompt or popover that asks for a value (Rename attachment..., Edit column...)