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

chore: migrate to Storybook v6.0.x #17033

Merged
merged 18 commits into from
Feb 23, 2021

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Feb 17, 2021

Pull request checklist

Description of changes

  • migrated to SB v6.0.x
  • update necessary configs (react-examples)
  • moved webpack loaders/sb addons to single version policy, as those were causing various errors to node modules resolution path ( probably require.resolve would do the trick, but going forward single version policy is the way forward )
  • apparently we cannot use various versions of packages in our /pacakges until explicitly configured (syncpack restriction) so I bumped SB over there as well

Focus areas to test

  • note that running SB is much slower than before (Looks like deprecated addon-info is the main culprit - this will be resolved in follow up PRs once we migrate away from addon-info to addon-docs)

@DustyTheBot
Copy link

DustyTheBot commented Feb 17, 2021

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

Generated by 🚫 dangerJS against a277f49

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 17, 2021

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 a277f49:

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration
codesandbox-react-northstar-template Configuration

@Hotell
Copy link
Contributor Author

Hotell commented Feb 17, 2021

Issues: (solved ✅)

Ok so those 2 deps are peerDeps of sass-loader (it's unfortunate that satisfied resolve this as an error)
image

-> to fix it I'm gonna ignore sass completely within satisfied


Hmm, CI fails on satisfied error. TBH I'm not sure what the actual problem is. any thoughts @ecraig12345 ?

image

quite interesting 🤔
image

When I run --fix it errors out because there is no way hot to add -W flag to yarn
satisfied --skip-invalid --fix yarn
image

@ecraig12345
Copy link
Member

Hmm, CI fails on satisfied error. TBH I'm not sure what the actual problem is. any thoughts @ecraig12345?

It's not quite clear to me either from the satisfied docs (and I don't have background on why this check was added). My guess would be something about a missing or invalid peer dependency?

Copy link
Member

@ecraig12345 ecraig12345 left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Some minor comments/questions on work so far.

@Hotell
Copy link
Contributor Author

Hotell commented Feb 17, 2021

Looks like I'd also have to move wepack to root
image

UPDATE: I removed source-map-loader from root to postpone this action into separate PR
UPDATE 2: I had to move webpack and friends to root eventually because various build errors, see below

@Hotell Hotell changed the title chore: migrate vr-tests and react-examples to SB v6 chore: migrate to Storybook v6 Feb 18, 2021
@Hotell Hotell force-pushed the hotell/build-system/sb6-migration branch from 74f5de4 to 3f4a6fa Compare February 18, 2021 10:39
@Hotell
Copy link
Contributor Author

Hotell commented Feb 18, 2021

New Issues:

  • yarn workspace @fluentui/docs vr:build is failing

this runs build:docs gulp task

  • which runs:
    • 'build:docs:assets'
    • 'build:docs:webpack' this one fails 🚨

debug troubleshooting so far:

1.react-textarea-autosize: (solved ✅)

bumped to v7.0.4 which provides proper relative paths

  • TextAreaAutoResize imports react-textarea-autosize npm package. Webpack fails on properly resolving browser field which looks like following:

image

Looks like that field is invalid, as webpack adds all supported extensions when trying to resolve this package:

dist/react-textarea-autosize.cjs.js.js
dist/react-textarea-autosize.cjs.js.jsx
dist/react-textarea-autosize.cjs.js.ts
//... FAIL

after manual change to

"browser": {
-    "dist/react-textarea-autosize.cjs.js": "dist/react-textarea-autosize.cjs.browser.js",
+     "dist/react-textarea-autosize.cjs": "dist/react-textarea-autosize.cjs.browser.js",
-    "dist/react-textarea-autosize.esm.js": "dist/react-textarea-autosize.esm.browser.js"
+    "dist/react-textarea-autosize.esm": "dist/react-textarea-autosize.esm.browser.js"
  },

it is resolved properly.

2. TypeError: Cannot read property 'tap' of undefined: (solved ✅)

bumped html-webpack-plugin to v5, which plays well with webpack 5

