New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for nesting and collapsing sidebar groups #8218
The head ref may contain hidden characters: "dx-1242/sidebar-\u{1FABA}"
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Managed to test implement the sidebar redesign with these changes
Description (required)
Updates our utility function mapping our
nav.ts
files to Starlight’s sidebar config shape to support nesting and collapsing groups.Syntax
Nesting/collapsing is controlled from
src/i18n/en/nav.ts
. Other languages continue to work the same way, providing just the key–value mapping of translations.Each heading (entries with
header: true
) can be marked as a nested group by addingnested: true
.Each heading (entries with
header: true
) can be marked as collapsed by default by addingcollapsed: true
.I took a few shortcuts to keep this simple, which means nested groups have to be at the end of their containing group, i.e. the following is possible:
But this is not:
Based on what I’ve seen so far, that seemed to align with intended usage, but let me know if it’s not!