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

feat(react-conformance): Deprecate conformance test consistent-callback-args #30301

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

YuanboXue-Amber
Copy link
Contributor

@YuanboXue-Amber YuanboXue-Amber commented Jan 12, 2024

Deprecate consistent-callback-args conformance test. Removing it from new component template.
The newly added callback will be tested by consistent-callback-arg eslint rule in #30293

Related issue

#30372

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 12, 2024

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
FluentProviderWithTheme virtual-rerender 65 59 10 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 653 607 5000
Button mount 294 308 5000
Field mount 1152 1099 5000
FluentProvider mount 704 716 5000
FluentProviderWithTheme mount 77 77 10
FluentProviderWithTheme virtual-rerender 65 59 10 Possible regression
FluentProviderWithTheme virtual-rerender-with-unmount 76 80 10
MakeStyles mount 829 848 50000
Persona mount 1726 1698 5000
SpinButton mount 1397 1331 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 12, 2024

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ButtonMinimalPerf.default 97 85 1.14:1
ChatDuplicateMessagesPerf.default 159 140 1.14:1
AttachmentMinimalPerf.default 92 83 1.11:1
BoxMinimalPerf.default 204 184 1.11:1
ListNestedPerf.default 334 310 1.08:1
AvatarMinimalPerf.default 110 103 1.07:1
DividerMinimalPerf.default 208 194 1.07:1
RadioGroupMinimalPerf.default 271 253 1.07:1
RefMinimalPerf.default 116 108 1.07:1
SkeletonMinimalPerf.default 201 188 1.07:1
DropdownManyItemsPerf.default 402 378 1.06:1
MenuMinimalPerf.default 520 492 1.06:1
AnimationMinimalPerf.default 302 287 1.05:1
AttachmentSlotsPerf.default 667 635 1.05:1
ImageMinimalPerf.default 242 231 1.05:1
InputMinimalPerf.default 563 538 1.05:1
MenuButtonMinimalPerf.default 984 935 1.05:1
SliderMinimalPerf.default 752 717 1.05:1
IconMinimalPerf.default 391 371 1.05:1
AccordionMinimalPerf.default 87 84 1.04:1
ButtonOverridesMissPerf.default 666 640 1.04:1
LoaderMinimalPerf.default 195 188 1.04:1
SplitButtonMinimalPerf.default 2304 2226 1.04:1
TextMinimalPerf.default 201 194 1.04:1
VideoMinimalPerf.default 441 425 1.04:1
AlertMinimalPerf.default 156 152 1.03:1
FlexMinimalPerf.default 160 156 1.03:1
TableManyItemsPerf.default 1130 1100 1.03:1
CustomToolbarPrototype.default 1473 1436 1.03:1
ChatMinimalPerf.default 437 428 1.02:1
DialogMinimalPerf.default 437 428 1.02:1
EmbedMinimalPerf.default 1904 1865 1.02:1
HeaderSlotsPerf.default 471 463 1.02:1
ProviderMinimalPerf.default 202 198 1.02:1
TextAreaMinimalPerf.default 293 288 1.02:1
CheckboxMinimalPerf.default 1160 1153 1.01:1
DatepickerMinimalPerf.default 3515 3497 1.01:1
GridMinimalPerf.default 185 184 1.01:1
SegmentMinimalPerf.default 194 192 1.01:1
StatusMinimalPerf.default 395 393 1.01:1
DropdownMinimalPerf.default 1409 1415 1:1
HeaderMinimalPerf.default 206 206 1:1
ItemLayoutMinimalPerf.default 698 699 1:1
LabelMinimalPerf.default 224 223 1:1
ListMinimalPerf.default 306 306 1:1
PortalMinimalPerf.default 83 83 1:1
ProviderMergeThemesPerf.default 637 640 1:1
TableMinimalPerf.default 229 228 1:1
ToolbarMinimalPerf.default 542 543 1:1
TooltipMinimalPerf.default 1274 1272 1:1
CardMinimalPerf.default 316 320 0.99:1
CarouselMinimalPerf.default 260 262 0.99:1
ListWith60ListItems.default 361 366 0.99:1
PopupMinimalPerf.default 345 348 0.99:1
TreeMinimalPerf.default 476 479 0.99:1
FormMinimalPerf.default 216 220 0.98:1
ReactionMinimalPerf.default 211 216 0.98:1
TreeWith60ListItems.default 85 87 0.98:1
LayoutMinimalPerf.default 201 207 0.97:1
ListCommonPerf.default 375 388 0.97:1
RosterPerf.default 1506 1555 0.97:1
ButtonSlotsPerf.default 303 315 0.96:1
ChatWithPopoverPerf.default 187 207 0.9:1

