feat: Add expandable-icon-end to collapsible side navigation - #4843
Open
jkuelz wants to merge 4 commits into
Open
feat: Add expandable-icon-end to collapsible side navigation#4843jkuelz wants to merge 4 commits into
jkuelz wants to merge 4 commits into
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
jkuelz
marked this pull request as ready for review
July 29, 2026 03:42
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.
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
__expandIconPositionto the ExpandableSection component which is then used in SideNav.Also included:
disableContentPaddings: Now removes content padding for all variants, not just container (other variants also have default content padding); API description corrected accordingly.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.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
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.