(node:89182) [DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH] DeprecationWarning: MainTemplate.getAssetPath is deprecated (use Compilation.getAssetPath instead)
(node:89182) [DEP_WEBPACK_MAIN_TEMPLATE_GET_PUBLIC_PATH] DeprecationWarning: MainTemplate.getPublicPath is deprecated (use Compilation.getAssetPath(compilation.outputOptions.publicPath, options) instead)
(node:89182) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
        Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
        Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
[13:01:15] Entrypoint app 3.94 MiB = runtime~app.e0496946db2b4070227b.js 3.26 KiB 46.0c585996cda2762e00e3.js 657 KiB app.ecb35b072e539b5f0422.js 3.3 MiB

ERROR in   TypeError: Cannot read property 'tap' of undefined
  
  - ExternalModuleFactoryPlugin.js:17 ExternalModuleFactoryPlugin.apply
    [fluentui]/[webpack]/lib/ExternalModuleFactoryPlugin.js:17:37
  
  - ExternalsPlugin.js:16 
    [fluentui]/[webpack]/lib/ExternalsPlugin.js:16:63
  
  
  - Hook.js:14 Hook.CALL_DELEGATE [as _call]
    [scripts]/[tapable]/lib/Hook.js:14:14
  
  - Compiler.js:1033 
    [scripts]/[webpack]/lib/Compiler.js:1033:23
  
  
  - Hook.js:18 Hook.CALL_ASYNC_DELEGATE [as _callAsync]
    [scripts]/[tapable]/lib/Hook.js:18:14
  
  - Compiler.js:1030 Compiler.compile
    [scripts]/[webpack]/lib/Compiler.js:1030:28
  
  - Compiler.js:497 Compiler.runAsChild
    [scripts]/[webpack]/lib/Compiler.js:497:8
  
  - child-compiler.js:110 
    [fluentui]/[html-webpack-plugin]/lib/child-compiler.js:110:21
  


client compiled with 1 error in 41529 ms

@Hotell Hotell force-pushed the hotell/build-system/sb6-migration branch from 8d6b305 to 25003fe Compare February 18, 2021 15:23
@fabricteam
Copy link
Collaborator

fabricteam commented Feb 18, 2021

Perf Analysis

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1084 1139 5000
BaseButton mount 921 943 5000
Breadcrumb mount 42107 42016 5000
ButtonNext mount 716 737 5000
Checkbox mount 1581 1594 5000
CheckboxBase mount 1300 1344 5000
ChoiceGroup mount 4969 4919 5000
ComboBox mount 977 961 1000
CommandBar mount 9964 10021 1000
ContextualMenu mount 6122 6139 1000
DefaultButton mount 1157 1177 5000
DetailsRow mount 3751 3720 5000
DetailsRowFast mount 3721 3766 5000
DetailsRowNoStyles mount 3600 3522 5000
Dialog mount 1515 1516 1000
DocumentCardTitle mount 1810 1840 1000
Dropdown mount 3449 3442 5000
FocusTrapZone mount 1761 1830 5000
FocusZone mount 1762 1794 5000
IconButton mount 1805 1789 5000
Label mount 338 330 5000
Layer mount 1847 1812 5000
Link mount 472 484 5000
MakeStyles mount 2019 1970 50000
MenuButton mount 1503 1560 5000
MessageBar mount 1986 2016 5000
Nav mount 3292 3279 1000
OverflowSet mount 1035 1059 5000
Panel mount 1415 1454 1000
Persona mount 845 826 1000
Pivot mount 1422 1415 1000
PrimaryButton mount 1296 1362 5000
Rating mount 7852 7839 5000
SearchBox mount 1389 1378 5000
Shimmer mount 2651 2681 5000
Slider mount 1945 1922 5000
SpinButton mount 5402 5118 5000
Spinner mount 426 406 5000
SplitButton mount 3256 3278 5000
Stack mount 514 524 5000
StackWithIntrinsicChildren mount 1544 1553 5000
StackWithTextChildren mount 4685 4673 5000
SwatchColorPicker mount 10321 10342 5000
Tabs mount 1420 1402 1000
TagPicker mount 2811 2810 5000
TeachingBubble mount 11622 11590 5000
Text mount 417 421 5000
TextField mount 1416 1449 5000
ThemeProvider mount 1156 1164 5000
ThemeProvider virtual-rerender 576 576 5000
ThemeProviderNext mount 1987 1923 5000
Toggle mount 838 829 5000
buttonNative mount 112 112 5000

Perf Analysis (Fluent)

Perf comparison
Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🦄 Avatar.Fluent 0.18 0.49 0.37:1 2000 366
🦄 Button.Fluent 0.13 0.21 0.62:1 5000 668
🔧 Checkbox.Fluent 0.69 0.38 1.82:1 1000 688
🎯 Dialog.Fluent 0.17 0.24 0.71:1 5000 864
🔧 Dropdown.Fluent 3.16 0.44 7.18:1 1000 3159
🔧 Icon.Fluent 0.15 0.07 2.14:1 5000 766
🦄 Image.Fluent 0.09 0.13 0.69:1 5000 454
🔧 Slider.Fluent 1.6 0.46 3.48:1 1000 1595
🔧 Text.Fluent 0.08 0.03 2.67:1 5000 411
🦄 Tooltip.Fluent 0.12 0.95 0.13:1 5000 580

🔧 Needs work     🎯 On target     🦄 Amazing

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AttachmentMinimalPerf.default 212 180 1.18:1
AvatarMinimalPerf.default 243 216 1.13:1
TreeWith60ListItems.default 218 193 1.13:1
AccordionMinimalPerf.default 179 161 1.11:1
AlertMinimalPerf.default 350 318 1.1:1
LoaderMinimalPerf.default 798 742 1.08:1
SegmentMinimalPerf.default 434 404 1.07:1
ButtonMinimalPerf.default 210 199 1.06:1
HeaderSlotsPerf.default 916 868 1.06:1
ListNestedPerf.default 671 640 1.05:1
BoxMinimalPerf.default 426 409 1.04:1
ButtonUseCssPerf.default 888 853 1.04:1
ChatDuplicateMessagesPerf.default 405 391 1.04:1
FlexMinimalPerf.default 355 340 1.04:1
HeaderMinimalPerf.default 427 411 1.04:1
ImageMinimalPerf.default 443 426 1.04:1
ToolbarMinimalPerf.default 1119 1080 1.04:1
AttachmentSlotsPerf.default 1335 1293 1.03:1
ButtonSlotsPerf.default 641 620 1.03:1
ButtonUseCssNestingPerf.default 1134 1098 1.03:1
DropdownManyItemsPerf.default 819 797 1.03:1
ListMinimalPerf.default 590 575 1.03:1
MenuMinimalPerf.default 1010 980 1.03:1
RadioGroupMinimalPerf.default 551 533 1.03:1
ReactionMinimalPerf.default 498 484 1.03:1
RefMinimalPerf.default 268 261 1.03:1
SkeletonMinimalPerf.default 432 418 1.03:1
TextAreaMinimalPerf.default 577 560 1.03:1
TreeMinimalPerf.default 912 888 1.03:1
CardMinimalPerf.default 624 609 1.02:1
ChatWithPopoverPerf.default 469 462 1.02:1
EmbedMinimalPerf.default 4540 4440 1.02:1
GridMinimalPerf.default 405 396 1.02:1
ItemLayoutMinimalPerf.default 1347 1327 1.02:1
LabelMinimalPerf.default 480 471 1.02:1
LayoutMinimalPerf.default 476 466 1.02:1
ListWith60ListItems.default 699 686 1.02:1
ProviderMergeThemesPerf.default 1592 1564 1.02:1
SplitButtonMinimalPerf.default 4016 3956 1.02:1
IconMinimalPerf.default 743 727 1.02:1
TableMinimalPerf.default 479 471 1.02:1
TooltipMinimalPerf.default 877 862 1.02:1
Checkbox.Fluent 688 677 1.02:1
Image.Fluent 454 447 1.02:1
DialogMinimalPerf.default 882 874 1.01:1
StatusMinimalPerf.default 827 815 1.01:1
Avatar.Fluent 366 364 1.01:1
Button.Fluent 668 662 1.01:1
ChatMinimalPerf.default 688 691 1:1
DropdownMinimalPerf.default 3164 3171 1:1
PopupMinimalPerf.default 738 735 1:1
ProviderMinimalPerf.default 958 961 1:1
Dropdown.Fluent 3159 3168 1:1
Icon.Fluent 766 763 1:1
Tooltip.Fluent 580 582 1:1
CarouselMinimalPerf.default 522 529 0.99:1
CheckboxMinimalPerf.default 2928 2953 0.99:1
InputMinimalPerf.default 1317 1325 0.99:1
MenuButtonMinimalPerf.default 1686 1701 0.99:1
PortalMinimalPerf.default 176 177 0.99:1
TableManyItemsPerf.default 2188 2218 0.99:1
CustomToolbarPrototype.default 3696 3750 0.99:1
Dialog.Fluent 864 873 0.99:1
ButtonOverridesMissPerf.default 1708 1746 0.98:1
Text.Fluent 411 420 0.98:1
AnimationMinimalPerf.default 433 445 0.97:1
SliderMinimalPerf.default 1556 1612 0.97:1
TextMinimalPerf.default 407 421 0.97:1
Slider.Fluent 1595 1642 0.97:1
DividerMinimalPerf.default 431 452 0.95:1
FormMinimalPerf.default 480 503 0.95:1
ListCommonPerf.default 717 756 0.95:1
VideoMinimalPerf.default 691 738 0.94:1
RosterPerf.default 1221 1337 0.91:1
DatepickerMinimalPerf.default 49202 55454 0.89:1

