Skip to content

Add nav dropdowns and restyle the mobile menu - #641

Merged
tbantle22 merged 14 commits into
mainfrom
taylor/nav-dropdowns
Oct 6, 2026
Merged

tbantle22 merged 14 commits into
mainfrom
taylor/nav-dropdowns

Conversation

@tbantle22

@tbantle22 tbantle22 commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Library-only groundwork for the Homepage v3 and Navigation designs. No apps touched.

Mobile — the menu scrolls, rows become full-bleed 60px with dividers, and socials move into flow instead of overlapping the last link.

Desktop — dropdown panels that dim the page, either full-bleed or anchored to the trigger. They open on hover or click and underline the open item.

New API — MobileNavDropdown, DesktopNavDropdown, Navbar's leftLinksMobile / mobileActions / mobileAccount / mobileMenuBgColor, and a space-900 token.

Shared nav layout — .left spaces with gap rather than margins on a, .logoLeft stops setting relative on .inner, and .container trades its vertical padding for relative so the row can stretch full height. These reach DoltLab and Workbench too; Chromatic should confirm.

Stories cover each existing consumer's link shape as a regression baseline.

Mobile menu becomes a scrolling sheet of full-bleed 60px rows, with a
nav item that expands in place and a full-width action slot.
Desktop gets a full-bleed dropdown panel with a scrim.

Both dropdown triggers use Btn, since this package's preflight leaves
button backgrounds opaque on purpose.

`.logoLeft` no longer sets `relative` on `.inner`: `.right` is pinned
with `ml-auto` instead, so an absolutely positioned panel anchors to
the header and can span the full page width.

New API: leftLinksMobile, mobileActions, MobileNavDropdown,
DesktopNavDropdown. Stories cover each existing consumer's link shape
as a regression baseline.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tbantle22 tbantle22 added the components Related to changes in components package. label Sep 16, 2026
tbantle22 and others added 7 commits September 16, 2026 15:03
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds align ("full" | "left" | "right"), hideCaret, underlineOnOpen,
openOnHover and triggerClassName to DesktopNavDropdown. The scrim stays
a root child so it always covers the page while an anchored panel hangs
off the trigger instead.

The nav row now stretches to the navbar's full height, so an open item's
underline and an anchored panel both land on its bottom edge. `.left`
spaces with gap rather than margins on `a`, which skipped dropdown
triggers and left the row unevenly spaced.

Panel content no longer forces items-start; the navbar already centers
descendant anchors, which is what simple rows want, and cards set their
own alignment on an inner element.

Adds space-900 (#070F25) for the nav and dropdown ground.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds a mobileAccount slot to Navbar, rendered in its own region between
the links and actions so the 60px row styling never reaches it.

Mobile dropdowns get the design's chevron chip, a bottom border on the
open panel, and no longer impose row styling on panel content: the
`.links` rule skips anything inside [data-nav-panel], so cards and links
keep their own spacing. The story's panel links carry their own classes.

Also centers the mobile top bar's contents vertically, centers the
actions button at 327px from md up, and sets the logo-to-links gap on
the desktop nav to 64px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The social row no longer takes `mt-auto` when actions sit directly above
it, so the Sign in/out button stays at the bottom with the social links
instead of splitting the free space.

A transparent navbar's open mobile menu now falls back to space-900, the
same ground as the opaque navbar, so signed in and signed out match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverts the transparent menu fallback to the themed background-acc-1,
which kept DoltHub navy out of Workbench's menu, and adds
mobileMenuBgColor so a consumer can choose the open menu's ground. The
open menu's sticky top bar now uses that color too, so links scrolling
under it stay hidden.

Stories now cover each prop this PR adds: DesktopNavDropdown's align
(left/right), hideCaret, underlineOnOpen, openOnHover, className,
triggerClassName and controlled isOpen/setIsOpen; MobileNavDropdown's
className and controlled state; and Navbar's mobileAccount and
mobileMenuBgColor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a transparent navbar, the bar over the page stays transparent while
the open menu's sticky bar now takes the menu's color. Adds a test for
menuBgColor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Moderate accessibility and null-override issues remain unresolved.

Review effort: Lite
Findings: None

What changed in this PR

Library-only navigation groundwork for Homepage v3, adding mobile menu enhancements and reusable dropdown APIs.

Changes:

  • Adds configurable mobile navigation content and improved scrolling/layout.
  • Adds mobile and desktop dropdowns with scrim support.
  • Adds color token, exports, tests, and Storybook coverage.
File Description
packages/​components/​src/​tailwind/​theme/​base/​colors.ts Adds the space-900 color token.
packages/​components/​src/​Navbar/​index.tsx Wires new navigation props.
packages/​components/​src/​Navbar/​ForMobile/​NavDropdown.tsx Implements mobile dropdown behavior.
packages/​components/​src/​Navbar/​ForMobile/​NavDropdown.module.css Styles mobile dropdowns.
packages/​components/​src/​Navbar/​ForMobile/​index.tsx Integrates mobile navigation content.
packages/​components/​src/​Navbar/​ForMobile/​index.module.css Restyles and enables mobile menu scrolling.
packages/​components/​src/​Navbar/​ForDesktop/​NavDropdown.tsx Implements desktop dropdown behavior.
packages/​components/​src/​Navbar/​ForDesktop/​NavDropdown.module.css Styles desktop panels and scrims.
packages/​components/​src/​Navbar/​ForDesktop/​index.module.css Updates desktop layout and anchoring.
packages/​components/​src/​index.ts Exports the new dropdown components.
packages/​components/​src/​__tests__/​Navbar.test.tsx Extends mobile navigation tests.
packages/​components/​src/​__stories__/​MobileNavbar.stories.tsx Adds mobile stories.
packages/​components/​src/​__stories__/​DesktopNavDropdown.stories.tsx Adds desktop dropdown stories.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tbantle22
tbantle22 marked this pull request as ready for review October 5, 2026 23:05
tbantle22 and others added 3 commits October 6, 2026 10:11
Also switches the desktop dropdown story to bg-space-900; its comment
said the colour was not in the palette, which stopped being true when
this branch added the token.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tbantle22 tbantle22 changed the title Add nav dropdowns and restyle mobile menu Add nav dropdowns and restyle the mobile menu Oct 6, 2026
tbantle22 and others added 3 commits October 6, 2026 13:22
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DoltHub was its only consumer and no longer needs it now that its navbar
is always opaque. The open menu's sticky bar still takes the menu's
color.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@eric-richardson1 eric-richardson1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tbantle22
tbantle22 merged commit 6290061 into main Oct 6, 2026
5 checks passed
@tbantle22
tbantle22 deleted the taylor/nav-dropdowns branch October 6, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components Related to changes in components package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants