Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Navigation

A resource and a screen each add their own menu entry. A module adds sections and extra entries through its registry.

# descriptors/posts.yaml
menu: { under: acme.content, icon: file-text, order: 2 }
registry.add_nav(NavItem::section("acme.content", "Content").icon("folder").order(10));
registry.add_nav(NavItem::new("acme.reports", "Reports", "/reports").permission("acme.reports"));

Resource::new("/posts", "Posts", list)
    .permission("acme.posts")
    .menu(Placement::new().under("acme.content").icon("file-text").order(2))

ScreenReg::new("/reports", "acme.reports", Arc::new(ReportsScreen))
    .in_menu("Reports")
    .menu(Placement::new().under("acme.content"))
menu keyDefaultDoes
underthe top barThe key of the section the entry sits under.
iconnoneAn icon name from the icon set.
order0Sorts among siblings, lowest first; equal orders sort by label.
after, beforenoneSits right after or before the sibling with that key, whatever the orders say. A resource’s key is resource: and its path (resource:/posts), a screen’s screen: and its path, a contributed item’s its own.
menu: falseMounts the routes with no menu entry.
NavItemDoes
NavItem::new(key, label, path)An entry leading to path under the admin mount.
NavItem::section(key, label)A tab holding entries; it leads to the first one the operator may open.
.icon(name), .order(n), .after(key), .before(key), .under(key), .permission(code)As the menu keys above; permission hides the entry from an operator without it.
BehaviourDoes
PermissionA resource’s entry carries the resource’s permission, a screen’s its own. An operator sees only the entries they may open; a section with none left is gone.
SidebarOn a section’s pages, its entries show in the context sidebar with the current one marked.
BreadcrumbsOn a section’s pages and on settings pages: the tab, then the entry, above the page. A tab’s own page shows none.
Dashboard and SettingsAlways first and last.
The operator’s own orderDragging the tabs in the top bar keeps that order with the operator’s preferences, on every device; “Reset the menu order” on Preferences restores the default. Dashboard and Settings stay put.
KeysA duplicate key, under naming a key nobody declared, or after and before naming no sibling, aborts boot.

Command palette

# descriptors/posts.yaml
palette: acme.posttitles
Resource::new("/posts", "Posts", list).palette("acme.posttitles")
KeyDoes
paletteA registered picker source. The palette finds this resource’s records through it and opens each at its edit page. Absent keeps the records out.
BehaviourDoes
OpeningThe search button in the top bar, or Ctrl+K (Cmd+K). Without scripting the button is /palette, the same finder as a page.
FindingMenu entries and settings the operator may open, by a case-insensitive substring; then records from every resource with a palette source, up to eight each. A blank query lists the pages alone.
KeysUp and Down move, Enter goes, Escape closes.