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

Rewrite @automattic/global-styles to align with Calypso's React 18 upgrade #77048

Closed
2 tasks done
taipeicoder opened this issue May 18, 2023 · 2 comments
Closed
2 tasks done
Assignees

Comments

@taipeicoder
Copy link
Contributor

taipeicoder commented May 18, 2023

Related issue: #77046

Description

There is an ongoing effort to upgrade Calypso to React 18. WordPress packages will also be updated to the first version that supports React 18. As a result, the package @automatic/global-styles will be heavily affected since it has a lot of hard dependencies with WordPress packages, especially @wordpress/edit-site.

Please refer to this discussion for more context: p1684368118561169-slack-CRWCHQGUB

Acceptance Criteria

  • Rewrite @automattic/global-styles using the WordPress packages updated in React 18 #77046.
  • (Optional) Avoid importing from the build_module path. Please make a separate issue if it's going to be a follow-up task.
@arthur791004
Copy link
Contributor

Here are the functions we need to rewrite (commit):

  • GlobalStylesContext
  • mergeBaseAndUserConfigs
  • useSettings
  • useStyle
  • useGlobalStylesOutput

@arthur791004
Copy link
Contributor

Closing it via #77319. Will draft a p2 to describe how it works!

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

No branches or pull requests

2 participants