-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
docs: improve DX when using new setup for docs with storybook #20283
docs: improve DX when using new setup for docs with storybook #20283
Conversation
…preview-head explicit to not confuse with default sb behaviour when loading custom preview-head.html
@@ -1,6 +1,6 @@ | |||
import { withFluentProvider, withStrictMode } from '@fluentui/react-storybook'; | |||
import 'cypress-storybook/react'; | |||
import dedent from 'dedent'; | |||
import * as dedent from 'dedent'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was TS error before ( we don't have synthetic default imports enabled )
@@ -157,6 +157,7 @@ | |||
"cypress-storybook": "0.5.1", | |||
"danger": "^6.0.5", | |||
"del": "6.0.0", | |||
"dedent": "0.7.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding explicitly version which is used for custom logic ( removing hidden dependency )
@@ -182,7 +182,6 @@ const templates = { | |||
|
|||
return localConfig; | |||
}, | |||
previewHead: rootMain.previewHead, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 7c24ae9:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 25435def33d60a9314ccdcf63a1ee37f47513c50 (build) |
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 1003 | 1054 | 5000 | |
BaseButton | mount | 1028 | 1049 | 5000 | |
Breadcrumb | mount | 2736 | 2772 | 1000 | |
ButtonNext | mount | 565 | 547 | 5000 | |
Checkbox | mount | 1707 | 1695 | 5000 | |
CheckboxBase | mount | 1471 | 1464 | 5000 | |
ChoiceGroup | mount | 5188 | 5270 | 5000 | |
ComboBox | mount | 1050 | 1058 | 1000 | |
CommandBar | mount | 10679 | 10574 | 1000 | |
ContextualMenu | mount | 6794 | 6898 | 1000 | |
DefaultButton | mount | 1236 | 1262 | 5000 | |
DetailsRow | mount | 4143 | 4124 | 5000 | |
DetailsRowFast | mount | 4143 | 4185 | 5000 | |
DetailsRowNoStyles | mount | 3913 | 3922 | 5000 | |
Dialog | mount | 2575 | 2564 | 1000 | |
DocumentCardTitle | mount | 185 | 184 | 1000 | |
Dropdown | mount | 3516 | 3513 | 5000 | |
FluentProviderNext | mount | 3356 | 3336 | 5000 | |
FluentProviderWithTheme | mount | 217 | 215 | 10 | |
FluentProviderWithTheme | virtual-rerender | 109 | 108 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 228 | 241 | 10 | |
FocusTrapZone | mount | 1933 | 1962 | 5000 | |
FocusZone | mount | 1935 | 1923 | 5000 | |
IconButton | mount | 1923 | 2021 | 5000 | |
Label | mount | 374 | 376 | 5000 | |
Layer | mount | 3434 | 3285 | 5000 | |
Link | mount | 576 | 555 | 5000 | |
MakeStyles | mount | 1897 | 1928 | 50000 | |
MenuButton | mount | 1675 | 1743 | 5000 | |
MessageBar | mount | 2224 | 2202 | 5000 | |
Nav | mount | 3643 | 3679 | 1000 | |
OverflowSet | mount | 1211 | 1228 | 5000 | |
Panel | mount | 2491 | 2462 | 1000 | |
Persona | mount | 899 | 952 | 1000 | |
Pivot | mount | 1591 | 1613 | 1000 | |
PrimaryButton | mount | 1466 | 1462 | 5000 | |
Rating | mount | 8770 | 8816 | 5000 | |
SearchBox | mount | 1506 | 1603 | 5000 | |
Shimmer | mount | 2802 | 2839 | 5000 | |
Slider | mount | 2151 | 2145 | 5000 | |
SpinButton | mount | 5421 | 5392 | 5000 | |
Spinner | mount | 470 | 454 | 5000 | |
SplitButton | mount | 3468 | 3464 | 5000 | |
Stack | mount | 579 | 602 | 5000 | |
StackWithIntrinsicChildren | mount | 1935 | 2015 | 5000 | |
StackWithTextChildren | mount | 5421 | 5352 | 5000 | |
SwatchColorPicker | mount | 11367 | 11508 | 5000 | |
Tabs | mount | 1517 | 1560 | 1000 | |
TagPicker | mount | 2964 | 2940 | 5000 | |
TeachingBubble | mount | 13648 | 13691 | 5000 | |
Text | mount | 493 | 492 | 5000 | |
TextField | mount | 1579 | 1541 | 5000 | |
ThemeProvider | mount | 1331 | 1277 | 5000 | |
ThemeProvider | virtual-rerender | 667 | 680 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 2063 | 2068 | 5000 | |
Toggle | mount | 924 | 936 | 5000 | |
buttonNative | mount | 147 | 167 | 5000 |
Perf Analysis (@fluentui/react-northstar
)
Perf tests with no regressions
Scenario | Current PR Ticks | Baseline Ticks | Ratio |
---|---|---|---|
ButtonMinimalPerf.default | 226 | 197 | 1.15:1 |
ChatDuplicateMessagesPerf.default | 352 | 318 | 1.11:1 |
TreeWith60ListItems.default | 236 | 212 | 1.11:1 |
LabelMinimalPerf.default | 463 | 422 | 1.1:1 |
FlexMinimalPerf.default | 332 | 304 | 1.09:1 |
RefMinimalPerf.default | 270 | 249 | 1.08:1 |
TextAreaMinimalPerf.default | 607 | 563 | 1.08:1 |
AnimationMinimalPerf.default | 481 | 448 | 1.07:1 |
ToolbarMinimalPerf.default | 1099 | 1024 | 1.07:1 |
CarouselMinimalPerf.default | 547 | 515 | 1.06:1 |
FormMinimalPerf.default | 507 | 481 | 1.05:1 |
HeaderMinimalPerf.default | 415 | 394 | 1.05:1 |
ListWith60ListItems.default | 731 | 693 | 1.05:1 |
MenuMinimalPerf.default | 974 | 932 | 1.05:1 |
SkeletonMinimalPerf.default | 421 | 402 | 1.05:1 |
StatusMinimalPerf.default | 783 | 747 | 1.05:1 |
BoxMinimalPerf.default | 390 | 375 | 1.04:1 |
MenuButtonMinimalPerf.default | 1873 | 1794 | 1.04:1 |
PopupMinimalPerf.default | 649 | 627 | 1.04:1 |
DividerMinimalPerf.default | 401 | 388 | 1.03:1 |
PortalMinimalPerf.default | 184 | 178 | 1.03:1 |
TooltipMinimalPerf.default | 1157 | 1128 | 1.03:1 |
AlertMinimalPerf.default | 319 | 313 | 1.02:1 |
AttachmentMinimalPerf.default | 195 | 191 | 1.02:1 |
ChatMinimalPerf.default | 722 | 705 | 1.02:1 |
ChatWithPopoverPerf.default | 434 | 425 | 1.02:1 |
CheckboxMinimalPerf.default | 2952 | 2891 | 1.02:1 |
DatepickerMinimalPerf.default | 6071 | 5927 | 1.02:1 |
EmbedMinimalPerf.default | 4713 | 4609 | 1.02:1 |
ReactionMinimalPerf.default | 445 | 435 | 1.02:1 |
ButtonOverridesMissPerf.default | 1960 | 1944 | 1.01:1 |
DropdownManyItemsPerf.default | 776 | 768 | 1.01:1 |
ItemLayoutMinimalPerf.default | 1342 | 1334 | 1.01:1 |
RosterPerf.default | 1309 | 1298 | 1.01:1 |
ButtonSlotsPerf.default | 621 | 623 | 1:1 |
CardMinimalPerf.default | 632 | 633 | 1:1 |
LoaderMinimalPerf.default | 762 | 765 | 1:1 |
SegmentMinimalPerf.default | 389 | 388 | 1:1 |
SliderMinimalPerf.default | 1833 | 1826 | 1:1 |
SplitButtonMinimalPerf.default | 4758 | 4755 | 1:1 |
TableManyItemsPerf.default | 2188 | 2184 | 1:1 |
CustomToolbarPrototype.default | 4468 | 4472 | 1:1 |
TreeMinimalPerf.default | 895 | 894 | 1:1 |
VideoMinimalPerf.default | 720 | 719 | 1:1 |
AvatarMinimalPerf.default | 219 | 222 | 0.99:1 |
DialogMinimalPerf.default | 809 | 817 | 0.99:1 |
DropdownMinimalPerf.default | 3359 | 3383 | 0.99:1 |
ProviderMergeThemesPerf.default | 1814 | 1825 | 0.99:1 |
AccordionMinimalPerf.default | 181 | 185 | 0.98:1 |
HeaderSlotsPerf.default | 859 | 876 | 0.98:1 |
ListMinimalPerf.default | 587 | 596 | 0.98:1 |
InputMinimalPerf.default | 1398 | 1435 | 0.97:1 |
RadioGroupMinimalPerf.default | 482 | 499 | 0.97:1 |
IconMinimalPerf.default | 695 | 714 | 0.97:1 |
TableMinimalPerf.default | 453 | 468 | 0.97:1 |
ListCommonPerf.default | 711 | 743 | 0.96:1 |
ProviderMinimalPerf.default | 1197 | 1243 | 0.96:1 |
AttachmentSlotsPerf.default | 1178 | 1240 | 0.95:1 |
ImageMinimalPerf.default | 426 | 448 | 0.95:1 |
LayoutMinimalPerf.default | 411 | 434 | 0.95:1 |
ListNestedPerf.default | 611 | 642 | 0.95:1 |
TextMinimalPerf.default | 385 | 407 | 0.95:1 |
GridMinimalPerf.default | 368 | 391 | 0.94:1 |
hmm looks like I'm running into same issue like Peter (#20126) - (VR tests are filing) when deleting the babel.plugin file, meaning it is still probably being used somehow. We'll need to do more investigation which is outside of scope of this PR - thus I'm gonna revert that commit. |
a17e2a7
to
7c24ae9
Compare
…oft#20283) * chore: use explicit version of dedent which is used for custom logic * refactor(.storybook): normalize handling importing fs files and make preview-head explicit to not confuse with default sb behaviour when loading custom preview-head.html * feat(typings): improve addons types to get better DX for consumers * fix(tools): undo manually adding previewHead as that is already spread from root
Pull request checklist
[ ] Include a change request file using$ yarn change
Description of changes
Focus areas to test
(optional)