@size-auditor
Copy link

size-auditor bot commented Feb 18, 2021

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-northstar-Portal 63.401 kB 63.385 kB BelowBaseline     -16 bytes
office-ui-fabric-react fluentui-react-northstar-Image 89.381 kB 89.311 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Header 90.661 kB 90.591 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-ItemLayout 94.624 kB 94.554 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Grid 86.111 kB 86.041 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Flex 54.802 kB 54.732 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Embed 98.198 kB 98.128 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Divider 93.026 kB 92.956 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Dialog 128.854 kB 128.784 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Attachment 104.062 kB 103.992 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Checkbox 96.752 kB 96.682 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Chat 157.86 kB 157.79 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Card 99.409 kB 99.339 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Button 99.845 kB 99.775 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Breadcrumb 96.731 kB 96.661 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Box 91.404 kB 91.334 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Avatar 95.796 kB 95.726 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Alert 104.478 kB 104.408 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Layout 91.329 kB 91.259 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Label 94.34 kB 94.27 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Accordion 102.66 kB 102.59 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-List 105.785 kB 105.715 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Segment 92.533 kB 92.463 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Video 91.267 kB 91.197 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Tooltip 120.713 kB 120.643 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-TextArea 90.116 kB 90.046 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Text 89.877 kB 89.807 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Table 97.633 kB 97.563 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-SvgIcon 43.992 kB 43.922 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Status 92.653 kB 92.583 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Loader 94.991 kB 94.921 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Skeleton 94.174 kB 94.104 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Slider 101.113 kB 101.043 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Reaction 93.777 kB 93.707 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-RadioGroup 100.433 kB 100.363 kB BelowBaseline     -70 bytes
office-ui-fabric-react fluentui-react-northstar-Menu 142.646 kB 142.572 kB BelowBaseline     -74 bytes
office-ui-fabric-react fluentui-react-northstar-SplitButton 189.951 kB 189.875 kB BelowBaseline     -76 bytes
office-ui-fabric-react fluentui-react-northstar-Carousel 121.454 kB 121.378 kB BelowBaseline     -76 bytes
office-ui-fabric-react fluentui-react-northstar-Popup 146.154 kB 146.078 kB BelowBaseline     -76 bytes
office-ui-fabric-react fluentui-react-northstar-MenuButton 177.197 kB 177.121 kB BelowBaseline     -76 bytes
office-ui-fabric-react fluentui-react-northstar-Animation 59.205 kB 59.129 kB BelowBaseline     -76 bytes
office-ui-fabric-react fluentui-react-northstar-Toolbar 187.63 kB 187.554 kB BelowBaseline     -76 bytes
office-ui-fabric-react fluentui-react-northstar-Tree 106.517 kB 106.433 kB BelowBaseline     -84 bytes
office-ui-fabric-react fluentui-react-northstar-Dropdown 211.541 kB 211.453 kB BelowBaseline     -88 bytes
office-ui-fabric-react fluentui-react-northstar-Form 109.081 kB 108.993 kB BelowBaseline     -88 bytes
office-ui-fabric-react fluentui-react-northstar-Input 99.696 kB 99.605 kB BelowBaseline     -91 bytes
office-ui-fabric-react fluentui-react-northstar-Datepicker 204.92 kB 204.822 kB BelowBaseline     -98 bytes
office-ui-fabric-react fluentui-react-northstar-Provider 101.254 kB 100.988 kB BelowBaseline     -266 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: ada2cf5ba6f6adac058aa52fa5ff163e48f7576c (build)

