Skip to content

[WIP] [Brand Refactor] Update SubdomainNavBar - #1402

Draft
danielguillan wants to merge 28 commits into
mainfrom
danielguillan/brand-refactor-update-subdomainnavbar
Draft

[WIP] [Brand Refactor] Update SubdomainNavBar#1402
danielguillan wants to merge 28 commits into
mainfrom
danielguillan/brand-refactor-update-subdomainnavbar

Conversation

@danielguillan

@danielguillan danielguillan commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Updates SubdomainNavBar with the new brand refactor styles and expands its content, search, and responsive navigation capabilities.

Towards https://github.com/github/brand-experience/issues/223

List of notable changes:

  • Updates the default SubdomainNavBar styling with the new gridline design.
  • Adds leadingComponent and trailingComponent content slots.
  • Adds an input search trigger variant, configurable keyboard shortcuts, grouped results, and localized labels.
  • Adds imperative openSearch() and closeSearch() methods.
  • Improves desktop link overflow and focus management.
  • Refines responsive and mobile menu behavior.
  • Updates navigation link hover, focus, current-page, and expanded states.
  • Updates component documentation, tests, stories, and visual snapshots.

What should reviewers focus on?

  • Verify the visual treatment across constrained and full-width layouts, light and dark modes, and open menu and search states.
  • Verify spacing and alignment across desktop, tablet, and mobile.
  • Verify links move into and out of the More menu in order as the available width changes.
  • Verify custom content slots render in the expected position across viewport sizes.
  • Verify search behavior, including trigger variants, keyboard shortcuts, grouped results, localization, and focus management.
  • Verify keyboard and assistive technology navigation when links overflow or the mobile menu contains only custom slot content.
  • Review the new APIs and confirm they cover the expected use cases.

Steps to test:

  1. Open the SubdomainNavBar stories in the Storybook preview.
  2. Review the default, playground, leading and trailing component, input search, grouped results, keyboard shortcut, imperative search API, overflow menu, and mobile stories.
  3. Resize the viewport and verify links move into and out of the More menu in order.
  4. Verify overflowed links are not exposed to keyboard or assistive technology navigation.
  5. Interact with navigation and search using a mouse and keyboard, including opening and closing menus and dialogs, navigating results, and returning focus to the trigger.
  6. Toggle light and dark modes and verify hover, focus, current-page, and expanded states.
  7. Open the docs preview and verify the updated examples and API documentation.

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Desktop navigation

Before After
SubdomainNavBar desktop navigation before the brand refactor SubdomainNavBar desktop navigation after the brand refactor

Search

Before After
SubdomainNavBar search before the brand refactor SubdomainNavBar search after the brand refactor

Mobile menu

Before After
SubdomainNavBar mobile menu before the brand refactor SubdomainNavBar mobile menu after the brand refactor

@changeset-bot

changeset-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 02121b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@primer/react-brand Minor
@primer/brand-primitives Minor
@primer/brand-docs Minor
@primer/brand-css Minor
@primer/brand-e2e Minor
@primer/brand-fonts Minor
@primer/brand-mcp Minor
@primer/brand-config Minor
@primer/brand-storybook Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Design token changes found

View CSS variable changes
+ --brand-SubdomainNavBar-searchDialog-shadowColor: rgba(0, 0, 0, 0.1);
+ --brand-SubdomainNavBar-searchDialog-backdropColor: rgba(0, 0, 0, 0.2);
+ --brand-SubdomainNavBar-searchDialog-shadowColor: rgba(0, 0, 0, 0.1);
+ --brand-SubdomainNavBar-searchDialog-backdropColor: rgba(0, 0, 0, 0.2);

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🟢 Bundle size report

CheckMainBranchChange
UMD — full bundle (JS)101.39 kB103.80 kB⬆️ +2.41 kB (+2.4%)
UMD — full bundle (CSS)66.97 kB68.61 kB⬆️ +1.64 kB (+2.4%)
ESM — full bundle (JS + CSS)1.51 MB1.53 MB⬆️ +19.71 kB (+1.3%)
ESM — tree-shaken simple (Button)69.94 kB71.47 kB⬆️ +1.53 kB (+2.2%)
ESM — tree-shaken complex (ActionMenu)78.83 kB80.34 kB⬆️ +1.51 kB (+1.9%)

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🟢 Unit test coverage changes found

Unit test coverage has been updated through this PR.

Changes: 0 new tests, 0 removed tests, 1 improved, 0 decreased

Component/Hook Statements Functions Branches Change
SubdomainNavBar 71.9% 83.6% 79.4% 93.8% 66.7% 79.1% +14.4%

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

⚠️ Visual differences found

Our visual comparison tests found UI differences.

Please review the differences by using the test artifacts to ensure that the changes were intentional.

Artifacts can be downloaded and reviewed locally.

Download links are available at the bottom of the workflow summary screen.

Example:

artifacts section of workflow run

If the changes are expected, please run npm run test:visual:update to replace the previous fixtures.

Review visual differences

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ed05986d-edce-42e8-8d89-da23c403edda
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ed05986d-edce-42e8-8d89-da23c403edda
Copilot-Session: d277a6ee-e0c6-42d5-9ad8-2eaad758b176
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 406505eb-bef7-46a4-be1a-599ec848f243
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 406505eb-bef7-46a4-be1a-599ec848f243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant