-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
[2.x] Improved navigation group label generation #1576
[2.x] Improved navigation group label generation #1576
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## improved-navigation-internals #1576 +/- ##
=================================================================
Coverage 100.00% 100.00%
- Complexity 1762 1763 +1
=================================================================
Files 184 184
Lines 4776 4772 -4
=================================================================
- Hits 4776 4772 -4 ☔ View full report in Codecov by Sentry. |
We don't have all the context at this point
Can allow us to have two states, one pretty for labels, and one normalized internal one
6af6764
to
7fd874e
Compare
9c36bbc
to
9ab9700
Compare
385445f
to
bb46d13
Compare
PR Summary
|
It may violate the principle of least astonishment to always format the label. If the user manually creates a NavItem as
|
648d3cd
to
bb46d13
Compare
This reverts commit b7e8588 as a group without a title indicates an issue that should be thrown.
There is no reason to expect things like "index" to be a dropdown group. Posts maybe, if for some reason a user wants to list all posts in a dropdown but at that point they need to make other changes so I see no reason to have an extra line for something so uncommon.
65d87e1
to
0e55c2b
Compare
This targets v2.x via #1568 and picks up the idea behind #1575
This PR makes improvements to how navigation group labels are generated
This PR makes improvements to how navigation item labels are generated. The biggest change which could be breaking is that all labels are now formatted. So if you create a navigation item with the label "foo" it will now be normalized to "Foo". This may be opinionated, but considering that we do the same for page titles, why should this be different?