chore: refactor SpinButton to use makeResetStyles#26867
Merged
spmonahan merged 11 commits intomicrosoft:masterfrom Feb 21, 2023
Merged
chore: refactor SpinButton to use makeResetStyles#26867spmonahan merged 11 commits intomicrosoft:masterfrom
spmonahan merged 11 commits intomicrosoft:masterfrom
Conversation
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 055d703d6d400235309b038e460d63cadaa3a0c3 (build) |
|
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 3192f98:
|
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1321 | 1337 | 5000 | |
| Button | mount | 947 | 951 | 5000 | |
| Field | mount | 2036 | 2030 | 5000 | |
| FluentProvider | mount | 1616 | 1692 | 5000 | |
| FluentProviderWithTheme | mount | 636 | 646 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 592 | 595 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 639 | 631 | 10 | |
| InfoButton | mount | 568 | 563 | 5000 | |
| MakeStyles | mount | 1917 | 1905 | 50000 | |
| Persona | mount | 3054 | 3057 | 5000 | |
| SpinButton | mount | 2538 | 2451 | 5000 |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
16412ae to
6105573
Compare
micahgodbolt
approved these changes
Feb 16, 2023
behowell
reviewed
Feb 16, 2023
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
khmakoto
approved these changes
Feb 16, 2023
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Show resolved
Hide resolved
packages/react-components/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Show resolved
Hide resolved
b8cdf50 to
ad7a747
Compare
- remove dependency on react-input's useStyles hook - copy styles from input
ad7a747 to
3192f98
Compare
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
behowell
approved these changes
Feb 21, 2023
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Feb 24, 2023
* master: (93 commits) chore: migrate to jest 27 (microsoft#26835) chore: make lint task run without need of build (microsoft#26872) chore(react-table): exports UseTableSelectionOptions (microsoft#26892) applying package updates fix(react-card): allow elements to grow to fill the available space (microsoft#26616) fix: Popover without focus trap should not be aria-hidden (microsoft#26932) applying package updates applying package updates fix(react-combobox): Remove _getAriaActiveDescendantValue, compute aria-activedescendantvalue in state, and update currentPendingValue when the options change (microsoft#26574) fix: v8 Combobox role and accname for non-hidden icon button (microsoft#26905) fix: Removing possible recursive loop in Coachmark (microsoft#26934) Combobox: Fix cursor jumping to the end of input (microsoft#26931) Fix missing icons on website (microsoft#26797) fix: Fix the width of Input's focus border with appearance=underline (microsoft#26881) chore: Clean up Input's interactive styles (microsoft#26865) Remove codeowners from change files (microsoft#26935) chore: add splitbutton error warning to docs, remove button ariaDescription example (microsoft#26904) docs: Remove testing code from MenuList example (microsoft#26929) chore: refactor SpinButton to use makeResetStyles (microsoft#26867) feat: Set overflow on positioned element when `autosize` is applied (microsoft#26868) ...
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
Replaces #26849