Skip to content

feat: Bump tabster to 2.1.0#23811

Merged
ling1726 merged 19 commits intomicrosoft:masterfrom
ling1726:feat/bump-tabster
Jul 26, 2022
Merged

feat: Bump tabster to 2.1.0#23811
ling1726 merged 19 commits intomicrosoft:masterfrom
ling1726:feat/bump-tabster

Conversation

@ling1726
Copy link
Contributor

@ling1726 ling1726 commented Jul 5, 2022

Updates tabster to 2.0.1 and updates useTabster to use new disposable wrapper that's suitable for React effects.

Fixes #22291

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 5, 2022

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

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

@size-auditor
Copy link

size-auditor bot commented Jul 5, 2022

Asset size changes

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

Baseline commit: d08b249e242ea328bb33eb0f203850f461144342 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 5, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1614 1681 5000
Button mount 1096 1098 5000
FluentProvider mount 2113 2120 5000
FluentProviderWithTheme mount 708 734 10
FluentProviderWithTheme virtual-rerender 693 678 10
FluentProviderWithTheme virtual-rerender-with-unmount 796 756 10
MakeStyles mount 2363 2429 50000
SpinButton mount 3228 3108 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 5, 2022

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-accordion
Accordion (including children components)
77.879 kB
23.679 kB
78.982 kB
23.998 kB
1.103 kB
319 B
react-avatar
AvatarGroup
137.323 kB
40.803 kB
137.702 kB
40.925 kB
379 B
122 B
react-card
Card - All
66.431 kB
19.01 kB
67.014 kB
19.206 kB
583 B
196 B
react-card
Card
62.113 kB
17.911 kB
62.696 kB
18.126 kB
583 B
215 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
189.057 kB
52.092 kB
190.189 kB
52.415 kB
1.132 kB
323 B
react-dialog
Dialog (including children components)
83.306 kB
24.872 kB
83.684 kB
25.01 kB
378 B
138 B
react-menu
Menu (including children components)
116.678 kB
35.429 kB
117.781 kB
35.767 kB
1.103 kB
338 B
react-menu
Menu (including selectable components)
119.877 kB
35.907 kB
120.98 kB
36.252 kB
1.103 kB
345 B
react-popover
Popover
104.799 kB
31.916 kB
105.177 kB
32.045 kB
378 B
129 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
533 B
341 B
global-context
createContextSelector
554 B
348 B
priority-overflow
createOverflowManager
2.936 kB
1.212 kB
react-alert
Alert
82.111 kB
20.492 kB
react-avatar
Avatar
48.533 kB
13.78 kB
react-avatar
AvatarGroupItem
68.248 kB
19.109 kB
react-badge
Badge
22.494 kB
7.157 kB
react-badge
CounterBadge
23.397 kB
7.449 kB
react-badge
PresenceBadge
23.947 kB
7.022 kB
react-button
Button
35.704 kB
9.499 kB
react-button
CompoundButton
42.777 kB
10.733 kB
react-button
MenuButton
38.322 kB
10.363 kB
react-button
SplitButton
45.655 kB
11.71 kB
react-button
ToggleButton
50.929 kB
10.919 kB
react-card
CardFooter
8.461 kB
3.555 kB
react-card
CardHeader
9.504 kB
3.896 kB
react-card
CardPreview
8.562 kB
3.61 kB
react-combobox
Combobox (including child components)
74.38 kB
23.979 kB
react-combobox
Dropdown (including child components)
73.893 kB
23.971 kB
react-components
react-components: FluentProvider & webLightTheme
31.883 kB
10.516 kB
react-divider
Divider
16.321 kB
5.837 kB
react-image
Image
10.68 kB
4.215 kB
react-input
Input
23.558 kB
7.644 kB
react-label
Label
9.238 kB
3.815 kB
react-link
Link
12.082 kB
4.88 kB
react-overflow
hooks only
10.839 kB
4.146 kB
react-portal
Portal
9.844 kB
3.677 kB
react-positioning
usePositioning
23.854 kB
8.299 kB
react-provider
FluentProvider
14.76 kB
5.596 kB
react-radio
Radio
30.481 kB
10.406 kB
react-radio
RadioGroup
14.319 kB
5.711 kB
react-select
Select
20.746 kB
7.299 kB
react-slider
Slider
26.136 kB
8.387 kB
react-spinbutton
SpinButton
44.227 kB
12.492 kB
react-spinner
Spinner
19.932 kB
6.363 kB
react-switch
Switch
26.951 kB
8.688 kB
react-text
Text - Default
11.572 kB
4.537 kB
react-text
Text - Wrappers
14.882 kB
4.977 kB
react-textarea
Textarea
23.078 kB
7.707 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
28.995 kB
6.215 kB
react-theme
Teams: Light theme
16.973 kB
4.86 kB
react-tooltip
Tooltip
44.547 kB
15.376 kB
react-utilities
SSRProvider
189 B
161 B
🤖 This report was generated against d08b249e242ea328bb33eb0f203850f461144342

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 5, 2022

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
TreeWith60ListItems.default 182 151 1.21:1
AttachmentMinimalPerf.default 173 148 1.17:1
SkeletonMinimalPerf.default 375 342 1.1:1
ImageMinimalPerf.default 381 354 1.08:1
VideoMinimalPerf.default 722 666 1.08:1
FlexMinimalPerf.default 293 274 1.07:1
RefMinimalPerf.default 248 231 1.07:1
CardMinimalPerf.default 611 575 1.06:1
FormMinimalPerf.default 414 390 1.06:1
AnimationMinimalPerf.default 587 559 1.05:1
HeaderMinimalPerf.default 396 377 1.05:1
SegmentMinimalPerf.default 360 342 1.05:1
TooltipMinimalPerf.default 1213 1159 1.05:1
AvatarMinimalPerf.default 205 197 1.04:1
ButtonMinimalPerf.default 167 160 1.04:1
ButtonSlotsPerf.default 562 542 1.04:1
ChatDuplicateMessagesPerf.default 319 307 1.04:1
ListMinimalPerf.default 535 513 1.04:1
MenuMinimalPerf.default 912 878 1.04:1
LayoutMinimalPerf.default 366 357 1.03:1
ProviderMergeThemesPerf.default 1374 1334 1.03:1
AlertMinimalPerf.default 296 290 1.02:1
CarouselMinimalPerf.default 495 485 1.02:1
ListCommonPerf.default 647 637 1.02:1
RadioGroupMinimalPerf.default 451 444 1.02:1
TextMinimalPerf.default 362 356 1.02:1
AttachmentSlotsPerf.default 1139 1126 1.01:1
ChatMinimalPerf.default 784 777 1.01:1
DialogMinimalPerf.default 824 817 1.01:1
DropdownManyItemsPerf.default 733 725 1.01:1
ListNestedPerf.default 593 588 1.01:1
TextAreaMinimalPerf.default 499 494 1.01:1
ButtonOverridesMissPerf.default 1550 1545 1:1
ChatWithPopoverPerf.default 398 398 1:1
ProviderMinimalPerf.default 427 426 1:1
SplitButtonMinimalPerf.default 4613 4619 1:1
TableManyItemsPerf.default 2043 2049 1:1
TableMinimalPerf.default 416 418 1:1
BoxMinimalPerf.default 343 345 0.99:1
DatepickerMinimalPerf.default 5993 6060 0.99:1
DropdownMinimalPerf.default 3383 3412 0.99:1
HeaderSlotsPerf.default 779 785 0.99:1
MenuButtonMinimalPerf.default 1784 1807 0.99:1
CustomToolbarPrototype.default 2816 2855 0.99:1
ToolbarMinimalPerf.default 1000 1015 0.99:1
AccordionMinimalPerf.default 149 152 0.98:1
CheckboxMinimalPerf.default 2801 2848 0.98:1
EmbedMinimalPerf.default 4313 4381 0.98:1
InputMinimalPerf.default 1372 1403 0.98:1
ItemLayoutMinimalPerf.default 1241 1265 0.98:1
LabelMinimalPerf.default 386 393 0.98:1
LoaderMinimalPerf.default 706 721 0.98:1
PortalMinimalPerf.default 172 175 0.98:1
IconMinimalPerf.default 636 646 0.98:1
DividerMinimalPerf.default 360 373 0.97:1
GridMinimalPerf.default 349 362 0.96:1
ListWith60ListItems.default 638 665 0.96:1
RosterPerf.default 1161 1214 0.96:1
PopupMinimalPerf.default 658 684 0.96:1
SliderMinimalPerf.default 1750 1832 0.96:1
StatusMinimalPerf.default 687 719 0.96:1
ReactionMinimalPerf.default 371 396 0.94:1
TreeMinimalPerf.default 823 879 0.94:1

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 5, 2022

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 1069 1087 5000
Breadcrumb mount 2981 2988 1000
Checkbox mount 2932 2934 5000
CheckboxBase mount 2578 2562 5000
ChoiceGroup mount 5429 5406 5000
ComboBox mount 1108 1094 1000
CommandBar mount 11418 11416 1000
ContextualMenu mount 12597 12659 1000
DefaultButton mount 1384 1319 5000
DetailsRow mount 4279 4354 5000
DetailsRowFast mount 4461 4334 5000
DetailsRowNoStyles mount 4203 4169 5000
Dialog mount 3144 3144 1000
DocumentCardTitle mount 200 200 1000
Dropdown mount 3821 3897 5000
FocusTrapZone mount 2082 2090 5000
FocusZone mount 2020 2000 5000
IconButton mount 2099 2094 5000
Label mount 406 390 5000
Layer mount 3517 3588 5000
Link mount 558 576 5000
MenuButton mount 1723 1773 5000
MessageBar mount 2418 2418 5000
Nav mount 3768 3830 1000
OverflowSet mount 1273 1221 5000
Panel mount 2441 2391 1000
Persona mount 1192 1147 1000
Pivot mount 1655 1670 1000
PrimaryButton mount 1541 1521 5000
Rating mount 9172 9048 5000
SearchBox mount 1527 1592 5000
Shimmer mount 2935 2972 5000
Slider mount 2244 2233 5000
SpinButton mount 5776 5676 5000
Spinner mount 473 499 5000
SplitButton mount 3938 3950 5000
Stack mount 621 626 5000
StackWithIntrinsicChildren mount 2932 2856 5000
StackWithTextChildren mount 6436 6368 5000
SwatchColorPicker mount 13164 13011 5000
TagPicker mount 3152 3051 5000
TeachingBubble mount 103739 103139 5000
Text mount 514 503 5000
TextField mount 1636 1603 5000
ThemeProvider mount 1324 1329 5000
ThemeProvider virtual-rerender 732 734 5000
ThemeProvider virtual-rerender-with-unmount 2005 2002 5000
Toggle mount 907 936 5000
buttonNative mount 164 153 5000

