-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
SpinButton implementation and styles #22233
SpinButton implementation and styles #22233
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 8a00e50:
|
📊 Bundle size report🤖 This report was generated against c77cf524675779b63cf18c193b8c496ad172d530 |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: c77cf524675779b63cf18c193b8c496ad172d530 (build) |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 877 | 924 | 5000 | |
Button | mount | 539 | 529 | 5000 | |
FluentProvider | mount | 1902 | 1818 | 5000 | |
FluentProviderWithTheme | mount | 257 | 218 | 10 | |
FluentProviderWithTheme | virtual-rerender | 214 | 225 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 318 | 301 | 10 | |
MakeStyles | mount | 1554 | 1493 | 50000 |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
29180c4
to
dfa9e33
Compare
packages/react-spinbutton/src/components/SpinButton/SpinButton.types.ts
Outdated
Show resolved
Hide resolved
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.
A few suggestions, but the only one I'm really tied to is handling enter
to commit
packages/react-spinbutton/src/components/SpinButton/useSpinButton.tsx
Outdated
Show resolved
Hide resolved
packages/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-spinbutton/src/components/SpinButton/useSpinButtonStyles.ts
Show resolved
Hide resolved
Rework the class name for active buttons to be simpler.
clampWhenInRange() now handles the case when the min value is greater than the max value. In this case the new value is simply returned with no clamping applied. In dev mode an error is written to the console as this is an invalid state. Tests have been added to verify the behavior.
Adds support for the Enter key to SpinButton. When focused on the text input field hitting the enter key will now commit the value.
Size prop was being passed down to the input slot. This was a left over from attempting to use `Input` rather than `input` for this slot. It is no longer needed.
eaa0882
to
8a00e50
Compare
Converged SpinButton Implementation
This pull request is the first pass implementation of SpinButton. There is still design work on-going, particularly around the different appearances but the functionality is well-defined and the code in this PR represents a fully working SpinButton. Since I have a working SpinButton I want to get it up for review now. Follow PRs will be made to address missing pieces.
This PR includes:
This PR does not include:
Relates to #20930