Copy link

codesandbox-ci bot commented Jan 12, 2024

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 85f4638:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 12, 2024

🕵 fluentuiv8 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 12, 2024

🕵 FluentUIV0 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 12, 2024

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react
ActivityItem
68.833 kB
22.613 kB
react
Announced
36.473 kB
12.628 kB
react
Autofill
15.365 kB
4.743 kB
react
Breadcrumb
196.083 kB
58.757 kB
react
Button
190.127 kB
55.019 kB
react
ButtonGrid
175.918 kB
53.25 kB
react
Calendar
118.756 kB
36.101 kB
react
Callout
80.866 kB
26.564 kB
react
Check
51.062 kB
17.152 kB
react
Checkbox
57.791 kB
19.17 kB
react
ChoiceGroup
63.339 kB
20.824 kB
react
ChoiceGroupOption
56.601 kB
18.695 kB
react
Coachmark
89.704 kB
28.407 kB
react
Color
7.737 kB
3.106 kB
react
ColorPicker
129.984 kB
40.589 kB
react
ComboBox
245.355 kB
70.51 kB
react
CommandBar
197.362 kB
58.46 kB
react
ContextualMenu
150.967 kB
46.982 kB
react
DatePicker
180.203 kB
54.911 kB
react
DateTimeUtilities
5.244 kB
1.849 kB
react
DetailsList
225.886 kB
64.647 kB
react
Dialog
205.294 kB
61.428 kB
react
Divider
17.63 kB
6.234 kB
react
DocumentCard
211.08 kB
62.793 kB
react
DragDrop
8.343 kB
2.724 kB
react
DraggableZone
33.345 kB
11.166 kB
react
Dropdown
227.732 kB
66.867 kB
react
ExtendedPicker
94.987 kB
27.297 kB
react
Fabric
39.75 kB
13.688 kB
react
Facepile
205.992 kB
61.67 kB
react
FloatingPicker
236.233 kB
67.368 kB
react
FocusTrapZone
15.831 kB
5.54 kB
react
FocusZone
53.259 kB
16.869 kB
react
Grid
175.918 kB
53.25 kB
react
GroupedList
131.636 kB
39.657 kB
react
GroupedListV2
119.324 kB
36.822 kB
react
HoverCard
93.735 kB
29.778 kB
react
Icon
49.74 kB
16.603 kB
react
Icons
65.829 kB
24.212 kB
react
Image
44.79 kB
15.024 kB
react
Keytip
78.588 kB
25.825 kB
react
KeytipData
13.585 kB
4.418 kB
react
KeytipLayer
100.422 kB
31.128 kB
react
Keytips
103.175 kB
32.07 kB
react
Label
36.347 kB
12.639 kB
react
Layer
45.683 kB
15.585 kB
react
Link
37.673 kB
12.993 kB
react
List
38.136 kB
12.004 kB
react
MarqueeSelection
72.119 kB
21.676 kB
react
MessageBar
184.707 kB
55.523 kB
react
Modal
90.409 kB
29.213 kB
react
Nav
183.442 kB
55.093 kB
react
OverflowSet
31.044 kB
10.593 kB
react
Overlay
38.784 kB
13.401 kB
react
Panel
194.946 kB
58.34 kB
react
Persona
111.705 kB
35.58 kB
react
PersonaCoin
111.705 kB
35.58 kB
react
PersonaPresence
55.928 kB
18.715 kB
react
Pickers
287.603 kB
80.607 kB
react
Pivot
184.252 kB
55.823 kB
react
Popup
12.032 kB
4.114 kB
react
Positioning
21.821 kB
7.334 kB
react
PositioningContainer
70.754 kB
22.84 kB
react
ProgressIndicator
37.498 kB
12.906 kB
react
Rating
78.989 kB
25.18 kB
react
ResizeGroup
13.286 kB
4.365 kB
react
ResponsiveMode
8.078 kB
2.95 kB
react
ScrollablePane
53.538 kB
17.113 kB
react
SearchBox
182.982 kB
55.1 kB
react
SelectableOption
724 B
413 B
react
SelectedItemsList
226.659 kB
66.321 kB
react
Selection
41.202 kB
11.839 kB
react
Separator
33.397 kB
11.529 kB
react
Shimmer
47.265 kB
15.632 kB
react
ShimmeredDetailsList
236.654 kB
67.42 kB
react
Slider
55.575 kB
18.574 kB
react
SpinButton
186.661 kB
56.205 kB
react
Spinner
39.691 kB
13.815 kB
react
Stack
40.761 kB
13.931 kB
react
Sticky
32.064 kB
10.324 kB
react
Styling
44.812 kB
14.688 kB
react
SwatchColorPicker
186.166 kB
56.724 kB
react
TeachingBubble
200.004 kB
59.345 kB
react
Text
35.931 kB
12.486 kB
react
TextField
78.587 kB
24.642 kB
react
Theme
42.456 kB
13.773 kB
react
ThemeGenerator
12.34 kB
4.106 kB
react
TimePicker
235.197 kB
68.29 kB
react
Toggle
44.17 kB
15.346 kB
react
Tooltip
84.225 kB
27.277 kB
react
Utilities
71.851 kB
21.843 kB
react
Viewport
22.945 kB
7.292 kB
react
WeeklyDayPicker
98.762 kB
30.828 kB
react
WindowProvider
1.059 kB
541 B
react-accordion
Accordion (including children components)
100.12 kB
30.421 kB
react-alert
Alert
83.737 kB
23.474 kB
react-avatar
Avatar
50.175 kB
15.944 kB
react-avatar
AvatarGroup
19.704 kB
7.796 kB
react-avatar
AvatarGroupItem
64.831 kB
20.274 kB
react-badge
Badge
26.905 kB
8.729 kB
react-badge
CounterBadge
27.806 kB
9.024 kB
react-badge
PresenceBadge
25.311 kB
9.306 kB
react-button
Button
39.513 kB
11.169 kB
react-button
CompoundButton
46.874 kB
12.661 kB
react-button
MenuButton
44.292 kB
12.542 kB
react-button
SplitButton
52.306 kB
14.134 kB
react-button
ToggleButton
56.559 kB
13.068 kB
react-calendar-compat
Calendar Compat
152.029 kB
39.809 kB
react-card
Card - All
101.55 kB
28.92 kB
react-card
Card
96.373 kB
27.403 kB
react-card
CardFooter
13.064 kB
5.385 kB
react-card
CardHeader
15.307 kB
6.143 kB
react-card
CardPreview
14.015 kB
5.752 kB
react-checkbox
Checkbox
35.65 kB
12.076 kB
react-combobox
Combobox (including child components)
98.361 kB
31.717 kB
react-combobox
Dropdown (including child components)
99.582 kB
31.715 kB
react-components
react-components: Button, FluentProvider & webLightTheme
70.688 kB
20.464 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
217.082 kB
61.913 kB
react-components
react-components: FluentProvider & webLightTheme
43.173 kB
14.298 kB
react-datepicker-compat
DatePicker Compat
224.131 kB
62.802 kB
react-dialog
Dialog (including children components)
100.865 kB
29.91 kB
react-divider
Divider
20.82 kB
7.763 kB
react-field
Field
22.544 kB
8.61 kB
react-image
Image
15.736 kB
6.228 kB
react-infobutton
InfoButton
138.593 kB
43.364 kB
react-infobutton
InfoLabel
142.394 kB
44.604 kB
react-input
Input
26.887 kB
9.118 kB
react-jsx-runtime
Classic Pragma
1.057 kB
530 B
react-jsx-runtime
JSX Dev Runtime
3.783 kB
1.648 kB
react-jsx-runtime
JSX Runtime
4.377 kB
1.881 kB
react-label
Label
14.266 kB
5.828 kB
react-link
Link
17.082 kB
6.911 kB
react-menu
Menu (including children components)
149.37 kB
45.493 kB
react-menu
Menu (including selectable components)
152.056 kB
46.004 kB
react-message-bar
MessageBar (all components)
25.566 kB
9.131 kB
react-northstar
Accordion
85.357 kB
26.509 kB
react-northstar
Alert
87.425 kB
26.91 kB
react-northstar
Animation
55.304 kB
17.834 kB
react-northstar
Attachment
86.819 kB
26.7 kB
react-northstar
Avatar
80.254 kB
24.634 kB
react-northstar
Box
75.223 kB
23.814 kB
react-northstar
Breadcrumb
79.889 kB
24.707 kB
react-northstar
Button
83.135 kB
25.957 kB
react-northstar
Card
82.674 kB
25.027 kB
react-northstar
Carousel
105.15 kB
31.882 kB
react-northstar
Chat
152.326 kB
45.963 kB
react-northstar
Checkbox
79.782 kB
25.085 kB
react-northstar
Datepicker
184.887 kB
56.167 kB
react-northstar
Debug
8.801 kB
3.594 kB
react-northstar
Design
36.564 kB
12.07 kB
react-northstar
Dialog
112.02 kB
33.638 kB
react-northstar
Divider
76.594 kB
24.137 kB
react-northstar
Dropdown
196.43 kB
59.442 kB
react-northstar
Embed
81.446 kB
25.42 kB
react-northstar
Flex
47.702 kB
15.45 kB
react-northstar
Form
92.492 kB
28.881 kB
react-northstar
Grid
70.555 kB
22.283 kB
react-northstar
Header
74.731 kB
23.476 kB
react-northstar
Image
73.566 kB
23.339 kB
react-northstar
Input
88.31 kB
27.784 kB
react-northstar
ItemLayout
78.206 kB
24.458 kB
react-northstar
Label
77.895 kB
24.415 kB
react-northstar
Layout
75.368 kB
23.806 kB
react-northstar
List
88.472 kB
27.57 kB
react-northstar
Loader
78.591 kB
24.745 kB
react-northstar
Menu
126.85 kB
39.875 kB
react-northstar
MenuButton
161.254 kB
48.881 kB
react-northstar
Pill
83.697 kB
26.077 kB
react-northstar
Popup
133.56 kB
41.486 kB
react-northstar
Portal
58.294 kB
18.855 kB
react-northstar
Provider
93.114 kB
29.626 kB
react-northstar
RadioGroup
83.25 kB
26.056 kB
react-northstar
Reaction
77.255 kB
24.138 kB
react-northstar
Segment
76.184 kB
23.899 kB
react-northstar
Skeleton
77.74 kB
24.21 kB
react-northstar
Slider
84.235 kB
26.744 kB
react-northstar
SplitButton
176.487 kB
52.632 kB
react-northstar
Status
76.247 kB
24.059 kB
react-northstar
SvgIcon
36.819 kB
11.744 kB
react-northstar
Table
80.765 kB
25.159 kB
react-northstar
Text
74.089 kB
23.522 kB
react-northstar
TextArea
74.223 kB
23.501 kB
react-northstar
Toolbar
173.3 kB
52.087 kB
react-northstar
Tooltip
108.23 kB
34.491 kB
react-northstar
Tree
87.83 kB
27.223 kB
react-northstar
Video
75.379 kB
23.794 kB
react-persona
Persona
57.066 kB
17.821 kB
react-popover
Popover
126.783 kB
39.788 kB
react-portal
Portal
13.591 kB
4.869 kB
react-portal-compat
PortalCompatProvider
7.902 kB
2.586 kB
react-progress
ProgressBar
17.428 kB
6.898 kB
react-provider
FluentProvider
23.713 kB
8.655 kB
react-radio
Radio
32.946 kB
10.252 kB
react-radio
RadioGroup
15.345 kB
6.263 kB
react-select
Select
28.609 kB
10.205 kB
react-slider
Slider
39.943 kB
12.969 kB
react-spinbutton
SpinButton
36.774 kB
11.788 kB
react-spinner
Spinner
23.517 kB
8.512 kB
react-switch
Switch
35.134 kB
11.198 kB
react-table
DataGrid
165.124 kB
45.892 kB
react-table
Table (Primitives only)
45.28 kB
14.111 kB
react-table
Table as DataGrid
136.504 kB
36.822 kB
react-table
Table (Selection only)
76.269 kB
20.541 kB
react-table
Table (Sort only)
74.935 kB
20.151 kB
react-tags
InteractionTag
15.259 kB
6.058 kB
react-tags
Tag
29.982 kB
9.439 kB
react-tags
TagGroup
80.55 kB
24.027 kB
react-text
Text - Default
16.705 kB
6.569 kB
react-text
Text - Wrappers
19.878 kB
6.896 kB
react-textarea
Textarea
30.947 kB
10.476 kB
react-timepicker-compat
TimePicker
100.234 kB
33.18 kB
react-toast
Toast (including Toaster)
100.154 kB
29.761 kB
react-tooltip
Tooltip
54.538 kB
19.187 kB
🤖 This report was generated against ba595256fed89379e486a742f93b61ac52f7cb7d