@ling1726 ling1726 changed the title feat: Bump tabster to 1.5.2 feat: Bump tabster to 1.5.3 Jul 6, 2022
@shaohaolin
Copy link

Fire an issue related to this: microsoft/tabster#160

@bsunderhus bsunderhus assigned ling1726 and unassigned bsunderhus Jul 21, 2022
@ling1726 ling1726 changed the title feat: Bump tabster to 1.5.3 feat: Bump tabster to 2.0.1 Jul 22, 2022
@ling1726 ling1726 changed the title feat: Bump tabster to 2.0.1 feat: Bump tabster to 2.1.0 Jul 25, 2022
@ling1726 ling1726 marked this pull request as ready for review July 25, 2022 20:22
@ling1726 ling1726 requested a review from a team as a code owner July 25, 2022 20:22
@ling1726 ling1726 requested a review from a team as a code owner July 25, 2022 20:22
});

afterEach(() => {
beforeEach(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use beforeEach because a custom afterEach needs the user to call the cleanup function explicitly

Copy link
Contributor

Choose a reason for hiding this comment

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

is this related to new tabster or what cleanup function are you reffering to ?

Copy link
Contributor Author

@ling1726 ling1726 Jul 26, 2022

Choose a reason for hiding this comment

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

@testing-library/react has a cleanup function which is configured by default in jest. This actually unmounts all components after the current afterEach where jest.useRealTimers is called. The existing fake timers that need to be cleared are still running without an explicit call of cleanup.

Therfore, it's just simpler to do it in beforeEach and let testing-libarary do its defaults

Copy link
Contributor Author

Choose a reason for hiding this comment

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

also these timers tests should be removed since cypress now tests these interactions. I'll do that in another PR

@ling1726 ling1726 closed this Jul 25, 2022
@ling1726 ling1726 reopened this Jul 25, 2022
deloser: {},
});

React.useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

AFAIK tabster has dummy inputs, are they used there? If so useLayoutEffect should be potentially safer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolving for now, there are other bugs that need to be fixed and v9 currently does not support React 18 anyway. Tracking tabster support for 18 in #24085

@ling1726 ling1726 marked this pull request as draft July 26, 2022 09:07
…65ccb.json

Co-authored-by: Oleksandr Fediashov <alexander.mcgarret@gmail.com>
});

afterEach(() => {
beforeEach(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this related to new tabster or what cleanup function are you reffering to ?

@ling1726 ling1726 requested a review from Hotell July 26, 2022 14:28
@ling1726 ling1726 merged commit b9e6c6a into microsoft:master Jul 26, 2022
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.

Tabster causes memory leak in projection popout window

6 participants