-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
fix(theme-classic): autocollapse sidebar categories when navigating with paginator #7411
Conversation
Auto collapse sidebar categories when navigating via paginator.
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
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.
Thanks for the fix! The paginator navigation issue seems resolved, but now, when you are in a category: https://deploy-preview-7411--docusaurus-2.netlify.app/docs/advanced/plugins/, the entire category (Advanced Guides) is not collapsible, which seems like bad UX to me. Could you take a look?
@Josh-Cena Collapse button should be fine now, however one unintended change I see, if we click on non-category item it collapses previously opened category which used to be open prior to this change. |
packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category.tsx
Outdated
Show resolved
Hide resolved
I noticed that as well. If you can manage to fix it it would be neat, otherwise I'll take a look later |
Actually, it's because the fix is going in the wrong direction. We have two way to uncollapse a category: the "imperative" way through |
Co-authored-by: Joshua Chen <[email protected]>
@Josh-Cena now the behaviour seems correct. |
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.
Thanks!
Easier than I thought 😄
Pre-flight checklist
Motivation
Auto collapse sidebar categories when navigating via paginator. Trying to fix #7387
Test Plan
Test links
Deploy preview: https://deploy-preview-7411--docusaurus-2.netlify.app/
Related issues/PRs
#7387