Skip to content

feat(theme-classic): dynamic navbar item status - #5360

Closed
Josh-Cena wants to merge 8 commits into
meta:mainfrom
Josh-Cena:navbar-item-activation
Closed

Josh-Cena wants to merge 8 commits into
meta:mainfrom
Josh-Cena:navbar-item-activation

Conversation

@Josh-Cena

@Josh-Cena Josh-Cena commented Aug 14, 2021 •

Copy link
Copy Markdown
Collaborator

Motivation

Resolve #4389, wrote some code so we have something solid to discuss on. The API design currently is probably raw, more polishing welcome.

Have you read the Contributing Guidelines on pull requests?

Yep

Test Plan

Dogfooded on our website. Go to https://deploy-preview-5360--docusaurus-2.netlify.app/tests/docs and see the navbar changing.

Considerations

  • Should we allow logical composition? (AND, OR) With current three-state system it's not possible, so we may have to handle disabled differently if we want to compose multiple strategies
  • How do we handle SSR? I tried to minimize layout shifts as much as possible by choosing a default display status, is there an API to get the final route for any page so that we can know the route in server side inside of using window.location.pathname?
  • Naming: I don't particularly like the name strategy, we should have a better API for this

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 14, 2021
@netlify

netlify Bot commented Aug 14, 2021 •

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 14, 2021 •

Copy link
Copy Markdown

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 84
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5360--docusaurus-2.netlify.app/

@Josh-Cena
Josh-Cena force-pushed the navbar-item-activation branch 2 times, most recently from cb9cb9b to 6248369 Compare August 15, 2021 08:22
@Josh-Cena
Josh-Cena marked this pull request as draft August 17, 2021 05:40
@Josh-Cena
Josh-Cena force-pushed the navbar-item-activation branch from 6248369 to a35b2a6 Compare August 26, 2021 12:36
@Josh-Cena
Josh-Cena force-pushed the navbar-item-activation branch from 7adab7e to ea19d0c Compare September 19, 2021 10:05
@Josh-Cena
Josh-Cena force-pushed the navbar-item-activation branch from ea19d0c to 0ae9fb7 Compare October 22, 2021 07:56
@Josh-Cena Josh-Cena added the pr: new feature This PR adds a new API or behavior. label Oct 30, 2021
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
@Josh-Cena
Josh-Cena force-pushed the navbar-item-activation branch from b1df3c2 to 0b8a4c4 Compare November 20, 2021 09:16
@Josh-Cena

Copy link
Copy Markdown
Collaborator Author

Closing because of too much conflict & we probably won't work on it any time soon. Revisiting when we have more time

@Josh-Cena Josh-Cena closed this Jan 8, 2022
@Josh-Cena
Josh-Cena deleted the navbar-item-activation branch January 8, 2022 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic navbar: navbar item activation strategies

2 participants