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

@docusaurus/theme-common #3775

Merged
merged 4 commits into from
Nov 18, 2020
Merged

@docusaurus/theme-common #3775

merged 4 commits into from
Nov 18, 2020

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Nov 18, 2020

Motivation

  • need to share code across multiple themes, so that we can create implement same ux on multiple themes (Theme gallery #3522)
  • need to protect theme implementation details from swizzling, and only expose a subset of comps (mostly design/layout-related components)
  • need to address import issues when swizzling a component that imports internal theme code (#3394 appears to have broken swizzle #3747)

Solution: @docusaurus/theme-common package for shared client-side theme code.

  • independent from a specific theme/styling
  • its code is considered internal (but we must avoid api breaking changes to avoid breaking swizzled comps anyway)

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

Tests + preview + build keeps working as usual

Related PRs

#3752
#2714

@slorber slorber requested a review from lex111 as a code owner November 18, 2020 14:01
@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Nov 18, 2020
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 18, 2020
@slorber slorber linked an issue Nov 18, 2020 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Nov 18, 2020

Deploy preview for docusaurus-2 ready!

Built with commit d5aecf5

https://deploy-preview-3775--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Nov 18, 2020

Size Change: +19 B (0%)

Total Size: 152 kB

ℹ️ View Unchanged
Filename Size Change
website/build/blog/2017/12/14/introducing-docusaurus/index.html 20.7 kB 0 B
website/build/docs/introduction/index.html 180 B 0 B
website/build/index.html 5.84 kB -2 B (0%)
website/build/main.********.js 108 kB +21 B (0%)
website/build/styles.********.css 17.4 kB 0 B

compressed-size-action

@netlify
Copy link

netlify bot commented Nov 18, 2020

Deploy preview for docusaurus-2 ready!

Built with commit 7ed3122

https://deploy-preview-3775--docusaurus-2.netlify.app

Copy link
Contributor

@lex111 lex111 left a comment

Choose a reason for hiding this comment

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

Awesome!

@slorber slorber merged commit abcd8ce into master Nov 18, 2020
@lex111 lex111 added this to the v2.0.0-alpha.67 milestone Nov 18, 2020
@slorber slorber deleted the slorber/theme-common branch August 17, 2021 18:00
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: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#3394 appears to have broken swizzle
3 participants