Skip to content

fix(nav): consistent gap and heading text sizes - #616

Merged
cixzhang merged 1 commit into
mainfrom
navi/fix/nav-nits
Mar 14, 2026
Merged

cixzhang merged 1 commit into
mainfrom
navi/fix/nav-nits

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Summary

Two visual consistency fixes for TopNav and SideNav heading.

TopNav gap consistency

endContent and rightSection used --spacing-2 (8px) gap while startContent and centerContent used --spacing-1 (4px). Now all use 4px.

SideNav heading text size

SideNav heading was 14px (--text-base) while TopNav heading was 16px (--text-lg). They should match. Now:

  • Default: 16px — matches TopNavHeading
  • With super/sub headings: scales to 14px — tighter when there are multiple text lines

Test plan

  • yarn test — 91 files, 1466 tests passing ✅

Part of #565

- TopNav: endContent and rightSection gap 8px → 4px to match
  startContent and centerContent
- SideNavHeading: heading text size 14px → 16px (--text-lg) to
  match TopNavHeading. Scales back to 14px (--text-base) when
  superheading or subheading is present.

Part of #565
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 14, 2026
@github-actions

github-actions Bot commented Mar 14, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

SideNav · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A 711B N/A
Lines of Code N/A 838 -
Complexity N/A Very High (74) -
TopNav · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A 675B N/A
Lines of Code N/A 973 -
Complexity N/A Very High (50) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 9.4KB 15.1KB 2.4KB

Accessibility Audit

Status: 1 accessibility violation(s) found — 1 serious.

XDSSideNav - 1 issue(s)
  • 🟠 serious: Ensure links have discernible text
    • Rule: link-name · Affects 1/8 stories · Learn more
    • WCAG: 2.4.4, 4.1.2 (Level A)

Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang
cixzhang merged commit e29af2f into main Mar 14, 2026
13 checks passed
@cixzhang
cixzhang deleted the navi/fix/nav-nits branch March 14, 2026 04:07
This was referenced Mar 14, 2026
cixzhang added a commit that referenced this pull request Apr 26, 2026
- TopNav: endContent and rightSection gap 8px → 4px to match
  startContent and centerContent
- SideNavHeading: heading text size 14px → 16px (--text-lg) to
  match TopNavHeading. Scales back to 14px (--text-base) when
  superheading or subheading is present.

Part of #565
cixzhang added a commit that referenced this pull request Jun 21, 2026
- TopNav: endContent and rightSection gap 8px → 4px to match
  startContent and centerContent
- SideNavHeading: heading text size 14px → 16px (--text-lg) to
  match TopNavHeading. Scales back to 14px (--text-base) when
  superheading or subheading is present.

Part of #565
cixzhang added a commit that referenced this pull request Jun 21, 2026
- TopNav: endContent and rightSection gap 8px → 4px to match
  startContent and centerContent
- SideNavHeading: heading text size 14px → 16px (--text-lg) to
  match TopNavHeading. Scales back to 14px (--text-base) when
  superheading or subheading is present.

Part of #565
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant