Repository navigation
v1.38.0: a phone menu built for thumbs
A phone menu built for thumbs, clearer names for three navigation components, and defaults that match how the site runs its own. One component is removed and three defaults moved, so read Before you upgrade first.
Before you upgrade
-
Nav is removed. It was deprecated in favour of
SiteHeader, which does everything it did and adds section menus, a sticky blur and a drawer for narrow screens. Replace<Nav>with<SiteHeader>; its old docs, markdown, schema and registry URLs redirect to Site header's. -
AppSidebar and AppLayout have new defaults.
subNavnow defaults topanel(an 80px rail naming each destination under its icon, with sub-items in a side panel), andlayouttoinset(the content in a raised surface beside the rail). For the old look, passsubNav="accordion"andlayout="flush". -
SiteHeader's tint arrives sooner.
tintAfternow defaults to0, so the tint behind the stuck bar fades in with the first pixel of scroll, and faster. PasstintAfter={48}for the old timing. -
Two components have clearer names. The old names still import, as deprecated aliases with the same props, so nothing breaks today; move to the new names when you can:
NavListis nowSideNavSidebarPanelis nowSubNavPanel
Each alias keeps its old base class (
ds-nav-list,ds-sidebar-panel) beside the new one, but the old modifier and element classes are gone: a rule written againstds-nav-list__rowmoves tods-side-nav__row. SubNavPanel's width hook keeps working under its old name,--ds-sidebar-panel-width.
New
- DrillMenu, a menu for phones. One level at a time, rows a thumb tall with an optional icon, a second line, a current value or a chosen mark, and a back row naming where it returns to. It opens on the level that holds the current page, so a reader deep in a section reopens it where they are.
drillMenuPathTotells a host where it will open. - SiteHeader's drawer drills in. On a phone it fills the screen as a solid sheet clear of the notch and the home indicator; on a tablet it is a 320px glass panel. Sections drill into their pages,
drawerEntriesadd rows and groups after them,drawerHeadersits above the first level anddrawerFooteris pinned at its foot on the first level only. The close always sits inside the panel.drawerBackLabelanddrawerOverviewLabellocalise the menu's own text. - AppSidebar's phone drawer drills in too, full screen, with
drawerTopEntries,drawerBottomEntriesand a full-widthfooterAction. An item can carry avalue(a setting's current choice), and its sub-items can carry adescription, aniconandselected, so a setting opens its choices in the side panel.drawerBackLabelanddrawerOverviewLabelmatch SiteHeader's. - IconButton takes
glass, as Button does, for a button on a busy ground such as a map or a chart.
Fixed
- AppSidebar's collapsed rail handles a long nav. The rows scroll above the profile with a fade at the end that has more, the last row stops clear of the avatar, and a short divider marks each group break where the expanded rail names it.
- A node given as an AppSidebar item's
icon(a swatch, a mark) sits on the same axis as the glyphs, and a row's value sits level with its label and chevron. - SideNav draws each row as one shape: a row with children no longer has a separate toggle with a hover pill of its own.
npm install rift-ds@1.38.0