Skip to content
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

Updating SpinButton to handle onChange #15059

Conversation

czearing
Copy link
Collaborator

@czearing czearing commented Sep 16, 2020

Pull request checklist

Description of changes

  1. Updating SpinButton to handle onChange.
  2. Resolving issues revealed by eslint-plugin-react-hooks. SpinButton: fix issues revealed by eslint-plugin-react-hooks #14480
  3. Updating SpinButton.stateful.example.tsx to show the usage of onChange.
  4. Adding a forwardRef.

Focus areas to test

SpinButton

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 16, 2020

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 a69c728:

Sandbox Source
Fluent UI Button Configuration
microsoft/fluentui: codesandbox-react-template Configuration
microsoft/fluentui: codesandbox-react-next-template Configuration
microsoft/fluentui: codesandbox-react-northstar-template Configuration

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Sep 16, 2020

Perf Analysis

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 863 858 5000
BaseButton mount 948 955 5000
Breadcrumb mount 40542 40309 5000
BreadcrumbNext mount 152967 152866 5000
ButtonNext mount 587 583 5000
Checkbox mount 1615 1671 5000
CheckboxBase mount 1351 1356 5000
CheckboxNext mount 1535 1522 5000
ChoiceGroup mount 5149 5180 5000
ChoiceGroupNext mount 9512 9469 5000
ComboBox mount 955 960 1000
CommandBar mount 7490 7675 1000
ContextualMenu mount 13384 12782 1000
DefaultButton mount 1210 1145 5000
DetailsRow mount 3786 3814 5000
DetailsRowFast mount 3918 3842 5000
DetailsRowNoStyles mount 3622 3624 5000
Dialog mount 1532 1545 1000
DocumentCardTitle mount 1831 1807 1000
Dropdown mount 2656 2621 5000
FocusTrapZone mount 1708 1734 5000
FocusTrapZoneNext mount 1878 1843 5000
FocusZone mount 1837 1851 5000
IconButton mount 1849 1840 5000
Label mount 338 344 5000
Layer mount 1998 2025 5000
LayerNext mount 1957 1948 5000
Link mount 462 458 5000
LinkNext mount 482 474 5000
MenuButton mount 1563 1579 5000
MessageBar mount 2067 2068 5000
MessageBarNext mount 1974 1995 5000
Nav mount 3373 3361 1000
OverflowSet mount 1412 1454 5000
OverflowSetNext mount 1081 1070 5000
Panel mount 1444 1495 1000
Persona mount 899 869 1000
Pivot mount 1457 1561 1000
PivotNext mount 1474 1479 1000
PrimaryButton mount 1371 1364 5000
Rating mount 8018 8233 5000
RatingNext mount 7861 7981 5000
SearchBox mount 1342 1360 5000
SearchBoxNext mount 1396 1389 5000
Shimmer mount 2674 2642 5000
ShimmerNext mount 2669 2626 5000
Slider mount 1531 1569 5000
SliderNext mount 1921 1925 5000
SpinButton mount 5293 5061 5000
SpinButtonNext mount 5270 5368 5000
Spinner mount 410 419 5000
SplitButton mount 3201 3268 5000
Stack mount 525 529 5000
StackWithIntrinsicChildren mount 2036 2070 5000
StackWithTextChildren mount 5261 5236 5000
SwatchColorPicker mount 10578 10648 5000
SwatchColorPickerNext mount 10553 10461 5000
TagPicker mount 2818 2831 5000
TeachingBubble mount 48183 48527 5000
TeachingBubbleNext mount 11629 11534 5000
Text mount 450 432 5000
TextField mount 1389 1396 5000
ThemeProvider mount 3091 3076 5000
ThemeProvider virtual-rerender 598 598 5000
Toggle mount 841 829 5000
ToggleNext mount 810 835 5000
button mount 110 121 5000

Perf Analysis (Fluent)

Perf comparison
Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🎯 Avatar.Fluent 0.47 0.5 0.94:1 2000 940
🦄 Button.Fluent 0.13 0.21 0.62:1 5000 635
🔧 Checkbox.Fluent 0.67 0.36 1.86:1 1000 669
🎯 Dialog.Fluent 0.17 0.23 0.74:1 5000 838
🔧 Dropdown.Fluent 2.99 0.49 6.1:1 1000 2988
🔧 Icon.Fluent 0.15 0.06 2.5:1 5000 773
🎯 Image.Fluent 0.09 0.12 0.75:1 5000 433
🔧 Slider.Fluent 1.6 0.37 4.32:1 1000 1597
🔧 Text.Fluent 0.08 0.03 2.67:1 5000 410
🦄 Tooltip.Fluent 0.12 14.96 0.01:1 5000 582

