-
Notifications
You must be signed in to change notification settings - Fork 2.9k
chore(react-theme): refactor global shared colors #24435
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
chore(react-theme): refactor global shared colors #24435
Conversation
| @@ -0,0 +1,7 @@ | |||
| { | |||
| "type": "none", | |||
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.
Does not affect public API surface.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6f0f10d:
|
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 7f7f925f576751f77c612bfdd6557232451f9990 (build) |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1582 | 1558 | 5000 | |
| Button | mount | 1161 | 1122 | 5000 | |
| FluentProvider | mount | 1828 | 1833 | 5000 | |
| FluentProviderWithTheme | mount | 708 | 725 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 677 | 679 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 712 | 714 | 10 | |
| MakeStyles | mount | 2216 | 2153 | 50000 | |
| SpinButton | mount | 2898 | 2893 | 5000 |
|
I do not like the bundle size increase, exploring another ways... |
|
By exporting all the global shared colors individually from We might need to refactor the approach agains once we explore the ways to make the global colors public (#23562). |

Current Behavior
In #23608 we changed
global/colors.tsfile to reduce number of shared color tokes. The problem is that this file is generated by token pipeline.Alias shared colors are currently generated by the FUI library (not the token pipeline). For that reason the split to status, persona and other colors should be the responsibility of the FUI library as well.
New Behavior
Reverts
global/colors.tsto the shape generated by token pipeline, splits to status, persona and other colors inalias/colorPalette.tsRelated Issue(s)
Part of #24161.