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

feat: docs plugin options sidebarCollapsible + sidebarCollapsed #5203

Merged
merged 17 commits into from
Jul 23, 2021

Conversation

Josh-Cena
Copy link
Collaborator

@Josh-Cena Josh-Cena commented Jul 22, 2021

Breaking changes

  • themeConfig.sidebarCollapsible is moved to docs plugin options.sidebarCollapsible

Motivation

Resolve #4966.

Add a docs options.sidebarCollapsed plugin config.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

tests + https://deploy-preview-5203--docusaurus-2.netlify.app/tests/docs/more-test/

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 22, 2021
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@netlify
Copy link

netlify bot commented Jul 22, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: fe06d41

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60f91e46c1554600081fba99

😎 Browse the preview: https://deploy-preview-5203--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Jul 22, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 74
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

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

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@netlify
Copy link

netlify bot commented Jul 22, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: 369a2e6

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60f91ef3df2acf0008b839f8

😎 Browse the preview: https://deploy-preview-5203--docusaurus-2.netlify.app

@netlify
Copy link

netlify bot commented Jul 22, 2021

✔️ [V2]

🔨 Explore the source changes: e0dcfa1

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60fab15b82a0520007e3f6f2

😎 Browse the preview: https://deploy-preview-5203--docusaurus-2.netlify.app

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks, overall LGTM

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@Josh-Cena
Copy link
Collaborator Author

Josh-Cena commented Jul 23, 2021

@slorber I've created two config options: sidebarCollapsible and sidebarCollapsed. Instead of throwing error/warning when a category is collapsed but non-expandable, collapsed is just forced to false when !collapsible—we can notify this behavior in the docs. Part of the reason is because I'm getting tired of writing validation 😅

@Josh-Cena Josh-Cena marked this pull request as ready for review July 23, 2021 07:49
@Josh-Cena Josh-Cena requested a review from lex111 as a code owner July 23, 2021 07:49
@slorber slorber added pr: new feature This PR adds a new API or behavior. pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. labels Jul 23, 2021
@slorber slorber changed the title feat: non-collapsible sidebar category feat: docs plugin options sidebarCollapsible + sidebarCollapsed Jul 23, 2021
@slorber slorber merged commit 24156ef into facebook:master Jul 23, 2021
@Josh-Cena Josh-Cena deleted the sidebar-section branch July 23, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sidebar Category Title / Non-collapsable primary categories.
3 participants