refactor: remove @fluentui/react-theme-provider#18710
Conversation
Asset size changes
Baseline commit: cc979d76b9c15148302ba7f39bb683746ff33d2d (build) |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| ThemeProviderNext | mount | 6559 | 6979 | 5000 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 835 | 824 | 5000 | |
| BaseButton | mount | 942 | 951 | 5000 | |
| Breadcrumb | mount | 2599 | 2556 | 1000 | |
| ButtonNext | mount | 532 | 529 | 5000 | |
| Checkbox | mount | 1602 | 1562 | 5000 | |
| CheckboxBase | mount | 1416 | 1353 | 5000 | |
| ChoiceGroup | mount | 4927 | 4898 | 5000 | |
| ComboBox | mount | 966 | 990 | 1000 | |
| CommandBar | mount | 9854 | 9908 | 1000 | |
| ContextualMenu | mount | 6075 | 6222 | 1000 | |
| DefaultButton | mount | 1137 | 1175 | 5000 | |
| DetailsRow | mount | 3764 | 3803 | 5000 | |
| DetailsRowFast | mount | 3759 | 3733 | 5000 | |
| DetailsRowNoStyles | mount | 3492 | 3545 | 5000 | |
| Dialog | mount | 2119 | 2183 | 1000 | |
| DocumentCardTitle | mount | 142 | 151 | 1000 | |
| Dropdown | mount | 3332 | 3279 | 5000 | |
| FocusTrapZone | mount | 1783 | 1757 | 5000 | |
| FocusZone | mount | 1721 | 1777 | 5000 | |
| IconButton | mount | 1815 | 1779 | 5000 | |
| Label | mount | 328 | 364 | 5000 | |
| Layer | mount | 1812 | 1811 | 5000 | |
| Link | mount | 476 | 458 | 5000 | |
| MakeStyles | mount | 1731 | 1730 | 50000 | |
| MenuButton | mount | 1546 | 1504 | 5000 | |
| MessageBar | mount | 2060 | 1973 | 5000 | |
| Nav | mount | 3311 | 3337 | 1000 | |
| OverflowSet | mount | 1009 | 1022 | 5000 | |
| Panel | mount | 1993 | 2079 | 1000 | |
| Persona | mount | 844 | 832 | 1000 | |
| Pivot | mount | 1456 | 1460 | 1000 | |
| PrimaryButton | mount | 1344 | 1340 | 5000 | |
| Rating | mount | 7938 | 7958 | 5000 | |
| SearchBox | mount | 1389 | 1364 | 5000 | |
| Shimmer | mount | 2602 | 2653 | 5000 | |
| Slider | mount | 1981 | 1983 | 5000 | |
| SpinButton | mount | 5016 | 5025 | 5000 | |
| Spinner | mount | 415 | 434 | 5000 | |
| SplitButton | mount | 3243 | 3222 | 5000 | |
| Stack | mount | 493 | 504 | 5000 | |
| StackWithIntrinsicChildren | mount | 1594 | 1654 | 5000 | |
| StackWithTextChildren | mount | 4898 | 4799 | 5000 | |
| SwatchColorPicker | mount | 10785 | 10803 | 5000 | |
| Tabs | mount | 1494 | 1476 | 1000 | |
| TagPicker | mount | 2522 | 2588 | 5000 | |
| TeachingBubble | mount | 11983 | 12034 | 5000 | |
| Text | mount | 471 | 435 | 5000 | |
| TextField | mount | 1579 | 1457 | 5000 | |
| ThemeProvider | mount | 1200 | 1309 | 5000 | |
| ThemeProvider | virtual-rerender | 604 | 644 | 5000 | |
| ThemeProviderNext | mount | 6559 | 6979 | 5000 | Possible regression |
| Toggle | mount | 806 | 801 | 5000 | |
| buttonNative | mount | 96 | 100 | 5000 |
Perf Analysis (@fluentui/react-northstar)
Perf tests with no regressions
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| ChatDuplicateMessagesPerf.default | 349 | 303 | 1.15:1 |
| AttachmentMinimalPerf.default | 183 | 166 | 1.1:1 |
| RefMinimalPerf.default | 240 | 222 | 1.08:1 |
| ListWith60ListItems.default | 708 | 659 | 1.07:1 |
| SkeletonMinimalPerf.default | 385 | 364 | 1.06:1 |
| TextMinimalPerf.default | 375 | 355 | 1.06:1 |
| ButtonMinimalPerf.default | 181 | 173 | 1.05:1 |
| ChatMinimalPerf.default | 706 | 672 | 1.05:1 |
| LabelMinimalPerf.default | 427 | 408 | 1.05:1 |
| DividerMinimalPerf.default | 397 | 381 | 1.04:1 |
| FormMinimalPerf.default | 462 | 445 | 1.04:1 |
| HeaderMinimalPerf.default | 408 | 391 | 1.04:1 |
| ImageMinimalPerf.default | 400 | 383 | 1.04:1 |
| LayoutMinimalPerf.default | 384 | 368 | 1.04:1 |
| MenuButtonMinimalPerf.default | 1708 | 1638 | 1.04:1 |
| AlertMinimalPerf.default | 296 | 288 | 1.03:1 |
| BoxMinimalPerf.default | 376 | 365 | 1.03:1 |
| ButtonSlotsPerf.default | 574 | 556 | 1.03:1 |
| ProviderMinimalPerf.default | 1019 | 992 | 1.03:1 |
| SegmentMinimalPerf.default | 369 | 359 | 1.03:1 |
| SliderMinimalPerf.default | 1619 | 1576 | 1.03:1 |
| GridMinimalPerf.default | 359 | 353 | 1.02:1 |
| InputMinimalPerf.default | 1287 | 1267 | 1.02:1 |
| ListCommonPerf.default | 682 | 670 | 1.02:1 |
| LoaderMinimalPerf.default | 711 | 694 | 1.02:1 |
| TableManyItemsPerf.default | 2045 | 1996 | 1.02:1 |
| CustomToolbarPrototype.default | 3809 | 3724 | 1.02:1 |
| ToolbarMinimalPerf.default | 979 | 959 | 1.02:1 |
| VideoMinimalPerf.default | 661 | 649 | 1.02:1 |
| AvatarMinimalPerf.default | 206 | 204 | 1.01:1 |
| DropdownMinimalPerf.default | 3067 | 3040 | 1.01:1 |
| EmbedMinimalPerf.default | 4202 | 4175 | 1.01:1 |
| FlexMinimalPerf.default | 301 | 298 | 1.01:1 |
| ItemLayoutMinimalPerf.default | 1273 | 1261 | 1.01:1 |
| MenuMinimalPerf.default | 888 | 882 | 1.01:1 |
| PopupMinimalPerf.default | 580 | 573 | 1.01:1 |
| SplitButtonMinimalPerf.default | 3905 | 3851 | 1.01:1 |
| TreeMinimalPerf.default | 816 | 804 | 1.01:1 |
| AttachmentSlotsPerf.default | 1122 | 1120 | 1:1 |
| CheckboxMinimalPerf.default | 2754 | 2743 | 1:1 |
| DatepickerMinimalPerf.default | 5526 | 5544 | 1:1 |
| ListMinimalPerf.default | 542 | 544 | 1:1 |
| ListNestedPerf.default | 578 | 577 | 1:1 |
| PortalMinimalPerf.default | 177 | 177 | 1:1 |
| RadioGroupMinimalPerf.default | 484 | 483 | 1:1 |
| IconMinimalPerf.default | 622 | 619 | 1:1 |
| TextAreaMinimalPerf.default | 536 | 538 | 1:1 |
| ButtonOverridesMissPerf.default | 1738 | 1752 | 0.99:1 |
| DialogMinimalPerf.default | 771 | 776 | 0.99:1 |
| DropdownManyItemsPerf.default | 705 | 714 | 0.99:1 |
| HeaderSlotsPerf.default | 808 | 813 | 0.99:1 |
| TableMinimalPerf.default | 414 | 419 | 0.99:1 |
| TooltipMinimalPerf.default | 1010 | 1025 | 0.99:1 |
| ProviderMergeThemesPerf.default | 1595 | 1635 | 0.98:1 |
| ReactionMinimalPerf.default | 401 | 410 | 0.98:1 |
| StatusMinimalPerf.default | 724 | 736 | 0.98:1 |
| AnimationMinimalPerf.default | 427 | 442 | 0.97:1 |
| CardMinimalPerf.default | 599 | 620 | 0.97:1 |
| ChatWithPopoverPerf.default | 355 | 366 | 0.97:1 |
| RosterPerf.default | 1251 | 1290 | 0.97:1 |
| TreeWith60ListItems.default | 179 | 184 | 0.97:1 |
| AccordionMinimalPerf.default | 159 | 169 | 0.94:1 |
| CarouselMinimalPerf.default | 458 | 498 | 0.92:1 |
…hore/remove-theme-provider � Conflicts: � .github/CODEOWNERS
bsunderhus
left a comment
There was a problem hiding this comment.
LGTM, amazing 🙌🏼, this is a long waited change IMO. Thx!
I'd say this is
--
Can you please elaborate on this for better transparency for others ? (written form/post-mortem etc) thx! |
I updated PR's description to include the migration guide and examples when |
| import { usePopper } from '@fluentui/react-positioning'; | ||
| import { TooltipContext, useFluent } from '@fluentui/react-shared-contexts'; | ||
| import { useTheme } from '@fluentui/react-theme-provider'; | ||
| import { TooltipContext, useFluent, useTheme } from '@fluentui/react-shared-contexts'; |
There was a problem hiding this comment.
This is technically a breaking change as well as useTheme moved to a different package. Let's hope everybody imports from react-components but would it make sense to add this to breaking changes description?
There was a problem hiding this comment.
Good catch, I added PR's description 👍
…hore/remove-theme-provider � Conflicts: � apps/perf-test/package.json � apps/vr-tests/package.json � packages/react-accordion/package.json � packages/react-components/package.json � packages/react-examples/package.json � packages/react-provider/package.json � packages/react-theme-provider/CHANGELOG.json � packages/react-theme-provider/CHANGELOG.md � packages/react-theme-provider/package.json � packages/react-tooltip/package.json
|
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 283f378:
|
|
🎉 Handy links: |
|
🎉 Handy links: |
|
🎉 Handy links: |
|
🎉 Handy links: |
|
🎉 Handy links: |
BREAKING CHANGES
This PR merges
@fluentui/react-theme-providerwith@fluentui/react-providercomponents.Initially, we were thinking that it will be useful to have a
ThemeProviderthat will provide only theme tokens. But in reality we received duplication and confusion from customers as converged components still requireFluentProviderto wrap their apps. In the same timeFluentProviderembedsThemeProvider...A conversation below is an example of confusion:
FluentProvider🙌ThemeProviderin my app?Another one was related to usages in apps when both providers were used:
Migration guide
We didn't recommend to use
ThemeProvideranywhere for converged packages, but if you have them in your code please replace them withFluentProvider. See an example below.Before
After