chore: Update Checkbox and Radio to use griffel reset styles#25984
Merged
behowell merged 4 commits intomicrosoft:masterfrom Dec 14, 2022
Merged
chore: Update Checkbox and Radio to use griffel reset styles#25984behowell merged 4 commits intomicrosoft:masterfrom
behowell merged 4 commits intomicrosoft:masterfrom
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 f13fcf0:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 134bbf565b13a0375a8db4ac022737d45e46c425 (build) |
Collaborator
📊 Bundle size report
Unchanged fixtures
|
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1271 | 1293 | 5000 | |
| Button | mount | 918 | 922 | 5000 | |
| FluentProvider | mount | 1494 | 1500 | 5000 | |
| FluentProviderWithTheme | mount | 567 | 588 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 553 | 548 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 584 | 598 | 10 | |
| MakeStyles | mount | 1971 | 1973 | 50000 | |
| Persona | mount | 2841 | 2825 | 5000 | |
| SpinButton | mount | 2360 | 2330 | 5000 |
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
spmonahan
approved these changes
Dec 14, 2022
| justifyContent: 'center', | ||
| overflow: 'hidden', | ||
|
|
||
| borderWidth: tokens.strokeWidthThin, |
Contributor
There was a problem hiding this comment.
nit: I think this line and the next can be collapsed into
border: `${tokens.strokeWidthThin} solid`| justifyContent: 'center', | ||
| overflow: 'hidden', | ||
|
|
||
| borderWidth: tokens.strokeWidthThin, |
Contributor
There was a problem hiding this comment.
nit: same as in Checkbox, I believe these two border styles can be collapsed into one.
Hotell
pushed a commit
to Hotell/fluentui
that referenced
this pull request
Feb 9, 2023
…ft#25984) Use Griffel's makeResetStyles to combine all of the base styles for each of Checkbox and Radio's slots into a single CSS class. Also, merge the styles for the default state into the base styles (size: medium, labelPosition: after).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Previous Behavior
Checkbox and Radio's styles include all of the styles for the checked, hover, etc. states in the base styles, and use CSS selectors to conditionally apply the styles.
New Behavior
Use Griffel's
makeResetStylesto combine all of the base styles for each of Checkbox and Radio's slots into a single CSS class. Also, merge the styles for the default state into the base styles (size: medium,labelPosition: after).Related Issue(s)