feat(navigation): add NavSection Holocene component#3263
Open
KATIETOLER wants to merge 14 commits intomainfrom
Open
feat(navigation): add NavSection Holocene component#3263KATIETOLER wants to merge 14 commits intomainfrom
KATIETOLER wants to merge 14 commits intomainfrom
Conversation
Add nav-group.svelte to the Holocene design system. It accepts a
NavLinkListItem[] and renders NavigationItems with no wrapper element,
keeping items directly inside the parent role="list" container.
Wire it into the cloud nav path via a navContent snippet prop on
side-nav.svelte. When isCloud && navContent, the snippet renders
instead of the inline {#each} loop. The OSS nav path is unchanged —
it falls through to the existing loop as before.
This enables the cloud nav to compose multiple NavGroup instances
with other elements interleaved between them, which was not possible
with the single {#each} loop approach.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Alex-Tideman
reviewed
Apr 1, 2026
Alex-Tideman
reviewed
Apr 1, 2026
Alex-Tideman
reviewed
Apr 1, 2026
Remove the isCloud guard in side-nav.svelte so both OSS and cloud nav use the navContent snippet path. Split linkList at its divider into two derived arrays and render them as separate NavGroups with an explicit <hr> between them. This gives callers independent control over each section without needing divider sentinels in the item arrays.
NavGroup only renders link items, not dividers, so typing navItems as NavLinkListItem[] was too broad and required an isNavLinkItem guard inside the template. - Export NavLinkItem from global.ts - Update NavGroup prop to NavLinkItem[], drop the type guard - Filter linkListForFirstGroup/Second with isNavLinkItem so the derived slices satisfy the narrower type
Alex-Tideman
reviewed
Apr 1, 2026
Alex-Tideman
reviewed
Apr 1, 2026
Replace the single getLinkList function (which used a divider sentinel to communicate group boundaries) with two explicit functions: getNavPrimaryLinks and getNavSecondaryLinks. - Remove NavDividerItem type and the divider sentinel item - NavLinkListItem is now just an alias for NavLinkItem - Divider rendering moves to the navContent snippet in the layout, where it belongs as a presentational concern - Drop isNavLinkItem filter from derived values — no longer needed since both functions return NavLinkItem[] directly
Replace the flat linkList + navContent snippet pattern with a
typed sections array. SideNavigation now owns divider logic.
- Rename nav-group.svelte -> nav-section.svelte
- SideNavigation accepts sections: NavLinkItem[][] instead of
linkList + navContent snippet
- Dividers rendered between sections, never after the last one
- Remove duplicate linkListForFirstGroup derived in layout
- Layout passes sections={[linkList, linkListForSecondGroup]}
Alex-Tideman
reviewed
Apr 2, 2026
Alex-Tideman
reviewed
Apr 2, 2026
Alex-Tideman
approved these changes
Apr 3, 2026
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.
Adds a NavGroup component to the Holocene design system so the cloud nav can compose independent groups of
nav items — enabling other elements to be placed between groups without modifying the OSS nav.
menu
instead of the inline {#each} loop; OSS path is completely unchanged
SideNavigation, replacing separate linkList/secondaryLinkList props; migrate both components to Svelte 5
and render sections via NavSection with auto-inserted dividers