-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Theme: Optimize color generating algorithm #72883
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
base: trunk
Are you sure you want to change the base?
Conversation
Co-Authored-By: Jarda Snajdr <664258+jsnajdr@users.noreply.github.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| // Disable reason: ESLint resolver can't handle `exports`. Import resolver | ||
| // checking is redundant in TypeScript files. | ||
| // eslint-disable-next-line import/no-unresolved | ||
| } from 'colorjs.io/fn'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to open a separate pull request to disable this rule altogether for TypeScript files. We don't need it.
See: https://typescript-eslint.io/troubleshooting/typed-linting/performance/#eslint-plugin-import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to open a separate pull request to disable this rule altogether for TypeScript files. We don't need it.
See: https://typescript-eslint.io/troubleshooting/typed-linting/performance/#eslint-plugin-import
Pull request opened at #72884
|
Size Change: -7.09 kB (-0.3%) Total Size: 2.37 MB
ℹ️ View Unchanged
|
What?
Updates theme color generation algorithm to be more efficient:
Why?
Ensure that ThemeProvider can generate colors without excessive runtime performance cost, since it's expected that this would be rendered at or close to the application root element.
Testing Instructions
Validate no regressions in behavior of behavior of theme provider:
npm run storybook:startVerify that building theme package succeeds and produces no local changes:
npm run --workspace @wordpress/theme buildgit status