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

refactor(theme-classic): split sidebar into smaller parts #6844

Merged
merged 3 commits into from
Mar 10, 2022

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Mar 4, 2022

Motivation

This should help to customize the sidebar with swizzling.

For example to add sticky sidebar ads as requested here: #5468 (comment)

Also reduce content to eject for some other customizations such as https://docs.dyte.io/

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

preview

dogfood sidebar content wrapping on test instance

https://deploy-preview-6844--docusaurus-2.netlify.app/tests/docs

image


Notes:

  • I only refactored/split, no behavior change expected
  • just removed some classes that looked unused
  • I'm not 100% sure yet components have the best naming, nested structure and split
  • Not marking those components as swizzle safe yet, but still useful for users even if it stays unsafe

@Josh-Cena any opinion?

@slorber slorber added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Mar 4, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 4, 2022
@netlify
Copy link

netlify bot commented Mar 4, 2022

✔️ [V2]

🔨 Explore the source changes: 34722fd

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

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

@github-actions
Copy link

github-actions bot commented Mar 4, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 60
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

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

@github-actions
Copy link

github-actions bot commented Mar 4, 2022

Size Change: -228 B (0%)

Total Size: 792 kB

Filename Size Change
website/build/assets/css/styles.********.css 105 kB -228 B (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 49.9 kB
website/build/assets/js/main.********.js 598 kB
website/build/index.html 38.7 kB

compressed-size-action

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

This makes sense! Will we port the same structure to Navbar and Footer?

@slorber
Copy link
Collaborator Author

slorber commented Mar 9, 2022

This makes sense! Will we port the same structure to Navbar and Footer?

Yes that's the goal, going to open other similar PRs to other parts of the theme.

Is this PR good enough to merge for you?

@Josh-Cena
Copy link
Collaborator

Josh-Cena commented Mar 10, 2022

Is this PR good enough to merge for you?

Yes 👍 You can merge this if you are ready

@slorber
Copy link
Collaborator Author

slorber commented Mar 10, 2022

ok the CI is failing due to Node 17.7: nodejs/node#42279

Will fix to use 17.6 temporarily

@slorber
Copy link
Collaborator Author

slorber commented Mar 10, 2022

hmm looks useless to care about it, the fix is released very soon: nodejs/node#42285

@slorber slorber merged commit e97dc0d into main Mar 10, 2022
@slorber slorber deleted the slorber/sidebar-top-bottom branch March 10, 2022 15:55
@slorber slorber mentioned this pull request Mar 16, 2022
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: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants