-
-
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
fix(v2): hide mobile collapsible doc toc if no headings #5172
Conversation
✔️ [V2] 🔨 Explore the source changes: b634af1 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60efe3b5907db8000853bb53 😎 Browse the preview: https://deploy-preview-5172--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5172--docusaurus-2.netlify.app/ |
Size Change: -484 B (0%) Total Size: 850 kB
ℹ️ View Unchanged
|
Of course, it's perfectly all right, why not? The user will probably realize that if there is no collapsible element, then there is no TOC for that page. |
ok let's keep it that way then ;) |
sorry @slorber didn't see this message til now - i personally would have voted the opposite way, when there is no TOC, dont show the component. not a big deal but thats my preference, if its useless dont show it |
@sw-yx it's what I did with this PR, just upgrade/reswizzle and the empty toc on glossary page should be gone |
oh! awesome |
Motivation
When a page has no heading (empty toc), we should not display the mobile collapsible toc button because it does not reveal any TOC.
Problem can be seen on:
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
preview
Related PRs
#4273