chore: refactor SpinButton to use makeResetStyles#26849
Closed
spmonahan wants to merge 5 commits intomicrosoft:masterfrom
Closed
chore: refactor SpinButton to use makeResetStyles#26849spmonahan wants to merge 5 commits intomicrosoft:masterfrom
spmonahan wants to merge 5 commits intomicrosoft:masterfrom
Conversation
- remove dependency on react-input's useStyles hook - copy styles from input
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 71029f8350e58c7fdde6c49dfca3744509b8e6ed (build) |
Collaborator
📊 Bundle size reportUnchanged fixtures
|
|
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 f68a9f3:
|
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1304 | 1282 | 5000 | |
| Button | mount | 909 | 930 | 5000 | |
| Field | mount | 1925 | 1921 | 5000 | |
| FluentProvider | mount | 1531 | 1555 | 5000 | |
| FluentProviderWithTheme | mount | 585 | 578 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 545 | 556 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 576 | 581 | 10 | |
| InfoButton | mount | 523 | 510 | 5000 | |
| MakeStyles | mount | 1966 | 1985 | 50000 | |
| Persona | mount | 2841 | 2846 | 5000 | |
| SpinButton | mount | 2340 | 2223 | 5000 |
3670a15 to
f68a9f3
Compare
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
khmakoto
reviewed
Feb 15, 2023
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
SpinButton was implemented before Griffel's
makeResetStyles()function was available. SpinButton also calledreact-input'suseStyles()hook as a way to re-use complex styling of the control.New Behavior
SpinButton uses
makeResetStylesto reduce the number of class names present on the control. The dependency onreact-inputhas been removed and the relevant styles are moved intouseSpinButtonStyles. This creates code duplication but allows SpinButton to have better control over how its class names are generated.Class name comparison table