Skip to content
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

[WIP] feat(v2): no-JS collapsible DocSidebar #4586

Closed
wants to merge 1 commit into from

Conversation

duanwilliam
Copy link
Contributor

Motivation

#3030

PoC no-JS collapsible sidebar using hidden checkboxes. code is pretty sloppy at the moment but it is working. would probably need to cleaned up significantly.

some functionality may still be missing but it should look mostly similar to the existing one.

live demo at https://duanwilliam.github.io/docusaurus-purecss-sidebar/

WIP

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

Disable JS in browser and check

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 7, 2021
@netlify
Copy link

netlify bot commented Apr 7, 2021

@github-actions
Copy link

github-actions bot commented Apr 7, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 67
🟢 Accessibility 96
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

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

@slorber
Copy link
Collaborator

slorber commented Jul 14, 2021

Thanks for your POC @duanwilliam

I'm not going to follow-up on this because I think we should have "lazy sidebars" instead, and reduce the HTML markup rendered on the server to avoid rendering collapsed content: #5136
This is important for perf on sites rendering very large sidebars.

I think it's not useful anymore to allow uncollapsing categories of the sidebar with CSS/HTML only.
Instead, we'll solve the no-JS category uncollapsing by making the category a link targeting a page (category index page, or first doc of that category...), and the target page will have the category uncollapsed by default.
Track #2643

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants