Storybook: Update to RFC about authoring stories#19827
Conversation
Co-authored-by: Martin Hochel <[email protected]>
Co-authored-by: Makoto Morimoto <[email protected]>
Co-authored-by: Makoto Morimoto <[email protected]>
Co-authored-by: Makoto Morimoto <[email protected]>
Co-authored-by: Makoto Morimoto <[email protected]>
|
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 c99cc8c:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 1633178c1545b5111a6ce8912a7d36345ea53949 (build) |
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 793 | 782 | 5000 | |
| BaseButton | mount | 788 | 764 | 5000 | |
| Breadcrumb | mount | 2235 | 2309 | 1000 | |
| ButtonNext | mount | 424 | 424 | 5000 | |
| Checkbox | mount | 1299 | 1297 | 5000 | |
| CheckboxBase | mount | 1116 | 1122 | 5000 | |
| ChoiceGroup | mount | 4024 | 4012 | 5000 | |
| ComboBox | mount | 857 | 831 | 1000 | |
| CommandBar | mount | 8769 | 8750 | 1000 | |
| ContextualMenu | mount | 5548 | 5491 | 1000 | |
| DefaultButton | mount | 967 | 968 | 5000 | |
| DetailsRow | mount | 3237 | 3211 | 5000 | |
| DetailsRowFast | mount | 3254 | 3228 | 5000 | |
| DetailsRowNoStyles | mount | 3103 | 3034 | 5000 | |
| Dialog | mount | 2101 | 2110 | 1000 | |
| DocumentCardTitle | mount | 159 | 144 | 1000 | |
| Dropdown | mount | 2770 | 2756 | 5000 | |
| FluentProviderNext | mount | 2920 | 2915 | 5000 | |
| FluentProviderWithTheme | mount | 195 | 185 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 84 | 81 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 207 | 197 | 10 | |
| FocusTrapZone | mount | 1549 | 1559 | 5000 | |
| FocusZone | mount | 1567 | 1527 | 5000 | |
| IconButton | mount | 1490 | 1490 | 5000 | |
| Label | mount | 303 | 309 | 5000 | |
| Layer | mount | 2583 | 2533 | 5000 | |
| Link | mount | 418 | 426 | 5000 | |
| MakeStyles | mount | 1574 | 1562 | 50000 | |
| MenuButton | mount | 1260 | 1277 | 5000 | |
| MessageBar | mount | 1729 | 1741 | 5000 | |
| Nav | mount | 2842 | 2784 | 1000 | |
| OverflowSet | mount | 962 | 949 | 5000 | |
| Panel | mount | 2020 | 1994 | 1000 | |
| Persona | mount | 728 | 715 | 1000 | |
| Pivot | mount | 1227 | 1240 | 1000 | |
| PrimaryButton | mount | 1115 | 1101 | 5000 | |
| Rating | mount | 6598 | 6575 | 5000 | |
| SearchBox | mount | 1151 | 1151 | 5000 | |
| Shimmer | mount | 2219 | 2175 | 5000 | |
| Slider | mount | 1676 | 1686 | 5000 | |
| SpinButton | mount | 4255 | 4270 | 5000 | |
| Spinner | mount | 369 | 375 | 5000 | |
| SplitButton | mount | 2678 | 2692 | 5000 | |
| Stack | mount | 442 | 444 | 5000 | |
| StackWithIntrinsicChildren | mount | 1437 | 1458 | 5000 | |
| StackWithTextChildren | mount | 3993 | 3940 | 5000 | |
| SwatchColorPicker | mount | 8919 | 8886 | 5000 | |
| Tabs | mount | 1232 | 1243 | 1000 | |
| TagPicker | mount | 2254 | 2262 | 5000 | |
| TeachingBubble | mount | 11118 | 11121 | 5000 | |
| Text | mount | 378 | 383 | 5000 | |
| TextField | mount | 1191 | 1202 | 5000 | |
| ThemeProvider | mount | 1016 | 1028 | 5000 | |
| ThemeProvider | virtual-rerender | 532 | 525 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 1601 | 1603 | 5000 | |
| Toggle | mount | 702 | 705 | 5000 | |
| buttonNative | mount | 122 | 124 | 5000 |
Perf Analysis (@fluentui/react-northstar)
Potential regressions comparing to master
| Scenario | Current PR Ticks | Baseline Ticks | Ratio | Regression Analysis |
|---|---|---|---|---|
| AlertMinimalPerf.default | 233 | 233 | 1:1 | analysis |
Perf tests with no regressions
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| FormMinimalPerf.default | 351 | 325 | 1.08:1 |
| ChatMinimalPerf.default | 576 | 536 | 1.07:1 |
| ReactionMinimalPerf.default | 330 | 309 | 1.07:1 |
| RefMinimalPerf.default | 210 | 199 | 1.06:1 |
| ChatWithPopoverPerf.default | 343 | 326 | 1.05:1 |
| PortalMinimalPerf.default | 160 | 153 | 1.05:1 |
| VideoMinimalPerf.default | 540 | 515 | 1.05:1 |
| TableMinimalPerf.default | 347 | 334 | 1.04:1 |
| AttachmentMinimalPerf.default | 142 | 138 | 1.03:1 |
| TextMinimalPerf.default | 295 | 287 | 1.03:1 |
| HeaderSlotsPerf.default | 649 | 637 | 1.02:1 |
| ListNestedPerf.default | 465 | 458 | 1.02:1 |
| ListWith60ListItems.default | 563 | 550 | 1.02:1 |
| RadioGroupMinimalPerf.default | 383 | 377 | 1.02:1 |
| TextAreaMinimalPerf.default | 425 | 416 | 1.02:1 |
| ButtonOverridesMissPerf.default | 1511 | 1489 | 1.01:1 |
| CardMinimalPerf.default | 460 | 456 | 1.01:1 |
| DropdownManyItemsPerf.default | 578 | 570 | 1.01:1 |
| ImageMinimalPerf.default | 318 | 315 | 1.01:1 |
| ItemLayoutMinimalPerf.default | 1034 | 1028 | 1.01:1 |
| ListCommonPerf.default | 522 | 519 | 1.01:1 |
| MenuButtonMinimalPerf.default | 1382 | 1375 | 1.01:1 |
| ProviderMergeThemesPerf.default | 1470 | 1460 | 1.01:1 |
| ProviderMinimalPerf.default | 973 | 961 | 1.01:1 |
| SegmentMinimalPerf.default | 301 | 297 | 1.01:1 |
| SliderMinimalPerf.default | 1458 | 1447 | 1.01:1 |
| TableManyItemsPerf.default | 1602 | 1582 | 1.01:1 |
| TooltipMinimalPerf.default | 876 | 867 | 1.01:1 |
| AccordionMinimalPerf.default | 122 | 122 | 1:1 |
| CarouselMinimalPerf.default | 408 | 406 | 1:1 |
| CheckboxMinimalPerf.default | 2323 | 2329 | 1:1 |
| DatepickerMinimalPerf.default | 4787 | 4800 | 1:1 |
| DialogMinimalPerf.default | 643 | 646 | 1:1 |
| DropdownMinimalPerf.default | 2711 | 2719 | 1:1 |
| EmbedMinimalPerf.default | 3638 | 3624 | 1:1 |
| HeaderMinimalPerf.default | 304 | 303 | 1:1 |
| InputMinimalPerf.default | 1117 | 1121 | 1:1 |
| LabelMinimalPerf.default | 332 | 331 | 1:1 |
| LayoutMinimalPerf.default | 315 | 314 | 1:1 |
| LoaderMinimalPerf.default | 596 | 594 | 1:1 |
| MenuMinimalPerf.default | 715 | 712 | 1:1 |
| PopupMinimalPerf.default | 507 | 506 | 1:1 |
| StatusMinimalPerf.default | 578 | 576 | 1:1 |
| ToolbarMinimalPerf.default | 803 | 801 | 1:1 |
| TreeMinimalPerf.default | 668 | 667 | 1:1 |
| TreeWith60ListItems.default | 153 | 153 | 1:1 |
| AttachmentSlotsPerf.default | 916 | 922 | 0.99:1 |
| AvatarMinimalPerf.default | 169 | 171 | 0.99:1 |
| ButtonSlotsPerf.default | 479 | 485 | 0.99:1 |
| ChatDuplicateMessagesPerf.default | 250 | 253 | 0.99:1 |
| GridMinimalPerf.default | 285 | 287 | 0.99:1 |
| SplitButtonMinimalPerf.default | 3591 | 3612 | 0.99:1 |
| CustomToolbarPrototype.default | 3515 | 3557 | 0.99:1 |
| AnimationMinimalPerf.default | 348 | 355 | 0.98:1 |
| ListMinimalPerf.default | 424 | 431 | 0.98:1 |
| IconMinimalPerf.default | 525 | 535 | 0.98:1 |
| DividerMinimalPerf.default | 307 | 317 | 0.97:1 |
| SkeletonMinimalPerf.default | 293 | 301 | 0.97:1 |
| ButtonMinimalPerf.default | 147 | 153 | 0.96:1 |
| BoxMinimalPerf.default | 289 | 303 | 0.95:1 |
| FlexMinimalPerf.default | 231 | 244 | 0.95:1 |
| RosterPerf.default | 979 | 1041 | 0.94:1 |
Co-authored-by: Elizabeth Craig <[email protected]>
Co-authored-by: Elizabeth Craig <[email protected]>
| ``` | ||
|
|
||
| 3. If an internal story is broken out into its own file, then the file should mirror the name of the story, which will include the `Internal` keyword and a `.internal.stories` suffix for easier IDE search. | ||
| All `.stories.tsx` files from one Storybook Docs page must be in a dedicated folder. If there is just one Docs page created, this should be `src/stories`. If there are multiple pages created, the folder should be `src/stories/page-name`. |
There was a problem hiding this comment.
Calling out this line to make sure everybody is okay with it.
@ecraig12345 suggested that we could also enforce using src/stories/page-name folder even when there is a single page in the package. This would make it a bit easier to write code mods in the future, but the .stories.tsx extension might be sufficient for that.
After this gets resolved, I think this PR is ready to merge.
|
@JustSlone should we merge this PR? If no, what are action items? |
|
Because this pull request has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. The pull request will still be available for reference. If it's still relevant to merge at some point, you can reopen or make a new version based on the latest code. |
Description of changes
The substantial changes are:
.stories.tsxcan be put to astoriesfolderInternal.stories.tsxinstead ofInternal.internal.stories.tsxOther changes are meant to improve clarity of the RFC without change in meaning.