@Hotell
Copy link
Contributor Author

Hotell commented Feb 18, 2021

Issues update:

1. @fluentui/projects-test test is failing

Note: this passes on my local machine

yarn lage build --to @fluentui/projects-tests 
 // then
yarn workspace @fluentui/projects-tests test

Results in
image

CI:

UPDATE: after manual re-run it passed (CI is quite flaky) - https://uifabric.visualstudio.com/fabricpublic/_build/results?buildId=189317&view=logs&j=1e96f989-784f-546f-05bb-8f7d8dfe5399&t=1d2e21c4-a3ed-5b3f-9928-c286f8ffc322

Failed pipeline: https://uifabric.visualstudio.com/fabricpublic/_build/results?buildId=189317&view=logs&j=258ec178-2d8b-5611-7b9b-60c5c95dae55&t=3dbc0aa8-94d2-5f1a-6c00-c4086d74d6b7

image

[!] '@babel/runtime/helpers/esm/extends' is imported by node_modules/@fluentui/react-northstar/dist/es/components/Accordion/Accordion.js, but could not be resolved – treating it as an external dependency
verb @fluentui/projects-test test |  

any ideas @ecraig12345 @layershifter ?

@Hotell Hotell added the Status: Blocked Resolution blocked by another issue label Feb 18, 2021
@Hotell Hotell removed the request for review from bsunderhus February 18, 2021 17:54
@Hotell
Copy link
Contributor Author

Hotell commented Feb 18, 2021

Last issue

image

There are 168 changes in Screener tests 🍿.
Looks like there are changes related to storybook container padding, which IMHO is not a real issue. How should we proceed ?

image

Any help with resolving those is more than welcome.

@JustSlone
Copy link
Collaborator

RE:

There are 168 changes in Screener tests 🍿.
Looks like there are changes related to storybook container padding, which IMHO is not a real issue. How should we proceed ?

Seems like we should just review and approve these changes, right?

@layershifter
Copy link
Member

any ideas @ecraig12345 @layershifter ?

I was not able to repro this issue locally on this branch. So yeah, it might be a flaky build, however I haven't seen any flakiness in this test before 🤔

Failed pipeline: https://uifabric.visualstudio.com/fabricpublic/_build/results?buildId=189317&view=logs&j=258ec178-2d8b-5611-7b9b-60c5c95dae55&t=3dbc0aa8-94d2-5f1a-6c00-c4086d74d6b7

A result of build:test:list job

This build is successful, can you please provide a link to a failed build?

@layershifter
Copy link
Member

There are 168 changes in Screener tests 🍿.
Looks like there are changes related to storybook container padding, which IMHO is not a real issue. How should we proceed ?

There is definitely a difference in padding on body between master and this branch:

master

box model of body on master

Hotell:hotell/build-system/sb6-migration

box model of body on this branch

However, in this case all tests should fail. I think that this is somehow related to changes in .addDecorator(). I performed a small change in apps/vr-tests/src/utilities/FabricDecorator.tsx:

export const FabricDecoratorTall: DecoratorFunction<StoryFnReactReturnType> = story => (
-  <div style={{ display: 'flex' }}>
-    <div className="testWrapper" style={{ padding: '10px 10px 120px' }}>
+  <div style={{ display: 'flex' }} id="#FabricDecoratorTall">
+    <div className="testWrapper" style={{ padding: '10px 10px 120px', border: '1px solid' }}>
      {story()}
    </div>
  </div>
);

master

An example preview
A DOM for the example

Hotell:hotell/build-system/sb6-migration

An example preview
A DOM for the example

For an unknown reason Storybook doubles decorators now:

.addDecorator(FabricDecoratorTall)

I removed this call locally and got only single decorator afterwards.

@Hotell
Copy link
Contributor Author

