-
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
feat(eslint-rules): add consistent-callback-type
rule for event callback typing for react-components and enable it in all v9 packages
#30293
feat(eslint-rules): add consistent-callback-type
rule for event callback typing for react-components and enable it in all v9 packages
#30293
Conversation
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
FluentProviderWithTheme | virtual-rerender | 68 | 59 | 10 | Possible regression |
All results
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 636 | 629 | 5000 | |
Button | mount | 300 | 309 | 5000 | |
Field | mount | 1141 | 1094 | 5000 | |
FluentProvider | mount | 693 | 695 | 5000 | |
FluentProviderWithTheme | mount | 81 | 81 | 10 | |
FluentProviderWithTheme | virtual-rerender | 68 | 59 | 10 | Possible regression |
FluentProviderWithTheme | virtual-rerender-with-unmount | 78 | 73 | 10 | |
MakeStyles | mount | 857 | 848 | 50000 | |
Persona | mount | 1743 | 1692 | 5000 | |
SpinButton | mount | 1378 | 1342 | 5000 |
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 a704db8:
|
Perf Analysis (
|
Scenario | Current PR Ticks | Baseline Ticks | Ratio |
---|---|---|---|
ChatDuplicateMessagesPerf.default | 167 | 145 | 1.15:1 |
LayoutMinimalPerf.default | 218 | 196 | 1.11:1 |
ButtonMinimalPerf.default | 92 | 86 | 1.07:1 |
FlexMinimalPerf.default | 148 | 140 | 1.06:1 |
ListWith60ListItems.default | 379 | 359 | 1.06:1 |
PortalMinimalPerf.default | 86 | 81 | 1.06:1 |
TreeMinimalPerf.default | 510 | 483 | 1.06:1 |
CarouselMinimalPerf.default | 269 | 255 | 1.05:1 |
DatepickerMinimalPerf.default | 3940 | 3762 | 1.05:1 |
DropdownManyItemsPerf.default | 397 | 377 | 1.05:1 |
ProviderMinimalPerf.default | 205 | 196 | 1.05:1 |
AlertMinimalPerf.default | 165 | 159 | 1.04:1 |
CardMinimalPerf.default | 307 | 296 | 1.04:1 |
FormMinimalPerf.default | 231 | 222 | 1.04:1 |
RosterPerf.default | 1589 | 1522 | 1.04:1 |
RadioGroupMinimalPerf.default | 265 | 255 | 1.04:1 |
ButtonSlotsPerf.default | 327 | 317 | 1.03:1 |
CheckboxMinimalPerf.default | 1166 | 1134 | 1.03:1 |
ListMinimalPerf.default | 316 | 308 | 1.03:1 |
MenuButtonMinimalPerf.default | 995 | 969 | 1.03:1 |
TextAreaMinimalPerf.default | 292 | 284 | 1.03:1 |
AccordionMinimalPerf.default | 88 | 86 | 1.02:1 |
AttachmentSlotsPerf.default | 648 | 633 | 1.02:1 |
BoxMinimalPerf.default | 191 | 187 | 1.02:1 |
DividerMinimalPerf.default | 209 | 205 | 1.02:1 |
HeaderMinimalPerf.default | 210 | 205 | 1.02:1 |
ItemLayoutMinimalPerf.default | 719 | 702 | 1.02:1 |
ProviderMergeThemesPerf.default | 655 | 645 | 1.02:1 |
SplitButtonMinimalPerf.default | 2327 | 2282 | 1.02:1 |
CustomToolbarPrototype.default | 1510 | 1481 | 1.02:1 |
TreeWith60ListItems.default | 91 | 89 | 1.02:1 |
AttachmentMinimalPerf.default | 84 | 83 | 1.01:1 |
HeaderSlotsPerf.default | 475 | 472 | 1.01:1 |
ImageMinimalPerf.default | 224 | 222 | 1.01:1 |
MenuMinimalPerf.default | 516 | 512 | 1.01:1 |
RefMinimalPerf.default | 108 | 107 | 1.01:1 |
SliderMinimalPerf.default | 761 | 756 | 1.01:1 |
StatusMinimalPerf.default | 379 | 376 | 1.01:1 |
AvatarMinimalPerf.default | 109 | 109 | 1:1 |
ChatWithPopoverPerf.default | 200 | 201 | 1:1 |
DialogMinimalPerf.default | 449 | 449 | 1:1 |
EmbedMinimalPerf.default | 1872 | 1871 | 1:1 |
InputMinimalPerf.default | 549 | 547 | 1:1 |
TextMinimalPerf.default | 202 | 201 | 1:1 |
AnimationMinimalPerf.default | 296 | 300 | 0.99:1 |
DropdownMinimalPerf.default | 1438 | 1453 | 0.99:1 |
ListCommonPerf.default | 406 | 410 | 0.99:1 |
ReactionMinimalPerf.default | 208 | 211 | 0.99:1 |
SegmentMinimalPerf.default | 187 | 188 | 0.99:1 |
TableManyItemsPerf.default | 1113 | 1123 | 0.99:1 |
TableMinimalPerf.default | 239 | 241 | 0.99:1 |
ToolbarMinimalPerf.default | 541 | 548 | 0.99:1 |
TooltipMinimalPerf.default | 1268 | 1283 | 0.99:1 |
ButtonOverridesMissPerf.default | 648 | 663 | 0.98:1 |
LoaderMinimalPerf.default | 184 | 188 | 0.98:1 |
SkeletonMinimalPerf.default | 199 | 203 | 0.98:1 |
GridMinimalPerf.default | 190 | 196 | 0.97:1 |
PopupMinimalPerf.default | 349 | 361 | 0.97:1 |
LabelMinimalPerf.default | 209 | 218 | 0.96:1 |
IconMinimalPerf.default | 395 | 411 | 0.96:1 |
ChatMinimalPerf.default | 425 | 446 | 0.95:1 |
ListNestedPerf.default | 318 | 338 | 0.94:1 |
VideoMinimalPerf.default | 429 | 457 | 0.94:1 |
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: be3a3d59d5c30f75d55c739548d576594ddf5c53 (build) |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
BaseButton | mount | 630 | 620 | 5000 | |
Breadcrumb | mount | 1665 | 1684 | 1000 | |
Checkbox | mount | 1709 | 1672 | 5000 | |
CheckboxBase | mount | 1467 | 1449 | 5000 | |
ChoiceGroup | mount | 2979 | 2960 | 5000 | |
ComboBox | mount | 665 | 680 | 1000 | |
CommandBar | mount | 6202 | 6254 | 1000 | |
ContextualMenu | mount | 13038 | 12945 | 1000 | |
DefaultButton | mount | 750 | 766 | 5000 | |
DetailsRow | mount | 2220 | 2169 | 5000 | |
DetailsRowFast | mount | 2168 | 2221 | 5000 | |
DetailsRowNoStyles | mount | 1987 | 2018 | 5000 | |
Dialog | mount | 2667 | 2677 | 1000 | |
DocumentCardTitle | mount | 225 | 226 | 1000 | |
Dropdown | mount | 1975 | 1985 | 5000 | |
FocusTrapZone | mount | 1148 | 1149 | 5000 | |
FocusZone | mount | 1076 | 1068 | 5000 | |
GroupedList | mount | 42033 | 42715 | 2 | |
GroupedList | virtual-rerender | 19961 | 19968 | 2 | |
GroupedList | virtual-rerender-with-unmount | 52883 | 53166 | 2 | |
GroupedListV2 | mount | 227 | 226 | 2 | |
GroupedListV2 | virtual-rerender | 219 | 204 | 2 | |
GroupedListV2 | virtual-rerender-with-unmount | 230 | 233 | 2 | |
IconButton | mount | 1083 | 1085 | 5000 | |
Label | mount | 325 | 344 | 5000 | |
Layer | mount | 2711 | 2752 | 5000 | |
Link | mount | 386 | 404 | 5000 | |
MenuButton | mount | 952 | 959 | 5000 | |
MessageBar | mount | 21244 | 21359 | 5000 | |
Nav | mount | 1956 | 1972 | 1000 | |
OverflowSet | mount | 785 | 774 | 5000 | |
Panel | mount | 1853 | 1801 | 1000 | |
Persona | mount | 735 | 747 | 1000 | |
Pivot | mount | 865 | 860 | 1000 | |
PrimaryButton | mount | 825 | 849 | 5000 | |
Rating | mount | 4637 | 4580 | 5000 | |
SearchBox | mount | 912 | 946 | 5000 | |
Shimmer | mount | 1894 | 1877 | 5000 | |
Slider | mount | 1343 | 1317 | 5000 | |
SpinButton | mount | 2859 | 2895 | 5000 | |
Spinner | mount | 383 | 387 | 5000 | |
SplitButton | mount | 1821 | 1859 | 5000 | |
Stack | mount | 404 | 413 | 5000 | |
StackWithIntrinsicChildren | mount | 867 | 842 | 5000 | |
StackWithTextChildren | mount | 2570 | 2594 | 5000 | |
SwatchColorPicker | mount | 6184 | 6175 | 5000 | |
TagPicker | mount | 1447 | 1417 | 5000 | |
Text | mount | 380 | 378 | 5000 | |
TextField | mount | 952 | 926 | 5000 | |
ThemeProvider | mount | 833 | 841 | 5000 | |
ThemeProvider | virtual-rerender | 592 | 587 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1280 | 1280 | 5000 | |
Toggle | mount | 607 | 604 | 5000 | |
buttonNative | mount | 190 | 181 | 5000 |
🕵 fluentuiv9 No visual regressions between this PR and main |
8ad647a
to
8ac65a7
Compare
consistent-callback-type
for event callback typing
packages/eslint-plugin/src/rules/consistent-callback-type/index.js
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/src/rules/consistent-callback-type/index.test.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Martin Hochel <[email protected]>
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.
🚢🚀🎉
consistent-callback-type
rule for event callback typing for react-componentsconsistent-callback-type
rule for event callback typing for react-components
consistent-callback-type
rule for event callback typing for react-componentsconsistent-callback-type
rule for event callback typing for react-components and enable it in all v9 packages
🕵 FluentUIV0 No visual regressions between this PR and main |
Background:
We agreed on new event type for v9 callbacks.
Below types will be exported from react-utilities as helpers:
And they will be used for typing callbacks:
detailed proposal: https://github.com/microsoft/fluentui/blob/master/rfcs/react-components/convergence/event-handlers-event-type.md
This PR does:
Related issue
#30372