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

Hoist more react-related deps to root #22438

Merged
merged 4 commits into from
Apr 13, 2022

Conversation

ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Apr 8, 2022

Pulling out parts of React 17 upgrade (#22326) that can be merged now.

Hoist devDependencies on react-is and @types/react-is to the root (and one for @types/react-dom which was missed earlier).

This will simplify the actual React 17 upgrade.

@DustyTheBot
Copy link

DustyTheBot commented Apr 8, 2022

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Generated by 🚫 dangerJS against 5b82d35

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 8, 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 5b82d35:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 8, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1090 1109 5000
Button mount 667 668 5000
FluentProvider mount 2208 2176 5000
FluentProviderWithTheme mount 325 297 10
FluentProviderWithTheme virtual-rerender 255 259 10
FluentProviderWithTheme virtual-rerender-with-unmount 351 338 10
MakeStyles mount 1933 1845 50000

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 8, 2022

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
priority-overflow
createOverflowManager
2.836 kB
1.209 kB
react-accordion
Accordion (including children components)
74.792 kB
22.516 kB
react-avatar
Avatar
45.142 kB
13.111 kB
react-badge
Badge
20.895 kB
6.567 kB
react-badge
CounterBadge
21.848 kB
6.883 kB
react-badge
PresenceBadge
21.951 kB
6.565 kB
react-button
Button
28.013 kB
8.059 kB
react-button
CompoundButton
33.508 kB
9.092 kB
react-button
MenuButton
29.796 kB
8.665 kB
react-button
SplitButton
36.268 kB
9.863 kB
react-button
ToggleButton
37.395 kB
8.68 kB
react-card
Card - All
53.619 kB
15.372 kB
react-card
Card
48.904 kB
14.089 kB
react-card
CardFooter
7.686 kB
3.264 kB
react-card
CardHeader
9.251 kB
3.78 kB
react-card
CardPreview
7.658 kB
3.291 kB
react-combobox
Combobox
54.566 kB
18.884 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
176.089 kB
49.113 kB
react-components
react-components: FluentProvider & webLightTheme
32.601 kB
10.668 kB
react-divider
Divider
15.385 kB
5.539 kB
react-image
Image
10.109 kB
3.958 kB
react-input
Input
21.661 kB
7.18 kB
react-label
Label
8.371 kB
3.504 kB
react-link
Link
11.106 kB
4.507 kB
react-menu
Menu (including children components)
105.852 kB
32.433 kB
react-menu
Menu (including selectable components)
109.031 kB
32.897 kB
react-popover
Popover
96.787 kB
29.559 kB
react-portal
Portal
6.272 kB
2.17 kB
react-positioning
usePopper
23.21 kB
8.084 kB
react-priority-overflow
hooks only
10.606 kB
4.087 kB
react-provider
FluentProvider
14.009 kB
5.25 kB
react-select
Select
16.562 kB
6.264 kB
react-slider
Slider
25.549 kB
8.25 kB
react-spinbutton
SpinButton
41.512 kB
11.912 kB
react-spinner
Spinner
16.459 kB
5.549 kB
react-switch
Switch
24.279 kB
8.001 kB
react-text
Text - Default
10.797 kB
4.233 kB
react-text
Text - Wrappers
14.113 kB
4.576 kB
react-textarea
Textarea
20.602 kB
7.033 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
29.676 kB
6.604 kB
react-theme
Teams: Light theme
18.492 kB
5.296 kB
react-tooltip
Tooltip
42.837 kB
14.727 kB
react-utilities
SSRProvider
189 B
161 B
🤖 This report was generated against 72fa867ab6b084656b53c8f644df74b31077ae15

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 8, 2022

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
DividerMinimalPerf.default 300 275 1.09:1
FormMinimalPerf.default 341 315 1.08:1
AttachmentMinimalPerf.default 128 120 1.07:1
DropdownManyItemsPerf.default 576 541 1.06:1
SegmentMinimalPerf.default 296 280 1.06:1
AttachmentSlotsPerf.default 911 867 1.05:1
ChatDuplicateMessagesPerf.default 248 236 1.05:1
RadioGroupMinimalPerf.default 377 360 1.05:1
TextMinimalPerf.default 286 272 1.05:1
ChatWithPopoverPerf.default 317 306 1.04:1
GridMinimalPerf.default 279 269 1.04:1
HeaderMinimalPerf.default 300 289 1.04:1
RosterPerf.default 950 914 1.04:1
ReactionMinimalPerf.default 313 301 1.04:1
TreeMinimalPerf.default 680 657 1.04:1
TreeWith60ListItems.default 144 138 1.04:1
ButtonMinimalPerf.default 137 133 1.03:1
ButtonSlotsPerf.default 453 439 1.03:1
FlexMinimalPerf.default 240 232 1.03:1
ListWith60ListItems.default 559 541 1.03:1
ProviderMinimalPerf.default 334 325 1.03:1
SkeletonMinimalPerf.default 286 277 1.03:1
IconMinimalPerf.default 533 516 1.03:1
ToolbarMinimalPerf.default 804 784 1.03:1
BoxMinimalPerf.default 281 276 1.02:1
CarouselMinimalPerf.default 392 385 1.02:1
DialogMinimalPerf.default 640 630 1.02:1
ImageMinimalPerf.default 312 305 1.02:1
ListMinimalPerf.default 424 416 1.02:1
MenuButtonMinimalPerf.default 1414 1384 1.02:1
AvatarMinimalPerf.default 154 153 1.01:1
DropdownMinimalPerf.default 2557 2535 1.01:1
HeaderSlotsPerf.default 626 617 1.01:1
InputMinimalPerf.default 1093 1085 1.01:1
ItemLayoutMinimalPerf.default 982 975 1.01:1
LayoutMinimalPerf.default 291 289 1.01:1
ListCommonPerf.default 517 511 1.01:1
LoaderMinimalPerf.default 574 566 1.01:1
RefMinimalPerf.default 196 195 1.01:1
SliderMinimalPerf.default 1425 1405 1.01:1
SplitButtonMinimalPerf.default 3666 3625 1.01:1
TableMinimalPerf.default 328 326 1.01:1
TextAreaMinimalPerf.default 400 398 1.01:1
ButtonOverridesMissPerf.default 1238 1237 1:1
CardMinimalPerf.default 453 452 1:1
ChatMinimalPerf.default 612 610 1:1
CheckboxMinimalPerf.default 2266 2255 1:1
DatepickerMinimalPerf.default 4771 4769 1:1
EmbedMinimalPerf.default 3464 3451 1:1
ListNestedPerf.default 463 463 1:1
PopupMinimalPerf.default 514 514 1:1
TableManyItemsPerf.default 1587 1586 1:1
MenuMinimalPerf.default 699 707 0.99:1
PortalMinimalPerf.default 139 141 0.99:1
StatusMinimalPerf.default 551 555 0.99:1
CustomToolbarPrototype.default 2246 2276 0.99:1
TooltipMinimalPerf.default 883 894 0.99:1
AlertMinimalPerf.default 216 221 0.98:1
AnimationMinimalPerf.default 445 454 0.98:1
LabelMinimalPerf.default 311 316 0.98:1
ProviderMergeThemesPerf.default 1048 1064 0.98:1
VideoMinimalPerf.default 509 520 0.98:1
AccordionMinimalPerf.default 118 124 0.95:1

@fabricteam
Copy link
Collaborator

fabricteam commented Apr 8, 2022

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 944 1023 5000
Breadcrumb mount 2887 2906 1000
Checkbox mount 1568 1618 5000
CheckboxBase mount 1438 1438 5000
ChoiceGroup mount 5043 5070 5000
ComboBox mount 1044 1057 1000
CommandBar mount 11385 11144 1000
ContextualMenu mount 12904 12111 1000
DefaultButton mount 1242 1238 5000
DetailsRow mount 4144 4147 5000
DetailsRowFast mount 4079 4082 5000
DetailsRowNoStyles mount 3879 3846 5000
Dialog mount 2298 2392 1000
DocumentCardTitle mount 174 179 1000
Dropdown mount 3456 3508 5000
FocusTrapZone mount 1988 1953 5000
FocusZone mount 1935 2000 5000
IconButton mount 1839 1935 5000
Label mount 358 357 5000
Layer mount 3135 3150 5000
Link mount 517 508 5000
MenuButton mount 1633 1577 5000
MessageBar mount 2269 2399 5000
Nav mount 3500 3670 1000
OverflowSet mount 1215 1226 5000
Panel mount 2268 2270 1000
Persona mount 1049 1150 1000
Pivot mount 1609 1565 1000
PrimaryButton mount 1352 1403 5000
Rating mount 8215 8088 5000
SearchBox mount 1454 1398 5000
Shimmer mount 2637 2730 5000
Slider mount 2083 2086 5000
SpinButton mount 5415 5475 5000
Spinner mount 471 459 5000
SplitButton mount 3543 3480 5000
Stack mount 545 579 5000
StackWithIntrinsicChildren mount 2507 2479 5000
StackWithTextChildren mount 5769 5670 5000
SwatchColorPicker mount 12626 12675 5000
TagPicker mount 2862 2991 5000
TeachingBubble mount 100413 100076 5000
Text mount 468 479 5000
TextField mount 1521 1536 5000
ThemeProvider mount 1276 1234 5000
ThemeProvider virtual-rerender 693 697 5000
ThemeProvider virtual-rerender-with-unmount 1942 1974 5000
Toggle mount 871 881 5000
buttonNative mount 140 144 5000

@size-auditor
Copy link

size-auditor bot commented Apr 9, 2022

Asset size changes

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

Baseline commit: 72fa867ab6b084656b53c8f644df74b31077ae15 (build)

@@ -42,8 +42,6 @@
"@fluentui/theme-samples": "^8.4.17",
"@fluentui/react-monaco-editor": "^1.3.17",
"office-ui-fabric-core": "^11.0.0",
"react": "16.14.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

this is incorrect. dependencies should remain for the time being in place as is for both libraries and applications.

For libraries it's self explanatory - consumers install library and needs all dependencies
For apps - imagine this would need to be run within docker container or similar

Copy link
Member Author

@ecraig12345 ecraig12345 Apr 11, 2022

Choose a reason for hiding this comment

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

It's kind of debatable for unpublished apps, which currently in our context work in one of two ways:

  • Only intended to run within the repo
  • Intended to be bundled and uploaded to a CDN or other host in a way that makes dependencies irrelevant (React and all other deps are included in the website bundles and any storybook-based bundles)

I'm not sure the docker container type scenario matters here since they're never actually run that way, and would pretty thoroughly not work already due to single version policy with dev deps + private scripts package.

Regardless, I'll revert this and let you figure it out later.

@ecraig12345 ecraig12345 force-pushed the hoist-more-react-deps branch from ece793e to 5b82d35 Compare April 11, 2022 21:29
@ecraig12345 ecraig12345 enabled auto-merge (squash) April 11, 2022 21:33
@ecraig12345
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@ecraig12345 ecraig12345 merged commit b48c03c into microsoft:master Apr 13, 2022
@ecraig12345 ecraig12345 deleted the hoist-more-react-deps branch April 13, 2022 21:33
marwan38 pushed a commit to marwan38/fluentui that referenced this pull request Jun 13, 2022
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.

8 participants