Skip to content

feat: Add expandable-icon-end to collapsible side navigation - #4843

Open
jkuelz wants to merge 4 commits into
mainfrom
dev-v3-jkuelz-side-nav-icon-layout
Open

feat: Add expandable-icon-end to collapsible side navigation#4843
jkuelz wants to merge 4 commits into
mainfrom
dev-v3-jkuelz-side-nav-icon-layout

Conversation

@jkuelz

@jkuelz jkuelz commented Jul 29, 2026

Copy link
Copy Markdown
Member

Description

Adjusts the layout of the collapsible SideNavigation variant based on whether icons are present. When any nav item has an icon, the layout adapts: item spacing widens (separate PR #4831), the expand caret moves to the inline-end, and rows get a full-width hover background. Caret moves to end of the row to not clutter the left side when there are icons present, and hover is added to connect the caret and the text. Added an internal __expandIconPosition to the ExpandableSection component which is then used in SideNav.

Also included:

  • Fix: ExpandableSection's disableContentPaddings: Now removes content padding for all variants, not just container (other variants also have default content padding); API description corrected accordingly.
  • New design token: colorBackgroundSideNavigationItemIconHover -- it is a known issue that the hover token's dark 1T value isn't fully reference-token-themeable (won't track a primary-color change) — proper fix needs an alpha palette derived from primary, which is a larger change.
  • One-theme section headers: removed the section-header-specific typography overrides so section headers inherit the footer default (16px/500), to distinguish them from active expandable-link-groups.

Related links, issue #, if available: n/a

How has this been tested?

Dev pipeline (dev-v3-jkuelz)

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

jkuelz added 2 commits July 28, 2026 19:08
Add internal __expandIconPosition ('start' | 'end', default 'start') to
InternalExpandableSection. When 'end', the expand caret is DOM-reordered
to the inline-end (preserving focus order for accessibility) across all
variants; the outside-header caret (container and default-with-actions)
renders as an accessible button. Default 'start' behavior is unchanged
and there is no public API change (internal __-prefixed prop).

Groundwork for the side-navigation icon layout. Note: the navigation
variant now wraps its header text in a span (styled only in the end
layout), a minor DOM change for that side-nav-only variant.
 When any nav item has an icon, SideNavigation switches to an icon layout: the expand caret moves to the inline-end, item spacing widens, and rows get a full-width hover background. Consumes the existing withIcons signal and threads the internal __expandIconPosition to the Section and ExpandableLinkGroup expandable headers.

Also fixes ExpandableSection's  to remove content padding for all variants (previously only , despite other variants having default content padding) and corrects its docs. Adds a colorBackgroundSideNavigationItemIconHover design token.
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.63%. Comparing base (e9c0c76) to head (feadac4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4843   +/-   ##
=======================================
  Coverage   97.63%   97.63%           
=======================================
  Files         957      957           
  Lines       31097    31132   +35     
  Branches    11434    11461   +27     
=======================================
+ Hits        30361    30396   +35     
+ Misses        729      689   -40     
- Partials        7       47   +40     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jkuelz jkuelz changed the title feat: Add automatic icon layout to collapsible side navigation feat: Add expandable-icon-end to collapsible side navigation Jul 29, 2026
@jkuelz
jkuelz requested a review from mxschll July 29, 2026 03:42
@jkuelz
jkuelz marked this pull request as ready for review July 29, 2026 03:42
@jkuelz
jkuelz requested a review from a team as a code owner July 29, 2026 03:42
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