-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Partial theme merging fixes (for ThemeProvider) and update createTheme to use Theme/PartialTheme (7.0) #15452
Conversation
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 503044a:
|
Perf AnalysisNo significant results to display. All results
Perf Analysis (Fluent)Perf comparison
Perf tests with no regressions
|
Asset size changes
Over Tolerance (1024 B) Over Baseline Below Baseline New Removed 1 kB = 1000 B Baseline commit: 40edbe0aa78c0d1a56a3609318431fb4ceb4abe5 (build) |
…e to use Theme/PartialTheme (7.0) (microsoft#15452) * Update theme package * update theme-provider * tweak vr test to improve test coverage * Change files * fixes * more fixes, remove deprecated semantic slots * fix perf * fixes and cleanups * resolve comments * unmake breaking change * Change files * fix snapshots
…e to use Theme/PartialTheme (7.0) (#15452) (#15326) * Update theme package * update theme-provider * tweak vr test to improve test coverage * Change files * fixes * more fixes, remove deprecated semantic slots * fix perf * fixes and cleanups * resolve comments * unmake breaking change * Change files * fix snapshots
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
Pull request checklist
$ yarn change
Description of changes
Theme
/PartialTheme
instead ofITheme
/IPartialTheme
tokens
inTheme
asinternal
and updated its typing to be partial. This is because whencreatedTheme
returns the fullTheme
. We don't necessarily have to create fullTokens
in that case, we can just passtokens
through.getTokens
. This is causing nestedThemeProvider
not working forreact-button
(modified screener tests to cover this case).FunctionComponent<ThemeProviderProps>
toThemeProvider
. This is to have cleaner public API, instead of relying ofReact.forwardRef
typing.mergeThemes
implementation to merge partial/full theme on top of a full theme. And use that in bothcreateTheme
anduseThemeProviderState
. (Note: this is a breaking change. however, I think it's safe to make since this is recently moved fromreact-theme-provider
totheme
and I don't think anyone but our code is using this)Focus areas to test
(optional)