[Brand Refactor] Update SubdomainNavBar - #1402
Open
danielguillan wants to merge 39 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed05986d-edce-42e8-8d89-da23c403edda
🦋 Changeset detectedLatest commit: f2995a4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
Contributor
🔍 Design token changes foundView CSS variable changes+ --brand-SubdomainNavBar-color-link-bgColor: var(--base-color-scale-gray-1);+ --brand-SubdomainNavBar-searchDialog-shadowColor: rgba(0, 0, 0, 0.1);+ --brand-SubdomainNavBar-searchDialog-backdropColor: rgba(0, 0, 0, 0.2);+ --brand-SubdomainNavBar-color-link-bgColor: var(--base-color-scale-gray-6);+ --brand-SubdomainNavBar-searchDialog-shadowColor: rgba(0, 0, 0, 0.1);+ --brand-SubdomainNavBar-searchDialog-backdropColor: rgba(0, 0, 0, 0.2); |
Contributor
🟢 Bundle size report
|
Contributor
🟢 Unit test coverage changes foundUnit test coverage has been updated through this PR. Changes: 0 new tests, 0 removed tests, 1 improved, 0 decreased
|
danielguillan
temporarily deployed
to
github-pages
July 15, 2026 13:36 — with
GitHub Actions
Inactive
Contributor
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
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
danielguillan
temporarily deployed
to
github-pages
July 15, 2026 14:44 — with
GitHub Actions
Inactive
danielguillan
temporarily deployed
to
github-pages
July 22, 2026 12:31 — with
GitHub Actions
Inactive
danielguillan
temporarily deployed
to
github-pages
July 22, 2026 12:57 — with
GitHub Actions
Inactive
Copilot-Session: b04cad85-7688-4c6f-96b3-47c4e6233c2b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7d918370-0eb2-4a77-b692-e6b8b4d0d65e
danielguillan
temporarily deployed
to
github-pages
August 5, 2026 13:21 — with
GitHub Actions
Inactive
…nnavbar Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 085743ed-8a5d-4c4f-a0db-260a81dcf121
danielguillan
marked this pull request as ready for review
August 6, 2026 07:37
danielguillan
temporarily deployed
to
github-pages
August 6, 2026 07:40 — with
GitHub Actions
Inactive
There was a problem hiding this comment.
Pull request overview
Updates SubdomainNavBar to the brand-refactor visual style while expanding layout, search, and responsive navigation capabilities in the @primer/react-brand component library.
Changes:
- Refactors layout/styling (gridline design), adds
leadingComponent/trailingComponent, and introduces an imperative search ref API. - Reworks search UX (input-style trigger, keyboard shortcut config, grouped results, localized labels) and desktop overflow behavior (More menu + focus management).
- Updates supporting assets: docs, stories, unit tests, visual tests, E2E snapshot generation, and design tokens.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/SubdomainNavBar/useVisibilityObserver.ts | Replaces IntersectionObserver-based link visibility with measurement + ResizeObserver logic. |
| packages/react/src/SubdomainNavBar/SubdomainNavBarLinkContext.ts | Adds context for overflow state and link-click handling across visible/overflow menus. |
| packages/react/src/SubdomainNavBar/SubdomainNavBar.visual.spec.ts | Expands visual coverage for new stories and states (overflow, grouped results, mobile slot-only menu). |
| packages/react/src/SubdomainNavBar/SubdomainNavBar.tsx | Main component refactor: new slots, search API/UX, overflow accessibility behavior, and responsive updates. |
| packages/react/src/SubdomainNavBar/SubdomainNavBar.test.tsx | Adds extensive unit coverage for new behaviors (overflow, keyboard shortcuts, ref API, slots, dialog behavior). |
| packages/react/src/SubdomainNavBar/SubdomainNavBar.stories.tsx | Adds/updates Storybook stories to demonstrate new APIs and responsive behaviors. |
| packages/react/src/SubdomainNavBar/SubdomainNavBar.module.css.d.ts | Updates CSS module typings for new/removed classnames. |
| packages/react/src/SubdomainNavBar/SubdomainNavBar.module.css | Major style updates for gridline design, responsive layout, overflow menu, and search dialog. |
| packages/react/src/SubdomainNavBar/NavigationVisbilityObserver.tsx | Reworks desktop overflow measurement and introduces anchored overflow menu positioning and focus handling. |
| packages/e2e/scripts/playwright/playwright.generate-tests.ts | Adds per-story viewport/timeout/before-screenshot hooks for more reliable visual snapshots. |
| packages/design-tokens/src/tokens/functional/components/subdomain-nav-bar/colors.js | Adds token values for search dialog shadow/backdrop colors. |
| apps/next-docs/content/components/SubdomainNavBar/index.mdx | Updates documentation to match new props, search model, and accessibility guidance. |
| .changeset/tasty-cameras-search.md | Minor changeset documenting new slots, search APIs, and overflow behavior + token changes. |
| .changeset/quiet-pills-align.md | Patch changeset for desktop navigation pill state styling updates. |
Review details
- Files reviewed: 13/42 changed files
- Comments generated: 4
- Review effort level: Lite
danielguillan
temporarily deployed
to
github-pages
August 6, 2026 07:52 — with
GitHub Actions
Inactive
danielguillan
temporarily deployed
to
github-pages
August 6, 2026 08:05 — with
GitHub Actions
Inactive
danielguillan
temporarily deployed
to
github-pages
August 6, 2026 08:37 — with
GitHub Actions
Inactive
danielguillan
had a problem deploying
to
github-pages
August 6, 2026 12:52 — with
GitHub Actions
Failure
danielguillan
had a problem deploying
to
github-pages
August 6, 2026 14:03 — with
GitHub Actions
Failure
danielguillan
had a problem deploying
to
github-pages
August 6, 2026 14:32 — with
GitHub Actions
Failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates
SubdomainNavBarwith 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:
SubdomainNavBarstyling with the new gridline design.leadingComponentandtrailingComponentcontent slots.openSearch()andcloseSearch()methods.What should reviewers focus on?
Steps to test:
SubdomainNavBarstories in the Storybook preview.Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots:
Desktop navigation
Search
Mobile menu