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

Release: Prerelease 8.0.0-alpha.10 #25546

Merged
merged 173 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
a7cbe99
Prevent Stories lookup in node_modules
valentinpalkovic Dec 13, 2023
1d98fe1
Fix addon-action module resolution broken for react-native
dannyhw Dec 21, 2023
569175b
Merge branch 'next' into valentin/fix-monorepo-stories-lookup
valentinpalkovic Dec 24, 2023
685b825
Docs: Add autodocs filter function parameter
shilman Dec 27, 2023
5fe992e
Fix sidebar bottom/top
shilman Jan 2, 2024
263ed62
fix: Check optionalDependencies for storybook versions
reyronald Jan 2, 2024
4974d6d
Merge branch 'next' into patch-1
ndelangen Jan 3, 2024
6e8f823
Formatting
reyronald Jan 3, 2024
b7d72d5
Update helpers.ts
reyronald Jan 3, 2024
f44e808
Merge branch 'next' into patch-1
reyronald Jan 3, 2024
fa2364c
Addon Controls: Remove unused hideNoControlsWarning type
yannbf Jan 2, 2024
1f79ab2
upgrade remark-gfm
yannbf Dec 28, 2023
86ed8df
Webpack: Remove deprecated standalone webpackConfig option
yannbf Jan 5, 2024
24714fd
Doc blocks: Remove deprecated props from Story block
yannbf Jan 4, 2024
4c1e858
fix type issues
yannbf Jan 4, 2024
70b462e
Doc blocks: Remove deprecated props from Source block
yannbf Jan 5, 2024
8206b39
Doc blocks: Remove deprecated props from Primary block
yannbf Jan 5, 2024
0de1e99
remove unnecessary file
yannbf Jan 5, 2024
f8cbd82
Merge branch 'next' into shilman/autodocs-filter
shilman Jan 6, 2024
61dc8a0
Tags: Add sidebar/autodocs configuration
shilman Jan 6, 2024
687ec80
Fix build, type errors
shilman Jan 6, 2024
b53d05c
Merge branch 'next' into shilman/autodocs-filter
shilman Jan 6, 2024
34a184b
Add `dev-only` tag
shilman Jan 6, 2024
94d113a
Merge branch 'next' into patch-1
reyronald Jan 8, 2024
1c48374
Merge branch 'next' into yann/upgrade-remark-gfm
valentinpalkovic Jan 9, 2024
5b4773a
Merge remote-tracking branch 'origin/next' into yann/remove-deprecate…
valentinpalkovic Jan 9, 2024
e66c43e
get versioned packages from monorepo if not-latest, bail on init if c…
ndelangen Jan 9, 2024
37ea07e
remove simple-update-notifier and replace it with actual checking
ndelangen Jan 9, 2024
388f698
Merge branch 'next' into norbert/cli-versioning-base2
ndelangen Jan 9, 2024
aa02264
fix version detection
ndelangen Jan 9, 2024
ca72143
Merge branch 'next' into norbert/cli-versioning-base2
ndelangen Jan 9, 2024
3140c35
Refactor Primary component in blocks
valentinpalkovic Jan 9, 2024
ef3de5a
Merge branch 'next' into norbert/cli-versioning-base2
ndelangen Jan 9, 2024
ac23207
apply review comments
ndelangen Jan 9, 2024
168b086
Remove deprecated code from Canvas and Source block components
valentinpalkovic Jan 9, 2024
41eab3f
Upgrade to prettier 3
kasperpeulen Jan 9, 2024
34e364a
Pretty docs
kasperpeulen Jan 9, 2024
c089691
Pretty docs
kasperpeulen Jan 9, 2024
aa63ddd
Fix test
kasperpeulen Jan 9, 2024
da694c8
Fix test
kasperpeulen Jan 9, 2024
54036bc
Fix async logic
kasperpeulen Jan 9, 2024
1f8d8e9
Cleanup
kasperpeulen Jan 9, 2024
a2f7280
Merge branch 'next' into norbert/cli-versioning-base2
ndelangen Jan 9, 2024
3e97a62
Fix parser files
kasperpeulen Jan 9, 2024
13c46e6
Prettier
kasperpeulen Jan 9, 2024
cd8b2a5
Rename excludeFromAutodocs to excludeFromDocsStories
shilman Jan 10, 2024
918f28e
Rename autodocsFitler to stories.filter
shilman Jan 10, 2024
0a8c802
Fix types
shilman Jan 10, 2024
63b9583
Fix typo
shilman Jan 10, 2024
eb6d200
API: Removed deprecated functions, methods and props from manager and…
valentinpalkovic Jan 10, 2024
0cdfbf5
Merge remote-tracking branch 'origin/next' into valentin/remove-depre…
valentinpalkovic Jan 10, 2024
defcd7c
Merge branch 'next' into yann/remove-deprecated-primary-storyblock-props
valentinpalkovic Jan 10, 2024
583e308
Remove deprecated APIs from preview-api
valentinpalkovic Jan 10, 2024
1679414
Merge remote-tracking branch 'origin/next' into yann/remove-deprecate…
valentinpalkovic Jan 10, 2024
835feb5
CLI: Add addon `remove` command
shilman Jan 10, 2024
c95711d
Merge branch 'next' into norbert/cli-versioning-base2
ndelangen Jan 10, 2024
10d3efe
Indexer: Add metaTags and make autodocs inherit them
shilman Jan 10, 2024
03c2ffb
new upgrade flow
JReinhold Jan 10, 2024
7ca83ab
ConfigFile: Fix PNP wrapping logic
shilman Jan 10, 2024
992148f
ensure CsfFile.stories follows the order of __namedExportsOrder
JReinhold Jan 10, 2024
12ce91e
Merge branch 'next' into shlman/add-cli-remove-command
shilman Jan 10, 2024
44608bd
correctly get primary story from CsfFile
JReinhold Jan 10, 2024
677476f
Merge branch 'yann/remove-deprecated-primary-storyblock-props' of git…
JReinhold Jan 10, 2024
080bf57
Merge pull request #25406 from reyronald/patch-1
ndelangen Jan 10, 2024
5d970c7
oops
ndelangen Jan 10, 2024
99e3993
Update snapshots
shilman Jan 10, 2024
4e3ef87
get primary story via componentStoriesFromCSFFile
JReinhold Jan 10, 2024
4ac3f9e
Merge pull request #25517 from storybookjs/norbert/cli-versioning-base2
JReinhold Jan 10, 2024
b29d2a7
Merge pull request #25461 from storybookjs/yann/remove-deprecated-pri…
valentinpalkovic Jan 10, 2024
0e598f8
Merge remote-tracking branch 'origin/next' into valentin/remove-depre…
valentinpalkovic Jan 10, 2024
e27e839
Merge remote-tracking branch 'origin/next' into yann/remove-deprecate…
valentinpalkovic Jan 10, 2024
4b4efed
Merge pull request #25538 from storybookjs/shlman/add-cli-remove-command
shilman Jan 10, 2024
54f3f21
Merge branch 'next-release' into next
storybook-bot Jan 10, 2024
9bdddc8
Fix types and remove deprecated APIs in tests
valentinpalkovic Jan 10, 2024
9c06e2e
Remove unused import
valentinpalkovic Jan 10, 2024
abb5403
Fix user event being inlined by tsup by using an interface
kasperpeulen Jan 10, 2024
c6e7876
Pin TS to >= 4.2 as typefest 2 requires it
kasperpeulen Jan 10, 2024
dd64190
Fix lock file
kasperpeulen Jan 10, 2024
1fb480c
Merge pull request #25547 from storybookjs/kasper/user-event-types
kasperpeulen Jan 10, 2024
7f1e897
Add e2e tests for tags filtering
shilman Jan 10, 2024
f4e9cd2
Disable some e2e stories from chromatic
shilman Jan 10, 2024
c80ad3d
Merge pull request #25548 from storybookjs/kasper/pin-ts-to-4.2
kasperpeulen Jan 10, 2024
e942e71
Merge pull request #25536 from storybookjs/valentin/remove-deprecatio…
valentinpalkovic Jan 10, 2024
de086ad
Merge remote-tracking branch 'origin/next' into kasper/prettier-3
kasperpeulen Jan 10, 2024
80970b8
Add callout pointing to parameters API reference
kylegach Jan 10, 2024
52cc5e1
add better messages and errors
JReinhold Jan 10, 2024
b969c39
Merge pull request #25551 from storybookjs/mention-parameters-api
kylegach Jan 11, 2024
288d250
Remove unnecessary code for inferring layout prop
valentinpalkovic Jan 11, 2024
f3ad083
Merge branch 'next' into yann/upgrade-remark-gfm
valentinpalkovic Jan 11, 2024
9e716e2
test upgrade errors
JReinhold Jan 11, 2024
00ca44c
cleanup
JReinhold Jan 11, 2024
92c285b
Merge branch 'next' of github.com:storybookjs/storybook into cli-vers…
JReinhold Jan 11, 2024
dfa3e99
remove unused upgrade error
JReinhold Jan 11, 2024
452b360
Update remark-related dependencies in codemods
valentinpalkovic Jan 11, 2024
b607d49
Merge pull request #25460 from storybookjs/yann/remove-deprecated-sto…
valentinpalkovic Jan 11, 2024
3291cf2
UI: Wait for globals before rendering UI for Webkit
shilman Jan 11, 2024
b14b4d6
Merge remote-tracking branch 'origin/next' into yann/remove-unsed-add…
valentinpalkovic Jan 11, 2024
7037d8e
Remove deprecated Story type in @storybook/angular
valentinpalkovic Jan 11, 2024
84b9131
Merge pull request #25417 from storybookjs/yann/remove-unsed-addon-co…
valentinpalkovic Jan 11, 2024
6ba3ec5
Fix type issues
valentinpalkovic Jan 11, 2024
3664135
Merge pull request #25558 from storybookjs/valentin/remove-story-type…
valentinpalkovic Jan 11, 2024
3488712
ensure sandbox cli command uses latest version of template with the c…
ndelangen Jan 11, 2024
5dfbe0d
Merge pull request #25301 from storybookjs/yann/upgrade-remark-gfm
valentinpalkovic Jan 11, 2024
d3d806c
Remove standalone `webpackConfig` option TODO comment from Migration
valentinpalkovic Jan 11, 2024
b91be03
Merge remote-tracking branch 'origin/next' into yann/remove-deprecate…
valentinpalkovic Jan 11, 2024
382c6a5
Merge remote-tracking branch 'origin/next' into yann/remove-deprecate…
valentinpalkovic Jan 11, 2024
e24f0ba
make it use the correct branch on the sandbox repo
ndelangen Jan 11, 2024
b7861e9
Merge branch 'next' into norbert/cli-sandbox-versioning
ndelangen Jan 11, 2024
1086e75
Merge pull request #25481 from storybookjs/yann/remove-deprecated-web…
valentinpalkovic Jan 11, 2024
0bdf657
Remove unused ts-expect-error comment
valentinpalkovic Jan 11, 2024
7c39527
Add @babel/preset-react dependency
valentinpalkovic Jan 11, 2024
a41c227
Prettier
kasperpeulen Jan 11, 2024
91f1bb8
Merge pull request #25214 from storybookjs/valentin/fix-monorepo-stor…
valentinpalkovic Jan 11, 2024
7c1fae9
Add tests for navigating to stories/docs filtered from the sidebar
shilman Jan 11, 2024
97bfaab
Merge pull request #25459 from storybookjs/yann/remove-deprecated-sou…
valentinpalkovic Jan 11, 2024
b086e29
Merge remote-tracking branch 'origin/next' into kasper/prettier-3
kasperpeulen Jan 11, 2024
fd4bcf9
Ignore prettier revs
kasperpeulen Jan 11, 2024
007782a
More prettier revs
kasperpeulen Jan 11, 2024
2b8cb0f
Merge branch 'next' into dannyhw/fix-addon-actions-react-native
dannyhw Jan 11, 2024
0356bcc
Add missing link
kylegach Jan 11, 2024
cc844a1
Merge pull request #25568 from storybookjs/docs-stories-typescript-pl…
kylegach Jan 11, 2024
e3a0ac4
Merge branch 'next' into cli-versioned-upgrade
JReinhold Jan 11, 2024
c592054
remove bad prerelease variable from telemetry
JReinhold Jan 12, 2024
fe92180
Merge pull request #25524 from storybookjs/kasper/prettier-3
kasperpeulen Jan 12, 2024
cdccd47
fix automigrations and readmes
JReinhold Jan 12, 2024
803fbc9
Merge branch 'cli-versioned-upgrade' of github.com:storybookjs/storyb…
JReinhold Jan 12, 2024
49e2b62
update message matches new upgrade API
JReinhold Jan 12, 2024
6be67e8
Merge branch 'next' into norbert/cli-sandbox-versioning
ndelangen Jan 12, 2024
023e866
Upgrade test package to vitest 1.1.3
kasperpeulen Jan 12, 2024
46e50dd
Use resolutions instead
kasperpeulen Jan 12, 2024
06d5842
Update lock
kasperpeulen Jan 12, 2024
e2bd020
Merge pull request #25560 from storybookjs/norbert/cli-sandbox-versio…
ndelangen Jan 12, 2024
47cfe3a
Merge pull request #25553 from storybookjs/cli-versioned-upgrade
ndelangen Jan 12, 2024
185e342
Fix e2e tests for navigating to filtered pages
shilman Jan 12, 2024
85257d0
Merge branch 'next' into dannyhw/fix-addon-actions-react-native
shilman Jan 12, 2024
3abd0ba
Merge pull request #25296 from storybookjs/dannyhw/fix-addon-actions-…
shilman Jan 12, 2024
0258ebc
Remove chai types
kasperpeulen Jan 12, 2024
6b8c2df
yarn.lock
kasperpeulen Jan 12, 2024
d9caeb8
Merge pull request #25537 from storybookjs/shilman/add-indexer-metatags
shilman Jan 12, 2024
281253d
Merge pull request #25576 from storybookjs/kasper/vitest-1.0
kasperpeulen Jan 12, 2024
a4585b3
Update CHANGELOG.md for v7.6.8 [skip ci]
storybook-bot Jan 12, 2024
eec6aaa
Remove deprecated properties from manager-api
valentinpalkovic Jan 12, 2024
176fd77
Merge pull request #25578 from storybookjs/valentin/remove-properties…
valentinpalkovic Jan 12, 2024
ee06c80
Merge pull request #25328 from storybookjs/shilman/autodocs-filter
shilman Jan 12, 2024
91c5882
Move preview init parameters to constructor
tmeasday Nov 21, 2023
0cf9b38
Re-enable tests
tmeasday Nov 21, 2023
bea1072
Move initialization promise to Preview and simplify store
tmeasday Nov 21, 2023
166599a
Deprecate `fromId`/`raw`
tmeasday Nov 22, 2023
9d813a0
Refactored Preview + Store errors to new format
tmeasday Nov 22, 2023
1722ea4
Fix error tests
tmeasday Nov 22, 2023
f7e9586
Update code/lib/core-events/src/errors/preview-errors.ts
tmeasday Nov 22, 2023
96f837b
Remove `Preview.initialize`, use `Preview.ready()` instead
tmeasday Nov 23, 2023
f69f96e
fix
ndelangen Nov 24, 2023
7386fb7
fixes
ndelangen Nov 24, 2023
709222e
fixes
ndelangen Nov 24, 2023
24ec131
Ensure we reject `.ready()` if initialization fails
tmeasday Dec 20, 2023
cbf2095
Fix error message and loaders behavior in PreviewWeb.test.ts
tmeasday Dec 20, 2023
7e3c376
fixing tests
ndelangen Jan 5, 2024
3e7e6b4
Create a proxy `storyStore` object on the preview.
tmeasday Jan 11, 2024
bc1e4cd
Update a11y addon to not use story store
tmeasday Jan 11, 2024
67ea6d1
Fix some tests
tmeasday Jan 13, 2024
f73756e
Remove random log
tmeasday Jan 13, 2024
bf01aa7
Fix a11y tests
tmeasday Jan 13, 2024
11108d9
Fix ExternalPreview
tmeasday Jan 14, 2024
e324ed5
Fix unexpected formatting issues
tmeasday Jan 14, 2024
bee8765
Drop unused vars
tmeasday Jan 14, 2024
4821d82
Allow react complaining about errors caught by a boundary
tmeasday Jan 14, 2024
a21ac32
Add deprecation note + pass through `loadStory`
tmeasday Jan 14, 2024
d75b635
Fix typing problems in PreviewWeb test
tmeasday Jan 15, 2024
4084f37
Clean up error message a tiny bit!
tmeasday Jan 15, 2024
2334b1d
fix linting
ndelangen Jan 15, 2024
c356639
Merge pull request #24926 from storybookjs/tom/simplify-preview
shilman Jan 15, 2024
eabb575
Write changelog for 8.0.0-alpha.10 [skip ci]
storybook-bot Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
34e364a0ca1d93555d36a7367d78e8e229493de8
c0896915fb7fb9a8dd416b9aebca17abd909d1c1
a41c227037e7e7249b8b376f838f4f8bcc3e3e59
13c46e6c0b7f3dd8cf4ba42d1cfd6714f4777d54
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 7.6.8

