Repository navigation
[Docs] Adds a *NEW* badge to side nav items that are new - #3283
Conversation
There was a problem hiding this comment.
isNew works. As an alternative. We could use dateIntroduced or something, and then check last 60 days or something. It would only work against the build time (which is fine), but might be a neat little log over time. At least then you wouldn't have to manually change them.
Code looks good to me. Anyways, just a suggestion. I'm fine either way.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_3283/ |
Yeah that would be pretty cool. I think for now, at least this gets us the look/placement of the badge. We can certainly modify how it gets populated down the line. |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_3283/ |
This is still a very manual process (it's not automatic with releases) but...
When there is a new component added to the docs, you can now add the key
isNew: trueto the sections object (just below thetitlein the_example.jsfiles). This will add the pink NEW badge in the side nav.Here are examples of the different states including truncation.
Also
I had to fix EuiSideNavItem's to pass down
classNameon both itself and the icon otherwise custom classNames were getting overridden/ignored. Fixes part of #2380Checklist
[ ] Props have proper autodocs[ ] Added documentation examples[ ] Added or updated jest tests[ ] Checked for breaking changes and labeled appropriately[ ] Checked for accessibility including keyboard-only and screenreader modes