Copy link

size-auditor bot commented Jan 12, 2024

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: be3a3d59d5c30f75d55c739548d576594ddf5c53 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 12, 2024

🕵 fluentuiv9 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 12, 2024

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 628 639 5000
Breadcrumb mount 1695 1666 1000
Checkbox mount 1693 1702 5000
CheckboxBase mount 1512 1476 5000
ChoiceGroup mount 3067 2949 5000
ComboBox mount 660 661 1000
CommandBar mount 6242 6264 1000
ContextualMenu mount 13266 13105 1000
DefaultButton mount 764 734 5000
DetailsRow mount 2197 2184 5000
DetailsRowFast mount 2208 2197 5000
DetailsRowNoStyles mount 2062 2039 5000
Dialog mount 2797 2640 1000
DocumentCardTitle mount 216 229 1000
Dropdown mount 2009 2025 5000
FocusTrapZone mount 1169 1182 5000
FocusZone mount 1093 1093 5000
GroupedList mount 42149 41849 2
GroupedList virtual-rerender 17987 20102 2
GroupedList virtual-rerender-with-unmount 50579 51555 2
GroupedListV2 mount 228 229 2
GroupedListV2 virtual-rerender 203 217 2
GroupedListV2 virtual-rerender-with-unmount 229 235 2
IconButton mount 1086 1093 5000
Label mount 331 338 5000
Layer mount 2748 2775 5000
Link mount 386 396 5000
MenuButton mount 963 971 5000
MessageBar mount 21314 21301 5000
Nav mount 2031 1963 1000
OverflowSet mount 772 781 5000
Panel mount 2061 1780 1000
Persona mount 733 730 1000
Pivot mount 864 880 1000
PrimaryButton mount 872 846 5000
Rating mount 4609 4781 5000
SearchBox mount 929 923 5000
Shimmer mount 1881 1869 5000
Slider mount 1334 1314 5000
SpinButton mount 2947 2918 5000
Spinner mount 399 392 5000
SplitButton mount 1851 1844 5000
Stack mount 441 417 5000
StackWithIntrinsicChildren mount 863 878 5000
StackWithTextChildren mount 2634 2598 5000
SwatchColorPicker mount 6172 6241 5000
TagPicker mount 1475 1464 5000
Text mount 375 368 5000
TextField mount 935 954 5000
ThemeProvider mount 834 830 5000
ThemeProvider virtual-rerender 589 582 5000
ThemeProvider virtual-rerender-with-unmount 1267 1289 5000
Toggle mount 621 619 5000
buttonNative mount 196 193 5000

@YuanboXue-Amber YuanboXue-Amber changed the title [Draft] deprecate conformance test consistent-callback-args Deprecate conformance test consistent-callback-args Jan 12, 2024
@YuanboXue-Amber YuanboXue-Amber marked this pull request as ready for review January 12, 2024 15:03
@YuanboXue-Amber YuanboXue-Amber requested a review from a team as a code owner January 12, 2024 15:03
@Hotell Hotell changed the title Deprecate conformance test consistent-callback-args feat(react-conformance): Deprecate conformance test consistent-callback-args Jan 17, 2024
Copy link
Contributor

@behowell behowell left a comment

Choose a reason for hiding this comment

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

As far as I can tell from this PR, each component will still have to disable this test, right? And if any new event handlers are added to existing components, they will have to explicitly disable the conformance test for those events?

IMO it would be much better if components didn't have to do anything for this test to pass for new events.

For example, one option would be to make this test be opt-in by prop name: e.g. replace the opt-out ignoreProps option with an opt-in legacyCallbacks or something. Existing components could opt into the test for old events, but new events wouldn't be covered by default. And if the legacyCallbacks option wasn't present (the default case), then this test would pass without doing anything.

@YuanboXue-Amber
Copy link
Contributor Author

YuanboXue-Amber commented Jan 23, 2024

As far as I can tell from this PR, each component will still have to disable this test, right? And if any new event handlers are added to existing components, they will have to explicitly disable the conformance test for those events?

IMO it would be much better if components didn't have to do anything for this test to pass for new events.

For example, one option would be to make this test be opt-in by prop name: e.g. replace the opt-out ignoreProps option with an opt-in legacyCallbacks or something. Existing components could opt into the test for old events, but new events wouldn't be covered by default. And if the legacyCallbacks option wasn't present (the default case), then this test would pass without doing anything.

Yeah that's a good point. I created #30372 to gather everything that needs to be done to disable old test/enable new rule. I will work on updating the test this/next week

@YuanboXue-Amber YuanboXue-Amber enabled auto-merge (squash) February 7, 2024 08:51
@YuanboXue-Amber YuanboXue-Amber merged commit d9a7739 into microsoft:master Feb 7, 2024
21 checks passed
@YuanboXue-Amber YuanboXue-Amber deleted the deprecate-test branch February 7, 2024 09:21
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.

4 participants