🔧 Needs work     🎯 On target     🦄 Amazing

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AccordionMinimalPerf.default 171 0 Infinity:1
AlertMinimalPerf.default 361 0 Infinity:1
AttachmentMinimalPerf.default 180 0 Infinity:1
AttachmentSlotsPerf.default 1201 0 Infinity:1
AvatarMinimalPerf.default 499 0 Infinity:1
BoxMinimalPerf.default 416 0 Infinity:1
ButtonMinimalPerf.default 201 0 Infinity:1
ButtonOverridesMissPerf.default 1841 0 Infinity:1
ButtonSlotsPerf.default 653 0 Infinity:1
ButtonUseCssPerf.default 872 0 Infinity:1
CardMinimalPerf.default 642 0 Infinity:1
CarouselMinimalPerf.default 494 0 Infinity:1
ChatDuplicateMessagesPerf.default 446 0 Infinity:1
DialogMinimalPerf.default 839 0 Infinity:1
DividerMinimalPerf.default 419 0 Infinity:1
DropdownManyItemsPerf.default 808 0 Infinity:1
DropdownMinimalPerf.default 2934 0 Infinity:1
EmbedMinimalPerf.default 2040 0 Infinity:1
FormMinimalPerf.default 479 0 Infinity:1
GridMinimalPerf.default 394 0 Infinity:1
HeaderMinimalPerf.default 417 0 Infinity:1
HeaderSlotsPerf.default 890 0 Infinity:1
ImageMinimalPerf.default 419 0 Infinity:1
InputMinimalPerf.default 1345 0 Infinity:1
ItemLayoutMinimalPerf.default 1382 0 Infinity:1
LabelMinimalPerf.default 483 0 Infinity:1
LayoutMinimalPerf.default 439 0 Infinity:1
ListCommonPerf.default 706 0 Infinity:1
ListMinimalPerf.default 537 0 Infinity:1
ListWith60ListItems.default 980 0 Infinity:1
LoaderMinimalPerf.default 795 0 Infinity:1
MenuMinimalPerf.default 943 0 Infinity:1
MenuButtonMinimalPerf.default 1712 0 Infinity:1
PopupMinimalPerf.default 731 0 Infinity:1
PortalMinimalPerf.default 156 0 Infinity:1
ProviderMergeThemesPerf.default 1983 0 Infinity:1
RadioGroupMinimalPerf.default 481 0 Infinity:1
RefMinimalPerf.default 245 0 Infinity:1
SegmentMinimalPerf.default 418 0 Infinity:1
SkeletonMinimalPerf.default 466 0 Infinity:1
SliderMinimalPerf.default 1612 0 Infinity:1
SplitButtonMinimalPerf.default 3960 0 Infinity:1
StatusMinimalPerf.default 795 0 Infinity:1
IconMinimalPerf.default 797 0 Infinity:1
TableManyItemsPerf.default 2331 0 Infinity:1
TableMinimalPerf.default 460 0 Infinity:1
TextAreaMinimalPerf.default 546 0 Infinity:1
CustomToolbarPrototype.default 3936 0 Infinity:1
TreeMinimalPerf.default 961 0 Infinity:1
TreeWith60ListItems.default 221 0 Infinity:1
Avatar.Fluent 940 0 Infinity:1
Button.Fluent 635 0 Infinity:1
Checkbox.Fluent 669 0 Infinity:1
Dialog.Fluent 838 0 Infinity:1
Dropdown.Fluent 2988 0 Infinity:1
Icon.Fluent 773 0 Infinity:1
Image.Fluent 433 0 Infinity:1
Slider.Fluent 1597 0 Infinity:1
Tooltip.Fluent 582 0 Infinity:1
CheckboxMinimalPerf.default 2947 1 2947:1
ButtonUseCssNestingPerf.default 1138 1 1138:1
ProviderMinimalPerf.default 1075 1 1075:1
ToolbarMinimalPerf.default 997 1 997:1
TooltipMinimalPerf.default 851 1 851:1
VideoMinimalPerf.default 680 1 680:1
ChatMinimalPerf.default 665 1 665:1
ListNestedPerf.default 616 1 616:1
ChatWithPopoverPerf.default 494 1 494:1
AnimationMinimalPerf.default 443 1 443:1
ReactionMinimalPerf.default 440 1 440:1
Text.Fluent 410 1 410:1
TextMinimalPerf.default 389 1 389:1
FlexMinimalPerf.default 337 1 337:1

@size-auditor
Copy link

size-auditor bot commented Sep 16, 2020

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-next-SpinButton 185.876 kB 184.825 kB BelowBaseline     -1.051 kB

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 369c7a1f7f9a4b6a8379eece7b4812e5e0675ebb (build)

Copy link
Member

@ecraig12345 ecraig12345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait on this until the worst of the code moves are over.

@msft-github-bot
Copy link
Contributor

This pull request has been automatically marked as stale because it was marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 5 days of this comment. Thank you for your contributions to Fluent UI!

@czearing czearing closed this Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SpinButton: fix issues revealed by eslint-plugin-react-hooks SpinButton: Add onChange handler
4 participants