-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Upgrade from Storybook v7 -> Storybook v8 #11734
Conversation
def0140
to
fe2e8ef
Compare
I'm kicking this SB8 update over in checkout-web and found a storybook-a11y-test patch that works for SB8 (I've not tested if it falls back well in SB7/SB6) over in: https://github.com/Shopify/checkout-web/compare/sb8?expand=1 |
fe2e8ef
to
f4259c0
Compare
f4259c0
to
6254f30
Compare
6254f30
to
bd0a4e8
Compare
6c30c94
to
b706003
Compare
Good codebase hygeine. But also, I need it so I can [upgrade to Storybook v8](#11734) which requires me to move to `@storybook/test-runner` which requires Jest 29.
c5b469e
to
def7af2
Compare
@@ -1,40 +0,0 @@ | |||
/* eslint-disable no-console */ |
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.
Replaced with polaris-react/.storybook/test-runner.ts
"storybook": "storybook dev -p ${POLARIS_STORYBOOK_PORT:=6006} --quiet", | ||
"storybook:build": "storybook build -o build-internal/storybook/static" | ||
"storybook:build": "storybook build -o build-internal/storybook/static", | ||
"storybook:test": "concurrently -k -s first -n 'SB,TEST' -c 'magenta,blue' 'http-server build-internal/storybook/static --port 6006 --silent' 'wait-on tcp:6006 && test-storybook --maxWorkers=2 polaris-react/src/components/Modal/Modal.stories.tsx'" |
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 command is from the Storybook docs
import styles from './DetailsPage.module.css'; | ||
|
||
export const DetailsPage = { | ||
tags: ['skip-tests'], |
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 used to be in polaris-react/scripts/accessibility-check.js
<div style={{height: '500px'}}> | ||
<Button onClick={handleChange}>Open</Button> | ||
<Modal | ||
instant |
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.
Prevents the accessibility checker from running while the CSS fade-in transition for Modal is still happening and giving false positives for color contrast issues.
|
||
export const Default = { | ||
play: async ({canvasElement}) => { | ||
await transitionsAllSettled(canvasElement); |
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.
Prevents the accessibility checker from running while the CSS fade-in transition for Modal is still happening and giving false positives for color contrast issues.
def7af2
to
339efa7
Compare
e840d03
to
d534e60
Compare
@@ -0,0 +1,35 @@ | |||
/* eslint-env node */ |
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.
🙏 🙇 Thankyou @BPScott for pointing me in the right direction with this one!
🤜 🤛
d534e60
to
2b6a8cd
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris@13.2.0 ### Minor Changes - [#11535](#11535) [`bcd16df24`](bcd16df) Thanks [@ShabanaRumane](https://github.com/ShabanaRumane)! - Added support for setting `maxHeight` and `minHeight` on `Popover.Pane` and `Combobox` - [#11907](#11907) [`45308c97a`](45308c9) Thanks [@zakwarsame](https://github.com/zakwarsame)! - Added an optional `fiterLabel` prop to `ActionList` to allow for a custom placeholder ### Patch Changes - [#11897](#11897) [`a83084b3b`](a83084b) Thanks [@jesstelford](https://github.com/jesstelford)! - Fixed edges of disabled `IndexTable.Row` `Checkbox` triggering selection - [#11924](#11924) [`5ec70e688`](5ec70e6) Thanks [@jesstelford](https://github.com/jesstelford)! - Upgrade to jest 29 - [#11929](#11929) [`9ee700be6`](9ee700b) Thanks [@sophschneider](https://github.com/sophschneider)! - Rounded `Navigation` at `mdDown` behind a feature flag - [#11923](#11923) [`ce13c4366`](ce13c43) Thanks [@jesstelford](https://github.com/jesstelford)! - Update dev dependency: `postcss-import@^15.1.0` -> `postcss-import@^16.1.0` - [#11925](#11925) [`364ada59e`](364ada5) Thanks [@sophschneider](https://github.com/sophschneider)! - Updated Frame to only apply rounded Frame when passed a `topBar` - [#11734](#11734) [`1fef06256`](1fef062) Thanks [@jesstelford](https://github.com/jesstelford)! - Upgrade to Storybook v8 - [#11898](#11898) [`1539f0e7c`](1539f0e) Thanks [@jesstelford](https://github.com/jesstelford)! - Removed extra padding around `IndexTable.Row` `Checkbox` - [#11927](#11927) [`5a32a3ff6`](5a32a3f) Thanks [@sophschneider](https://github.com/sophschneider)! - Added `prefers-reduced-motion` media queries to `Frame` width transitions - [#11930](#11930) [`b111629d7`](b111629) Thanks [@jesstelford](https://github.com/jesstelford)! - Migrate Storybook stories to CSF v3 - [#11805](#11805) [`0a9b72721`](0a9b727) Thanks [@LA1CH3](https://github.com/LA1CH3)! - Fixed `IndexTable` `loading` prop to correctly show/hide loading UI when prop value changes - Updated dependencies \[[`5ec70e688`](5ec70e6)]: - @shopify/polaris-icons@9.0.1 - @shopify/polaris-tokens@9.0.1 ## @shopify/polaris-icons@9.0.1 ### Patch Changes - [#11924](#11924) [`5ec70e688`](5ec70e6) Thanks [@jesstelford](https://github.com/jesstelford)! - Upgrade to jest 29 ## @shopify/polaris-migrator@1.0.1 ### Patch Changes - [#11924](#11924) [`5ec70e688`](5ec70e6) Thanks [@jesstelford](https://github.com/jesstelford)! - Upgrade to jest 29 - [#11930](#11930) [`b111629d7`](b111629) Thanks [@jesstelford](https://github.com/jesstelford)! - Migrate Storybook stories to CSF v3 - Updated dependencies \[[`5ec70e688`](5ec70e6)]: - @shopify/polaris-tokens@9.0.1 - @shopify/stylelint-polaris@16.0.1 ## @shopify/polaris-tokens@9.0.1 ### Patch Changes - [#11924](#11924) [`5ec70e688`](5ec70e6) Thanks [@jesstelford](https://github.com/jesstelford)! - Upgrade to jest 29 ## @shopify/stylelint-polaris@16.0.1 ### Patch Changes - Updated dependencies \[[`5ec70e688`](5ec70e6)]: - @shopify/polaris-tokens@9.0.1 ## polaris-for-vscode@1.0.1 ### Patch Changes - Updated dependencies \[[`5ec70e688`](5ec70e6)]: - @shopify/polaris-tokens@9.0.1 ## polaris.shopify.com@1.0.4 ### Patch Changes - [#11924](#11924) [`5ec70e688`](5ec70e6) Thanks [@jesstelford](https://github.com/jesstelford)! - Upgrade to jest 29 - Updated dependencies \[[`a83084b3b`](a83084b), [`5ec70e688`](5ec70e6), [`9ee700be6`](9ee700b), [`bcd16df24`](bcd16df), [`ce13c4366`](ce13c43), [`364ada59e`](364ada5), [`1fef06256`](1fef062), [`45308c97a`](45308c9), [`1539f0e7c`](1539f0e), [`5a32a3ff6`](5a32a3f), [`b111629d7`](b111629), [`0a9b72721`](0a9b727)]: - @shopify/polaris@13.2.0 - @shopify/polaris-icons@9.0.1 - @shopify/polaris-tokens@9.0.1 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
About 90% of the upgrade was handled by
npx storybook@latest upgrade
🎉 (Feels like just yesterday we did the upgrade from v6 -> v7 😅)Node v18
Storybook v8 requires node v18. But we're still stuck on node v16.
🚨 This PR is blocked by;
[v13] Miniumum required node version updated to v20.10.0 #11844Upgrade to Jest 29 #11924Migrate Storybook stories to CSF v3 #11930Performance
Calculated using hyperfine:
main
storybook-8
Results
Combined with the slow-down seen in the upgrade to v7, I'm starting to think Chromatic's marketing about better performance isn't true for us 😅