Hotell commented Feb 19, 2021

Found the main regression:

There are inline styles injected into body, Do we inject those by some magic in ui-fabric ?

Before:
image

After:
image

@Hotell
Copy link
Contributor Author

Hotell commented Feb 19, 2021

any ideas @ecraig12345 @layershifter ?

I was not able to repro this issue locally on this branch. So yeah, it might be a flaky build, however I haven't seen any flakiness in this test before 🤔

Failed pipeline: https://uifabric.visualstudio.com/fabricpublic/_build/results?buildId=189317&view=logs&j=258ec178-2d8b-5611-7b9b-60c5c95dae55&t=3dbc0aa8-94d2-5f1a-6c00-c4086d74d6b7

A result of build:test:list job

This build is successful, can you please provide a link to a failed build?

I re-run the pipeline, probably got overridden by it. sorry about that

@layershifter
Copy link
Member

layershifter commented Feb 19, 2021

There are inline styles injected into body, Do we inject those by some magic in ui-fabric ?

It comes from Storybook: storybookjs/storybook#12109. I tried in apps/vr-tests/.storybook/preview.js:

export const parameters = { layout: 'fullscreen' }

A box model with parameters

But then there is no margin 😨

@Hotell
Copy link
Contributor Author

Hotell commented Feb 19, 2021

yup -> storybookjs/storybook#12041

they added layout: none but that's in v6.1, I'm gonna temporarily fix it via custom global decorator. Overall sad thing that they didnt mention anything about this in docs/nor migration guide.

@Hotell Hotell force-pushed the hotell/build-system/sb6-migration branch from 569549c to 640bf5d Compare February 19, 2021 16:58
@Hotell
Copy link
Contributor Author

Hotell commented Feb 19, 2021

  • fixed duplicate decorators per story where it was possible
  • added temporary workaround for those that cant be fixed just by removing

This should be now ready 🤞

@Hotell Hotell changed the title chore: migrate to Storybook v6 chore: migrate to Storybook v6.0.x Feb 22, 2021
@@ -41,3 +41,25 @@ export const FabricDecoratorFullWidth: DecoratorFunction<StoryFnReactReturnType>
</div>
</div>
);

const mapper = { default: '', fixed: '300px', full: '100%' };
export function modifyDeprecatedDecoratorStyles(options: {
Copy link
Member

Choose a reason for hiding this comment

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

Is this temporary? If yes, can you please add a small TODO/notice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. I added explicit comments per story, but good idea to add it here as well. thx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

Great job 👍 As @ecraig12345 mentioned I suggest to dedupe at least @babel/* dependencies.

@Hotell Hotell force-pushed the hotell/build-system/sb6-migration branch from bc31c48 to a277f49 Compare February 22, 2021 17:45
Copy link
Member

@ecraig12345 ecraig12345 left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

@Hotell Hotell merged commit 1d57d19 into microsoft:master Feb 23, 2021
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@Hotell Hotell mentioned this pull request Mar 8, 2021
1 task
joshualamusga1 pushed a commit to joshualamusga1/fluentui that referenced this pull request Mar 25, 2021
* chore: migrate vr-tests and react-examples to SB v6
* chore: migrate fluentui/storybook to SB v6 because off syncpack policy
* chore: ignore sass when running satisfied check
* chore: remove source-map-loader from root to make satisfied happy
* chore: remove json-loader which is not needed with webpack 5
* fix(fluentui/docs): fix invalid import which appeared after SB bump/TS single version policy
* chore(vr-tests): turn on skip lib check as sb6 uses ecma modules normalization - esModuleInterop on
* chore: move webpack to single version policy
* chore: bump react-textarea-autosize which had invalid browser path for webpack
* chore: migrate to html-wp-plugin 5 to make docs build work
* chore(vr-tests): add remark about deprecated api
* chore(vr-tests): add SB rendering canvas temporary workaround to remove screener regressions
* chore(vr-tests): remove duplicate decorator insertion where possible
* chore(vr-tests): introduce temporary workaround decorator for non valid ES6 stories that have decorator duplication
* chore: apply yarn-dedupe on @babel scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Build System Status: Blocked Resolution blocked by another issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: migrate to storybook 6.0.x
9 participants