- Addon-actions: Fix module resolution for react-native - [#25296](https://github.com/storybookjs/storybook/pull/25296), thanks [@dannyhw](https://github.com/dannyhw)!
- Storysource: Fix import error - [#25391](https://github.com/storybookjs/storybook/pull/25391), thanks [@unional](https://github.com/unional)!

## 7.6.7

- Core: Skip no-framework error when ignorePreview=true - [#25286](https://github.com/storybookjs/storybook/pull/25286), thanks [@ndelangen](https://github.com/ndelangen)!
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## 8.0.0-alpha.10

- API: Remove deprecations from manager and preview api - [#25536](https://github.com/storybookjs/storybook/pull/25536), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Addon Controls: Remove unused hideNoControlsWarning type - [#25417](https://github.com/storybookjs/storybook/pull/25417), thanks [@yannbf](https://github.com/yannbf)!
- Addon Remark-GFM: Upgrade remark-gfm - [#25301](https://github.com/storybookjs/storybook/pull/25301), thanks [@yannbf](https://github.com/yannbf)!
- Addon-actions: Fix module resolution for react-native - [#25296](https://github.com/storybookjs/storybook/pull/25296), thanks [@dannyhw](https://github.com/dannyhw)!
- Angular: Remove deprecated Story type - [#25558](https://github.com/storybookjs/storybook/pull/25558), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- CLI: Add addon `remove` command - [#25538](https://github.com/storybookjs/storybook/pull/25538), thanks [@shilman](https://github.com/shilman)!
- CLI: Check optionalDependencies for storybook versions - [#25406](https://github.com/storybookjs/storybook/pull/25406), thanks [@reyronald](https://github.com/reyronald)!
- CLI: Sandbox script should use current version to init - [#25560](https://github.com/storybookjs/storybook/pull/25560), thanks [@ndelangen](https://github.com/ndelangen)!
- CLI: Versioned installation of monorepo packages - [#25517](https://github.com/storybookjs/storybook/pull/25517), thanks [@ndelangen](https://github.com/ndelangen)!
- CLI: Versioned upgrade of monorepo packages - [#25553](https://github.com/storybookjs/storybook/pull/25553), thanks [@JReinhold](https://github.com/JReinhold)!
- Core: Prevent stories lookup in node_modules - [#25214](https://github.com/storybookjs/storybook/pull/25214), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Core: Refactor preview and deprecate story store - [#24926](https://github.com/storybookjs/storybook/pull/24926), thanks [@tmeasday](https://github.com/tmeasday)!
- Doc blocks: Remove deprecated props from Primary block - [#25461](https://github.com/storybookjs/storybook/pull/25461), thanks [@yannbf](https://github.com/yannbf)!
- Doc blocks: Remove deprecated props from Source block - [#25459](https://github.com/storybookjs/storybook/pull/25459), thanks [@yannbf](https://github.com/yannbf)!
- Doc blocks: Remove deprecated props from Story block - [#25460](https://github.com/storybookjs/storybook/pull/25460), thanks [@yannbf](https://github.com/yannbf)!
- Maintenance: Pin TS to >= 4.2 as typefest 2 requires it - [#25548](https://github.com/storybookjs/storybook/pull/25548), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- Maintenance: Upgrade to prettier 3 - [#25524](https://github.com/storybookjs/storybook/pull/25524), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- Remove deprecated properties from manager-api - [#25578](https://github.com/storybookjs/storybook/pull/25578), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Test: Fix user event being inlined by tsup by using an interface - [#25547](https://github.com/storybookjs/storybook/pull/25547), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- Test: Upgrade test package to vitest 1.1.3 - [#25576](https://github.com/storybookjs/storybook/pull/25576), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- UI: Add configurable tags-based exclusion from sidebar/autodocs - [#25328](https://github.com/storybookjs/storybook/pull/25328), thanks [@shilman](https://github.com/shilman)!
- Webpack: Remove deprecated standalone webpackConfig option - [#25481](https://github.com/storybookjs/storybook/pull/25481), thanks [@yannbf](https://github.com/yannbf)!

## 8.0.0-alpha.9

- AutoTitle: Fix case-insensitive trailing duplicate - [#25452](https://github.com/storybookjs/storybook/pull/25452), thanks [@ksugawara61](https://github.com/ksugawara61)!
Expand Down
97 changes: 97 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
- [Web Components](#web-components)
- [Dropping default babel plugins in Webpack5-based projects](#dropping-default-babel-plugins-in-webpack5-based-projects)
- [Deprecations which are now removed](#deprecations-which-are-now-removed)
- [Methods and properties from AddonStore](#methods-and-properties-from-addonstore)
- [Methods and properties from PreviewAPI](#methods-and-properties-from-previewapi)
- [Removals in @storybook/types](#removals-in-storybooktypes)
- [--use-npm flag in storybook CLI](#--use-npm-flag-in-storybook-cli)
- [hideNoControlsWarning parameter from addon controls](#hidenocontrolswarning-parameter-from-addon-controls)
- [`setGlobalConfig` from `@storybook/react`](#setglobalconfig-from-storybookreact)
- [StorybookViteConfig type from @storybook/builder-vite](#storybookviteconfig-type-from-storybookbuilder-vite)
- [props from WithTooltipComponent from @storybook/components](#props-from-withtooltipcomponent-from-storybookcomponents)
Expand All @@ -53,8 +57,13 @@
- [storyIndexers](#storyindexers)
- [Deprecated docs parameters](#deprecated-docs-parameters)
- [Description Doc block properties](#description-doc-block-properties)
- [Story Doc block properties](#story-doc-block-properties)
- [Manager API expandAll and collapseAll methods](#manager-api-expandall-and-collapseall-methods)
- [Source Doc block properties](#source-doc-block-properties)
- [Canvas Doc block properties](#canvas-doc-block-properties)
- [`Primary` Doc block properties](#primary-doc-block-properties)
- [`createChannel` from `@storybook/postmessage` and `@storybook/channel-websocket`](#createchannel-from-storybookpostmessage-and--storybookchannel-websocket)
- [StoryStore and methods deprecated](#storystore-and-methods-deprecated)
- [From version 7.5.0 to 7.6.0](#from-version-750-to-760)
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
Expand All @@ -66,6 +75,7 @@
- [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers)
- [From version 7.0.0 to 7.2.0](#from-version-700-to-720)
- [Addon API is more type-strict](#addon-api-is-more-type-strict)
- [Addon-controls hideNoControlsWarning parameter is deprecated](#addon-controls-hidenocontrolswarning-parameter-is-deprecated)
- [From version 6.5.x to 7.0.0](#from-version-65x-to-700)
- [7.0 breaking changes](#70-breaking-changes)
- [Dropped support for Node 15 and below](#dropped-support-for-node-15-and-below)
Expand Down Expand Up @@ -789,10 +799,48 @@ Until the 8.0 release, Storybook provided the `@babel/preset-env` preset for Web

### Deprecations which are now removed

#### Methods and properties from AddonStore

The following methods and properties from the class `AddonStore` in `@storybook/manager-api` are now removed:

- `serverChannel` -> Use `channel` instead
- `getServerChannel` -> Use `getChannel` instead
- `setServerChannel` -> Use `setChannel` instead
- `hasServerChannel` -> Use `hasChannel` instead
- `addPanel`

The following methods and properties from the class `AddonStore` in `@storybook/preview-api` are now removed:

- `serverChannel` -> Use `channel` instead
- `getServerChannel` -> Use `getChannel` instead
- `setServerChannel` -> Use `setChannel` instead
- `hasServerChannel` -> Use `hasChannel` instead

#### Methods and properties from PreviewAPI

The following exports from `@storybook/preview-api` are now removed:

- `useSharedState`
- `useAddonState`

Please file an issue if you need these APIs.

#### Removals in @storybook/types

The following exports from `@storybook/types` are now removed:

- `API_ADDON` -> Use `Addon_Type` instead
- `API_COLLECTION` -> Use `Addon_Collection` instead
- `API_Panels`

#### --use-npm flag in storybook CLI

The `--use-npm` is now removed. Use `--package-manager=npm` instead. [More info here](#cli-option---use-npm-deprecated).

#### hideNoControlsWarning parameter from addon controls

The `hideNoControlsWarning` parameter is now removed. [More info here](#addon-controls-hidenocontrolswarning-parameter-is-deprecated).

#### `setGlobalConfig` from `@storybook/react`

The `setGlobalConfig` (used for reusing stories in your tests) is now removed in favor of `setProjectAnnotations`.
Expand Down Expand Up @@ -886,6 +934,12 @@ More info [here](#autodocs-changes) and [here](#source-block).

`children`, `markdown` and `type` are now removed in favor of the `of` property. [More info](#doc-blocks).

#### Story Doc block properties

The `story` prop is now removed in favor of the `of` property. [More info](#doc-blocks).

Additionally, given that CSF in MDX is not supported anymore, the following props are also removed: `args`, `argTypes`, `decorators`, `loaders`, `name`, `parameters`, `play`, `render`, and `storyName`. [More info](#dropping-support-for-storiesmdx-csf-in-mdx-format-and-mdx1-support).

#### Manager API expandAll and collapseAll methods

The `collapseAll` and `expandAll` APIs (possibly used by addons) are now removed. Please emit events for these actions instead:
Expand All @@ -899,12 +953,43 @@ api.collapseAll() // becomes api.emit(STORIES_COLLAPSE_ALL)
api.expandAll() // becomes api.emit(STORIES_EXPAND_ALL)
```

#### Source Doc block properties

`id` and `ids` are now removed in favor of the `of` property. [More info](#doc-blocks).

#### Canvas Doc block properties

The following properties were removed from the Canvas Doc block:

- children
- isColumn
- columns
- withSource
- mdxSource

[More info](#doc-blocks).

#### `Primary` Doc block properties

The `name` prop is now removed in favor of the `of` property. [More info](#doc-blocks).

#### `createChannel` from `@storybook/postmessage` and `@storybook/channel-websocket`

The `createChannel` APIs from both `@storybook/channel-websocket` and `@storybook/postmessage` are now removed. Please use `createBrowserChannel` instead, from the `@storybook/channels` package.

Additionally, the `PostmsgTransport` type is now removed in favor of `PostMessageTransport`.


#### StoryStore and methods deprecated

The StoryStore (`__STORYBOOK_STORY_STORE__` and `__STORYBOOK_PREVIEW__.storyStore`) are deprecated, and will no longer be accessible in Storybook 9.0.

In particular, the following methods on the `StoryStore` are deprecated and will be removed in 9.0:
- `store.fromId()` - please use `preview.loadStory({ storyId })` instead.
- `store.raw()` - please use `preview.extract()` instead.

Note that both these methods require initialization, so you should await `preview.ready()`.

## From version 7.5.0 to 7.6.0

#### CommonJS with Vite is deprecated
Expand Down Expand Up @@ -1085,6 +1170,18 @@ The API: `addons.addPanel()` is now deprecated, and will be removed in 8.0. Plea

The `render` method can now be a `React.FunctionComponent` (without the `children` prop). Storybook will now render it, rather than calling it as a function.

#### Addon-controls hideNoControlsWarning parameter is deprecated

The `hideNoControlsWarning` parameter is now unused and deprecated, given that the UI of the Controls addon changed in a way that does not display that message anymore.

```ts
export const Primary = {
parameters: {
controls: { hideNoControlsWarning: true }, // this parameter is now unnecessary
},
};
```

## From version 6.5.x to 7.0.0

A number of these changes can be made automatically by the Storybook CLI. To take advantage of these "automigrations", run `npx storybook@latest upgrade --prerelease` or `pnpx dlx storybook@latest upgrade --prerelease`.
Expand Down
1 change: 1 addition & 0 deletions code/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = {
'jest/no-standalone-expect': 'off',
'jest/no-done-callback': 'off',
'jest/no-deprecated-functions': 'off',
'jest/valid-expect': 'off',

'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
'eslint-comments/no-unused-disable': 'error',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 7 additions & 20 deletions code/addons/a11y/src/a11yRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,29 @@ import { addons } from '@storybook/preview-api';
import { EVENTS } from './constants';
import type { A11yParameters } from './params';

const { document, window: globalWindow } = global;
const { document } = global;

const channel = addons.getChannel();
// Holds axe core running state
let active = false;
// Holds latest story we requested a run
let activeStoryId: string | undefined;

const defaultParameters = { config: {}, options: {} };

/**
* Handle A11yContext events.
* Because the event are sent without manual check, we split calls
*/
const handleRequest = async (storyId: string) => {
const { manual } = await getParams(storyId);
if (!manual) {
await run(storyId);
const handleRequest = async (storyId: string, input: A11yParameters = defaultParameters) => {
if (!input?.manual) {
await run(storyId, input);
}
};

const run = async (storyId: string) => {
const run = async (storyId: string, input: A11yParameters = defaultParameters) => {
activeStoryId = storyId;
try {
const input = await getParams(storyId);

if (!active) {
active = true;
channel.emit(EVENTS.RUNNING);
Expand Down Expand Up @@ -69,17 +68,5 @@ const run = async (storyId: string) => {
}
};

/** Returns story parameters or default ones. */
const getParams = async (storyId: string): Promise<A11yParameters> => {
const { parameters } =
(await globalWindow.__STORYBOOK_STORY_STORE__.loadStory({ storyId })) || {};
return (
parameters.a11y || {
config: {},
options: {},
}
);
};

channel.on(EVENTS.REQUEST, handleRequest);
channel.on(EVENTS.MANUAL, run);
10 changes: 8 additions & 2 deletions code/addons/a11y/src/components/A11YPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import { ActionBar, ScrollArea } from '@storybook/components';
import { SyncIcon, CheckIcon } from '@storybook/icons';

import type { AxeResults } from 'axe-core';
import { useChannel, useParameter, useStorybookState } from '@storybook/manager-api';
import {
useChannel,
useParameter,
useStorybookApi,
useStorybookState,
} from '@storybook/manager-api';

import { Report } from './Report';

Expand Down Expand Up @@ -59,6 +64,7 @@ export const A11YPanel: React.FC = () => {
const [error, setError] = React.useState<unknown>(undefined);
const { setResults, results } = useA11yContext();
const { storyId } = useStorybookState();
const api = useStorybookApi();

React.useEffect(() => {
setStatus(manual ? 'manual' : 'initial');
Expand Down Expand Up @@ -92,7 +98,7 @@ export const A11YPanel: React.FC = () => {

const handleManual = useCallback(() => {
setStatus('running');
emit(EVENTS.MANUAL, storyId);
emit(EVENTS.MANUAL, storyId, api.getParameters(storyId, 'a11y'));
}, [storyId]);

const manualActionItems = useMemo(
Expand Down
6 changes: 4 additions & 2 deletions code/addons/a11y/src/components/A11yContext.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('A11YPanel', () => {
});

const getCurrentStoryData = vi.fn();
const getParameters = vi.fn();
beforeEach(() => {
mockedApi.useChannel.mockReset();
mockedApi.useStorybookApi.mockReset();
Expand All @@ -65,7 +66,8 @@ describe('A11YPanel', () => {
mockedApi.useAddonState.mockImplementation((_, defaultState) => React.useState(defaultState));
mockedApi.useChannel.mockReturnValue(vi.fn());
getCurrentStoryData.mockReset().mockReturnValue({ id: storyId, type: 'story' });
mockedApi.useStorybookApi.mockReturnValue({ getCurrentStoryData } as any);
getParameters.mockReturnValue({});
mockedApi.useStorybookApi.mockReturnValue({ getCurrentStoryData, getParameters } as any);
});

it('should render children', () => {
Expand Down Expand Up @@ -94,7 +96,7 @@ describe('A11YPanel', () => {
mockedApi.useChannel.mockReturnValue(emit);
const { rerender } = render(<A11yContextProvider active={false} />);
rerender(<A11yContextProvider active />);
expect(emit).toHaveBeenLastCalledWith(EVENTS.REQUEST, storyId);
expect(emit).toHaveBeenLastCalledWith(EVENTS.REQUEST, storyId, {});
});

it('should emit highlight with no values when inactive', () => {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/A11yContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const A11yContextProvider: React.FC<React.PropsWithChildren<A11yContextPr
);
}, []);
const handleRun = (renderedStoryId: string) => {
emit(EVENTS.REQUEST, renderedStoryId);
emit(EVENTS.REQUEST, renderedStoryId, api.getParameters(renderedStoryId, 'a11y'));
};
const handleClearHighlights = React.useCallback(() => setHighlighted([]), []);
const handleSetTab = React.useCallback((index: number) => {
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/components/Report/HighlightToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function areAllRequiredElementsHighlighted(
return highlightedCount === 0
? CheckBoxStates.UNCHECKED
: highlightedCount === elementsToHighlight.length
? CheckBoxStates.CHECKED
: CheckBoxStates.INDETERMINATE;
? CheckBoxStates.CHECKED
: CheckBoxStates.INDETERMINATE;
}

const HighlightToggle: React.FC<ToggleProps> = ({ toggleId, elementsToHighlight = [] }) => {
Expand Down
Loading