Skip to content

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

Merged
slorber merged 3 commits into
mainfrom
slorber/sidebar-top-bottom
Mar 10, 2022
Merged

refactor(theme-classic): split sidebar into smaller parts#6844
slorber merged 3 commits into
mainfrom
slorber/sidebar-top-bottom

Conversation

@slorber

@slorber slorber commented Mar 4, 2022

Copy link
Copy Markdown
Collaborator

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
@slorber
slorber requested review from Josh-Cena and lex111 as code owners March 4, 2022 18:35
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 4, 2022
@netlify

netlify Bot commented Mar 4, 2022

Copy link
Copy Markdown

✔️ [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

github-actions Bot commented Mar 4, 2022

Copy link
Copy Markdown

⚡️ 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

github-actions Bot commented Mar 4, 2022

Copy link
Copy Markdown

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

@Josh-Cena Josh-Cena left a comment

Copy link
Copy Markdown
Collaborator

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

slorber commented Mar 9, 2022

Copy link
Copy Markdown
Collaborator Author

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

Josh-Cena commented Mar 10, 2022

Copy link
Copy Markdown
Collaborator

Is this PR good enough to merge for you?

Yes 👍 You can merge this if you are ready

@slorber

slorber commented Mar 10, 2022

Copy link
Copy Markdown
Collaborator Author

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

Will fix to use 17.6 temporarily

@slorber

slorber commented Mar 10, 2022

Copy link
Copy Markdown
Collaborator Author

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
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
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.

3 participants