experiment(storybook): Version and theme picker - #20294
Conversation
Chromatic stores published storybooks with commits, we can simply build an azure function to keep the version -> commit mapping and integrate a picker into the docs page
📊 Bundle size reportUnchanged fixtures
|
|
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 b9e145c:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 8cee28054c8667836c0a7ffd69587b4da370658c (build) |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 989 | 1030 | 5000 | |
| BaseButton | mount | 1000 | 1009 | 5000 | |
| Breadcrumb | mount | 2743 | 2715 | 1000 | |
| ButtonNext | mount | 520 | 551 | 5000 | |
| Checkbox | mount | 1714 | 1747 | 5000 | |
| CheckboxBase | mount | 1424 | 1464 | 5000 | |
| ChoiceGroup | mount | 5203 | 5264 | 5000 | |
| ComboBox | mount | 1051 | 1048 | 1000 | |
| CommandBar | mount | 10572 | 10784 | 1000 | |
| ContextualMenu | mount | 6565 | 6674 | 1000 | |
| DefaultButton | mount | 1222 | 1232 | 5000 | |
| DetailsRow | mount | 4016 | 4004 | 5000 | |
| DetailsRowFast | mount | 3950 | 4066 | 5000 | |
| DetailsRowNoStyles | mount | 3856 | 3851 | 5000 | |
| Dialog | mount | 2716 | 2725 | 1000 | |
| DocumentCardTitle | mount | 177 | 187 | 1000 | |
| Dropdown | mount | 3504 | 3491 | 5000 | |
| FluentProviderNext | mount | 3346 | 3377 | 5000 | |
| FluentProviderWithTheme | mount | 223 | 204 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 96 | 105 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 240 | 239 | 10 | |
| FocusTrapZone | mount | 1870 | 1930 | 5000 | |
| FocusZone | mount | 1846 | 1971 | 5000 | |
| IconButton | mount | 1928 | 1913 | 5000 | |
| Label | mount | 358 | 365 | 5000 | |
| Layer | mount | 3086 | 3156 | 5000 | |
| Link | mount | 514 | 522 | 5000 | |
| MakeStyles | mount | 1854 | 1839 | 50000 | |
| MenuButton | mount | 1595 | 1596 | 5000 | |
| MessageBar | mount | 2186 | 2149 | 5000 | |
| Nav | mount | 3501 | 3452 | 1000 | |
| OverflowSet | mount | 1218 | 1149 | 5000 | |
| Panel | mount | 2561 | 2579 | 1000 | |
| Persona | mount | 885 | 894 | 1000 | |
| Pivot | mount | 1524 | 1478 | 1000 | |
| PrimaryButton | mount | 1347 | 1372 | 5000 | |
| Rating | mount | 8364 | 8321 | 5000 | |
| SearchBox | mount | 1432 | 1436 | 5000 | |
| Shimmer | mount | 2703 | 2719 | 5000 | |
| Slider | mount | 2086 | 2114 | 5000 | |
| SpinButton | mount | 5205 | 5318 | 5000 | |
| Spinner | mount | 445 | 445 | 5000 | |
| SplitButton | mount | 3321 | 3331 | 5000 | |
| Stack | mount | 523 | 540 | 5000 | |
| StackWithIntrinsicChildren | mount | 1820 | 1765 | 5000 | |
| StackWithTextChildren | mount | 5033 | 5081 | 5000 | |
| SwatchColorPicker | mount | 10898 | 10848 | 5000 | |
| Tabs | mount | 1509 | 1481 | 1000 | |
| TagPicker | mount | 2801 | 2838 | 5000 | |
| TeachingBubble | mount | 13049 | 13191 | 5000 | |
| Text | mount | 449 | 471 | 5000 | |
| TextField | mount | 1504 | 1489 | 5000 | |
| ThemeProvider | mount | 1187 | 1211 | 5000 | |
| ThemeProvider | virtual-rerender | 613 | 615 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 1996 | 1977 | 5000 | |
| Toggle | mount | 856 | 857 | 5000 | |
| buttonNative | mount | 122 | 132 | 5000 |
Perf Analysis (@fluentui/react-northstar)
Perf tests with no regressions
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| RefMinimalPerf.default | 253 | 224 | 1.13:1 |
| GridMinimalPerf.default | 371 | 344 | 1.08:1 |
| MenuMinimalPerf.default | 946 | 879 | 1.08:1 |
| AlertMinimalPerf.default | 325 | 305 | 1.07:1 |
| SkeletonMinimalPerf.default | 406 | 381 | 1.07:1 |
| TextAreaMinimalPerf.default | 580 | 542 | 1.07:1 |
| TreeWith60ListItems.default | 207 | 196 | 1.06:1 |
| ChatDuplicateMessagesPerf.default | 319 | 303 | 1.05:1 |
| DropdownManyItemsPerf.default | 765 | 731 | 1.05:1 |
| RadioGroupMinimalPerf.default | 495 | 472 | 1.05:1 |
| ReactionMinimalPerf.default | 412 | 392 | 1.05:1 |
| BoxMinimalPerf.default | 389 | 375 | 1.04:1 |
| ButtonMinimalPerf.default | 194 | 187 | 1.04:1 |
| DividerMinimalPerf.default | 406 | 391 | 1.04:1 |
| FormMinimalPerf.default | 458 | 439 | 1.04:1 |
| HeaderMinimalPerf.default | 383 | 370 | 1.04:1 |
| PortalMinimalPerf.default | 180 | 173 | 1.04:1 |
| IconMinimalPerf.default | 668 | 645 | 1.04:1 |
| AccordionMinimalPerf.default | 179 | 174 | 1.03:1 |
| AttachmentSlotsPerf.default | 1139 | 1108 | 1.03:1 |
| AvatarMinimalPerf.default | 224 | 217 | 1.03:1 |
| FlexMinimalPerf.default | 299 | 290 | 1.03:1 |
| TableManyItemsPerf.default | 2071 | 2012 | 1.03:1 |
| TableMinimalPerf.default | 430 | 419 | 1.03:1 |
| AnimationMinimalPerf.default | 445 | 438 | 1.02:1 |
| AttachmentMinimalPerf.default | 182 | 179 | 1.02:1 |
| CardMinimalPerf.default | 632 | 617 | 1.02:1 |
| ItemLayoutMinimalPerf.default | 1314 | 1285 | 1.02:1 |
| LabelMinimalPerf.default | 430 | 421 | 1.02:1 |
| ListWith60ListItems.default | 717 | 704 | 1.02:1 |
| PopupMinimalPerf.default | 599 | 590 | 1.02:1 |
| ProviderMinimalPerf.default | 1169 | 1150 | 1.02:1 |
| SplitButtonMinimalPerf.default | 4574 | 4500 | 1.02:1 |
| CustomToolbarPrototype.default | 4167 | 4100 | 1.02:1 |
| VideoMinimalPerf.default | 715 | 699 | 1.02:1 |
| ButtonOverridesMissPerf.default | 1865 | 1852 | 1.01:1 |
| DatepickerMinimalPerf.default | 5738 | 5699 | 1.01:1 |
| EmbedMinimalPerf.default | 4561 | 4496 | 1.01:1 |
| InputMinimalPerf.default | 1347 | 1339 | 1.01:1 |
| RosterPerf.default | 1338 | 1327 | 1.01:1 |
| SliderMinimalPerf.default | 1752 | 1731 | 1.01:1 |
| StatusMinimalPerf.default | 762 | 755 | 1.01:1 |
| TextMinimalPerf.default | 376 | 371 | 1.01:1 |
| ImageMinimalPerf.default | 398 | 398 | 1:1 |
| LayoutMinimalPerf.default | 399 | 401 | 1:1 |
| ListMinimalPerf.default | 580 | 580 | 1:1 |
| ToolbarMinimalPerf.default | 982 | 986 | 1:1 |
| TreeMinimalPerf.default | 849 | 851 | 1:1 |
| ButtonSlotsPerf.default | 581 | 584 | 0.99:1 |
| ChatMinimalPerf.default | 698 | 703 | 0.99:1 |
| ChatWithPopoverPerf.default | 395 | 401 | 0.99:1 |
| CheckboxMinimalPerf.default | 2818 | 2854 | 0.99:1 |
| DialogMinimalPerf.default | 781 | 792 | 0.99:1 |
| DropdownMinimalPerf.default | 3269 | 3303 | 0.99:1 |
| HeaderSlotsPerf.default | 830 | 841 | 0.99:1 |
| ListCommonPerf.default | 691 | 697 | 0.99:1 |
| MenuButtonMinimalPerf.default | 1713 | 1727 | 0.99:1 |
| ProviderMergeThemesPerf.default | 1667 | 1684 | 0.99:1 |
| CarouselMinimalPerf.default | 493 | 501 | 0.98:1 |
| ListNestedPerf.default | 620 | 631 | 0.98:1 |
| TooltipMinimalPerf.default | 1096 | 1113 | 0.98:1 |
| LoaderMinimalPerf.default | 746 | 774 | 0.96:1 |
| SegmentMinimalPerf.default | 374 | 390 | 0.96:1 |
|
I like the idea. My suggestion would be to use standard storybook controls (their design system) and implement it so it aligns better with overall outcome (storybook design)
For both solution we should create a custom addon. I have created one back in August so it would be good opportunity to finish it and add this functionality as well.
|
However if we build in docs mode we no longer had addon panels and toolbar items :/ |
|
should this be closed ? |

Chromatic stores published storybooks with commits, we can simply build
an azure function to keep the version -> commit mapping and integrate a
picker into the docs page
Theme picker courtesy of @Hotell with the work he's done in #19250
Pull request checklist
$ yarn changeDescription of changes
(give an overview)
Focus areas to test
(optional)