-
Notifications
You must be signed in to change notification settings - Fork 244
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
Upgrade Docusaurus for new mobile UX #515
Conversation
✔️ Deploy Preview for mystifying-fermi-1bc096 ready! 🔨 Explore the source changes: 97bc99a 🔍 Inspect the deploy log: https://app.netlify.com/sites/mystifying-fermi-1bc096/deploys/60ef23d16413ba000740bcdf 😎 Browse the preview: https://deploy-preview-515--mystifying-fermi-1bc096.netlify.app |
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.
@sw-yx I think both items reported in your video feedback (facebook/docusaurus#4273 (comment)) have been fixed.
Let me know if you see anything weird left.
If you see other issues regarding "active sidebar items", it's probably worth opening a new issue
@@ -73,6 +88,14 @@ function DocItem(props) { | |||
</span> | |||
</div> | |||
)} | |||
|
|||
{renderTocMobile && ( | |||
<TOCCollapsible |
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.
@@ -44,7 +44,7 @@ module.exports = { | |||
}, | |||
{ | |||
to: "/application-development", | |||
activeBasePath: "/application-development", | |||
activeBaseRegex: "(/application-development)|(/docs/(go|java|php|node))", |
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.
@sw-yx this permits to have the "SDKs" dropdown item to be highlighted when browsing any of the 4 SDKs. Docusaurus can't guess about those SDKs by itself, it just sees a regular page.
New mobile collapsible auto-expansion implemented in facebook/docusaurus#5168:
(seen after navigating back to main sidebar menu)
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.
thats so smart! I never thought to use it like that.
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.
this looks great!! thank you so much for the fix!
thanks for deploying, should help capture last edge cases 🤪 Actually just found one, and you'll want to backport these changes in your swizzled DocItem: facebook/docusaurus#5172 |
What does this PR do?
Handle feedbacks from @sw-yx.
Also updates the swizzled DocItem so that it renders the new mobile collapsible TOC