-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
feat(theme): add versions
attribute to docsVersionDropdown
navbar item
#10852
base: main
Are you sure you want to change the base?
Conversation
…ionDropdown" navbar item
…rsionDropdown" navbar item
…sVersionDropdown" navbar item
Hi @hrumhurum! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
…ration of "docsVersionDropdown" navbar item
…ion of "docsVersionDropdown" navbar item
…"docsVersionDropdown" navbar item
…"docsVersionDropdown" navbar item
…on docs of "docsVersionDropdown" navbar item
…gurations in "docsVersionDropdown" navbar item
…ions in "docsVersionDropdown" navbar item
…navbar item: code refactoring
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.
The feature works thanks 👍
But I'd like a few things changed
packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx
Outdated
Show resolved
Hide resolved
packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx
Outdated
Show resolved
Hide resolved
versions
attribute to docsVersionDropdown
navbar item
versions
attribute to docsVersionDropdown
navbar itemversions
attribute to docsVersionDropdown
navbar item
…m: inline options schema
… the versioning guide
…m: cleaned up reference docs
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.
Still think we shouldn't include the "version name/label shortcut" in this PR, and discuss it independently in another proposal.
Let me know if you can simplify your code, otherwise I'll do it
packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx
Outdated
Show resolved
Hide resolved
packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx
Outdated
Show resolved
Hide resolved
…m: changed title of the added section
…m: use version names only
…m: tests for new options
…m: simplified code
Motivation
Fix #10833
The
docsVersionDropdown
navbar item supports a newversions
attribute to filter/whitelist displayed versions. Only the provided versions will be displayed.Example:
Also gives the ability to override version attributes (for now, only display
label
) by providing an object.Test Plan
Test links
Deploy preview: https://gp-temp-docusaurus-app1.netlify.app/eazfuscator.net