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
Alphabetize documentation sidenav elements #5080
Conversation
…ation.yaml This reverts commit 52a8775.
side-navigation.yaml
Outdated
url: /docs/base/typography | ||
- title: Paper background | ||
url: /docs/base/paper | ||
ordering: alphabetical |
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.
Would it work if we move ordering
up one level (alongside heading
and subheadings
, to avoid additional nesting level of items
)?
Just a little question/suggestion on the yaml structure, but otherwise great idea. Thanks for the sort implementation. |
side-navigation.yaml
Outdated
@@ -106,6 +108,7 @@ | |||
url: /docs/patterns/tabs | |||
- title: Tooltips | |||
url: /docs/patterns/tooltips | |||
ordering: alphabetical |
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.
Small thing, but I'd suggest moving ordering
up under heading
, so it's clearer what it applies to.
So like:
- heading: Components
ordering: alphabetical
subheadings:
…
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.
Ordering has been moved accordingly @bartaz
c1fe3ca
to
590c9d1
Compare
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.
Thanks a lot, this is a great improvement!
Done
@bartaz noticed today that the ordering of items in the side-nav is not alphabetical (as he was expecting it to be). This PR alphabetizes the sidenav items by title using Python, hopefully eliminating the tech debt of manually ensuring the nav items are alphabetized and preventing this sort of issue from arising in the future.
This is configurable in
side-navigation.yaml
so that only nav items withordering: alphabetical
have their subheadings sorted (since there are still some cases where we want fine-grain control over subheading order, such as "Welcome".This results in a few changes to the sidenav ordering vs our current setup:
Closes WD-11052
QA
Check if PR is ready for release
If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:
Feature 🎁
,Breaking Change 💣
,Bug 🐛
,Documentation 📝
,Maintenance 🔨
.package.json
should be updated relative to the most recent release, following semver convention: