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

BREAKING(react-conformance): update consistent-callback-args option to run for existing callbacks only #30376

Merged
merged 8 commits into from
Feb 7, 2024

Conversation

YuanboXue-Amber
Copy link
Contributor

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

Change consistent-callback-args test option:

Previous Behavior

  'consistent-callback-args'?: {
    ignoreProps?: string[]; // props to ignore from the test
  };

New Behavior

  'consistent-callback-args'?: {
    legacyCallbacks?: string[]; // props to include in test. If it is not specified, test will pass without doing anything.
  };

Why this change

We agreed on new event type for v9 callbacks (detailed proposal). Based on this, we're deprecating the existing consistent-callback-args test (#30301), and running it only for the existing callbacks in v9 since we can't change them.

Related issue

#30372

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 23, 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 d9a773933d1e6c6c6cc22a671764cfe66b979ddd

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 23, 2024

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 642 626 5000
Button mount 291 313 5000
Field mount 1158 1142 5000
FluentProvider mount 703 685 5000
FluentProviderWithTheme mount 81 88 10
FluentProviderWithTheme virtual-rerender 57 62 10
FluentProviderWithTheme virtual-rerender-with-unmount 75 79 10
MakeStyles mount 862 836 50000
Persona mount 1748 1744 5000
SpinButton mount 1360 1332 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 23, 2024

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
TreeWith60ListItems.default 94 80 1.18:1
FormMinimalPerf.default 238 212 1.12:1
ListCommonPerf.default 422 387 1.09:1
ButtonMinimalPerf.default 91 84 1.08:1
DividerMinimalPerf.default 211 196 1.08:1
ProviderMinimalPerf.default 210 195 1.08:1
ImageMinimalPerf.default 236 221 1.07:1
ChatMinimalPerf.default 448 424 1.06:1
FlexMinimalPerf.default 166 156 1.06:1
GridMinimalPerf.default 192 181 1.06:1
LabelMinimalPerf.default 230 216 1.06:1
MenuMinimalPerf.default 516 487 1.06:1
MenuButtonMinimalPerf.default 988 934 1.06:1
ReactionMinimalPerf.default 221 208 1.06:1
AvatarMinimalPerf.default 110 105 1.05:1
ChatWithPopoverPerf.default 199 189 1.05:1
RadioGroupMinimalPerf.default 262 249 1.05:1
CarouselMinimalPerf.default 275 265 1.04:1
DropdownManyItemsPerf.default 423 406 1.04:1
HeaderSlotsPerf.default 465 448 1.04:1
InputMinimalPerf.default 542 519 1.04:1
ListMinimalPerf.default 318 307 1.04:1
ListNestedPerf.default 329 317 1.04:1
TreeMinimalPerf.default 493 476 1.04:1
CheckboxMinimalPerf.default 1160 1129 1.03:1
PopupMinimalPerf.default 359 347 1.03:1
SegmentMinimalPerf.default 197 191 1.03:1
ToolbarMinimalPerf.default 548 533 1.03:1
DatepickerMinimalPerf.default 3681 3603 1.02:1
ItemLayoutMinimalPerf.default 720 705 1.02:1
LayoutMinimalPerf.default 199 196 1.02:1
RosterPerf.default 1606 1571 1.02:1
SplitButtonMinimalPerf.default 2263 2223 1.02:1
TableMinimalPerf.default 233 228 1.02:1
AnimationMinimalPerf.default 302 298 1.01:1
ChatDuplicateMessagesPerf.default 153 151 1.01:1
DialogMinimalPerf.default 440 434 1.01:1
ProviderMergeThemesPerf.default 649 643 1.01:1
SliderMinimalPerf.default 744 737 1.01:1
TooltipMinimalPerf.default 1267 1251 1.01:1
AttachmentSlotsPerf.default 646 649 1:1
ButtonOverridesMissPerf.default 634 636 1:1
PortalMinimalPerf.default 88 88 1:1
RefMinimalPerf.default 111 111 1:1
TableManyItemsPerf.default 1101 1104 1:1
CustomToolbarPrototype.default 1505 1511 1:1
AccordionMinimalPerf.default 80 81 0.99:1
AlertMinimalPerf.default 156 158 0.99:1
AttachmentMinimalPerf.default 80 81 0.99:1
DropdownMinimalPerf.default 1428 1437 0.99:1
EmbedMinimalPerf.default 1857 1882 0.99:1
SkeletonMinimalPerf.default 197 199 0.99:1
StatusMinimalPerf.default 395 397 0.99:1
IconMinimalPerf.default 376 378 0.99:1
TextMinimalPerf.default 194 195 0.99:1
TextAreaMinimalPerf.default 276 279 0.99:1
ButtonSlotsPerf.default 296 304 0.97:1
CardMinimalPerf.default 301 310 0.97:1
HeaderMinimalPerf.default 201 208 0.97:1
VideoMinimalPerf.default 423 434 0.97:1
BoxMinimalPerf.default 193 201 0.96:1
ListWith60ListItems.default 367 384 0.96:1
LoaderMinimalPerf.default 182 192 0.95:1

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 23, 2024

🕵 fluentuiv8 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 23, 2024

🕵 FluentUIV0 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 23, 2024

🕵 fluentuiv9 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 23, 2024

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 611 649 5000
Breadcrumb mount 1653 1691 1000
Checkbox mount 1683 1694 5000
CheckboxBase mount 1485 1480 5000
ChoiceGroup mount 2948 2987 5000
ComboBox mount 659 637 1000
CommandBar mount 6191 6249 1000
ContextualMenu mount 12341 12367 1000
DefaultButton mount 761 782 5000
DetailsRow mount 2177 2235 5000
DetailsRowFast mount 2207 2181 5000
DetailsRowNoStyles mount 2024 1997 5000
Dialog mount 2677 2702 1000
DocumentCardTitle mount 224 234 1000
Dropdown mount 2026 2015 5000
FocusTrapZone mount 1114 1150 5000
FocusZone mount 1078 1080 5000
GroupedList mount 41661 41681 2
GroupedList virtual-rerender 20004 19862 2
GroupedList virtual-rerender-with-unmount 50738 50309 2
GroupedListV2 mount 223 216 2
GroupedListV2 virtual-rerender 199 214 2
GroupedListV2 virtual-rerender-with-unmount 231 231 2
IconButton mount 1073 1090 5000
Label mount 335 336 5000
Layer mount 2779 2697 5000
Link mount 381 387 5000
MenuButton mount 940 934 5000
MessageBar mount 21439 21514 5000
Nav mount 2002 1939 1000
OverflowSet mount 799 790 5000
Panel mount 1834 1765 1000
Persona mount 753 767 1000
Pivot mount 870 864 1000
PrimaryButton mount 853 829 5000
Rating mount 4633 4595 5000
SearchBox mount 897 913 5000
Shimmer mount 1898 1834 5000
Slider mount 1300 1328 5000
SpinButton mount 2878 2925 5000
Spinner mount 377 388 5000
SplitButton mount 1855 1859 5000
Stack mount 404 418 5000
StackWithIntrinsicChildren mount 833 868 5000
StackWithTextChildren mount 2616 2592 5000
SwatchColorPicker mount 6065 6156 5000
TagPicker mount 1476 1443 5000
Text mount 370 382 5000
TextField mount 951 924 5000
ThemeProvider mount 843 832 5000
ThemeProvider virtual-rerender 586 586 5000
ThemeProvider virtual-rerender-with-unmount 1280 1279 5000
Toggle mount 602 612 5000
buttonNative mount 198 186 5000

Copy link

codesandbox-ci bot commented Jan 24, 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 e41a1f9:

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

Copy link

size-auditor bot commented Jan 24, 2024

Asset size changes

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

Baseline commit: be3a3d59d5c30f75d55c739548d576594ddf5c53 (build)

@YuanboXue-Amber YuanboXue-Amber changed the title [Draft] update consistent-callback-args to run for existing callbacks only BREAKING(react-conformance): update consistent-callback-args to run for existing callbacks only Jan 24, 2024
@YuanboXue-Amber YuanboXue-Amber changed the title BREAKING(react-conformance): update consistent-callback-args to run for existing callbacks only BREAKING(react-conformance): update consistent-callback-args option to run for existing callbacks only Jan 24, 2024
@YuanboXue-Amber YuanboXue-Amber marked this pull request as ready for review January 24, 2024 12:58
@YuanboXue-Amber YuanboXue-Amber requested a review from a team as a code owner January 24, 2024 12:58
@tudorpopams tudorpopams requested a review from Hotell January 24, 2024 13:14
Copy link
Contributor

@Hotell Hotell left a comment

Choose a reason for hiding this comment

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

this is great thank you !

we can make this even better. this rule is the last rule that needs to create TS program when running these conformance test which is extremely slow.

next steps would be:

  • migrate this logic to our workspace lint rules
  • remove this rule from conformance package

this has 2 major benefits:

  • performance of tests
  • improved DX in comparison with current approach. lint rule can be then enabled directly in source code for problematic callbacks, for fine grained control and getting rid of unnecessary decoupling of concerns

@YuanboXue-Amber
Copy link
Contributor Author

this is great thank you !

we can make this even better. this rule is the last rule that needs to create TS program when running these conformance test which is extremely slow.

next steps would be:

  • migrate this logic to our workspace lint rules
  • remove this rule from conformance package

this has 2 major benefits:

  • performance of tests
  • improved DX in comparison with current approach. lint rule can be then enabled directly in source code for problematic callbacks, for fine grained control and getting rid of unnecessary decoupling of concerns

Yeah it would be so great to remove this rule and not build ts program at all! Let's continue the discussion under this issue? #30372 (comment)

@YuanboXue-Amber YuanboXue-Amber enabled auto-merge (squash) February 7, 2024 09:21
@YuanboXue-Amber YuanboXue-Amber merged commit 239dedf into microsoft:master Feb 7, 2024
21 checks passed
@YuanboXue-Amber YuanboXue-Amber deleted the test branch February 7, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants