Skip to content

v1.38.0: a phone menu built for thumbs

Choose a tag to compare

@robritacca-dotcom robritacca-dotcom released this 26 Nov 00:44
· 55 commits to main since this release

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. subNav now defaults to panel (an 80px rail naming each destination under its icon, with sub-items in a side panel), and layout to inset (the content in a raised surface beside the rail). For the old look, pass subNav="accordion" and layout="flush".

  • SiteHeader's tint arrives sooner. tintAfter now defaults to 0, so the tint behind the stuck bar fades in with the first pixel of scroll, and faster. Pass tintAfter={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:

    • NavList is now SideNav
    • SidebarPanel is now SubNavPanel

    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 against ds-nav-list__row moves to ds-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. drillMenuPathTo tells 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, drawerEntries add rows and groups after them, drawerHeader sits above the first level and drawerFooter is pinned at its foot on the first level only. The close always sits inside the panel. drawerBackLabel and drawerOverviewLabel localise the menu's own text.
  • AppSidebar's phone drawer drills in too, full screen, with drawerTopEntries, drawerBottomEntries and a full-width footerAction. An item can carry a value (a setting's current choice), and its sub-items can carry a description, an icon and selected, so a setting opens its choices in the side panel. drawerBackLabel and drawerOverviewLabel match 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