feat: add centerButton, menuButton, linksContent snippets and bars icon to BottomNavigation#3473
Open
rossnelson wants to merge 4 commits into
Open
feat: add centerButton, menuButton, linksContent snippets and bars icon to BottomNavigation#3473rossnelson wants to merge 4 commits into
rossnelson wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
@copilot resolve the merge conflicts in this pull request |
|
|
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 & motivation 💭
Adds customization hooks to
BottomNavigationfor consumers that need to override the default mobile nav bar sections. All new props are optional and fall back to existing behavior when not provided, so this remains backward-compatible.The merged implementation keeps
BottomNavigationaligned with the currentlinksSnippet-based mobile nav API frommainwhile preserving the new customization points introduced in this PR.New snippet props on
BottomNavigation:menuButton?: Snippet<[{open, onClick}]>— replaces the default left menu/logo buttoncenterButton?: Snippet<[{open, onClick}]>— replaces the default namespace-switcher center sectionlinksContent?: Snippet<[{open, closeMenu}]>— replaces the default mobile links panel contentNew holocene icon:
bars— three-line hamburger menu icon, consistent with thefilter-linesicon styleScreenshots (if applicable) 📸
N/A
Design Considerations 🎨
No design changes beyond exposing existing mobile nav areas as optional snippet overrides.
Testing 🧪
How was this tested 👻
Validated with:
node_modules/.bin/prettier --check src/lib/components/bottom-nav.sveltecorepack pnpm checkAttempted targeted Playwright integration coverage for mobile navigation, but the configured web server failed to start in this environment before tests executed.
Steps for others to test: 🚶🏽♂️🚶🏽♀️
BottomNavigationwithout the new snippet props and confirm the default mobile nav behavior is unchanged.menuButtonand verify it renders in place of the default left button.centerButtonand verify it renders in place of the namespace switcher area.linksContentand verify it renders in place of the default mobile links panel content.<Icon name="bars" />and confirm the hamburger icon appears correctly.Checklists
Draft Checklist
mainlinksSnippetAPIMerge Checklist
Docs
Any docs updates needed?
No docs updates needed.