Skip to content

Commit 1b2b73a

Browse files
Merge pull request #1036 from storybookjs/next
Create a new pull request by comparing changes across two branches
2 parents ae7de6e + ba47d3e commit 1b2b73a

File tree

310 files changed

+11959
-7192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+11959
-7192
lines changed

.circleci/config.yml

Lines changed: 80 additions & 98 deletions
Large diffs are not rendered by default.

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,13 @@ jobs:
174174
git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" || true
175175
git push origin next
176176
177-
# TODO: remove this step - @JReinhold
177+
# Sync the next.json version file to the main branch so it gets deployed to the docs site
178+
# but only if this is a prerelease, because in minor/major releases we're already force pushing next-release onto main, so it's already there
178179
- name: Sync version JSONs from `next-release` to `main`
179-
if: github.ref_name == 'next-release'
180+
if: github.ref_name == 'next-release' && steps.is-prerelease.outputs.prerelease == 'true'
180181
working-directory: .
181182
run: |
182-
VERSION_FILE="./docs/versions/${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next' || 'latest' }}.json"
183+
VERSION_FILE="./docs/versions/next.json"
183184
git fetch origin main
184185
git checkout main
185186
git pull

.nvmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
22.6.0
1+
22.13.1
2+

.yarn/releases/yarn-4.3.0.cjs

Lines changed: 0 additions & 894 deletions
This file was deleted.

.yarn/releases/yarn-4.6.0.cjs

Lines changed: 934 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ nodeLinker: node-modules
88

99
npmPublishAccess: public
1010

11-
yarnPath: .yarn/releases/yarn-4.3.0.cjs
11+
yarnPath: .yarn/releases/yarn-4.6.0.cjs

CHANGELOG.md

Lines changed: 158 additions & 0 deletions
Large diffs are not rendered by default.

CHANGELOG.prerelease.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
## 8.6.0-alpha.3
2+
3+
- Core: Fix invalid Websocket termination - [#30408](https://github.com/storybookjs/storybook/pull/30408), thanks @valentinpalkovic!
4+
- Core: Improve type compatibility with React 19 - [#30031](https://github.com/storybookjs/storybook/pull/30031), thanks @mrginglymus!
5+
- Preview: Add `globals` to `extract()` - [#30415](https://github.com/storybookjs/storybook/pull/30415), thanks @ndelangen!
6+
7+
## 8.6.0-alpha.2
8+
9+
- Addon Test: Support Vitest 3 browser.test.instances field - [#30309](https://github.com/storybookjs/storybook/pull/30309), thanks @valentinpalkovic!
10+
- Bun: Add support for text lock file - [#30160](https://github.com/storybookjs/storybook/pull/30160), thanks @Arctomachine!
11+
- CLI: Corrected Next.js createScript for pnpm. - [#30304](https://github.com/storybookjs/storybook/pull/30304), thanks @zhyd1997!
12+
13+
## 8.6.0-alpha.1
14+
15+
- Addon Test: Replace `interaction test` -> `component test` - [#30333](https://github.com/storybookjs/storybook/pull/30333), thanks @kylegach!
16+
- Angular: Fix accent character issue - [#30276](https://github.com/storybookjs/storybook/pull/30276), thanks @valentinpalkovic!
17+
- Angular: Support experimental zoneless mode - [#28657](https://github.com/storybookjs/storybook/pull/28657), thanks @anedomansky!
18+
- CLI: Use correct storybook internals import in automigration - [#30290](https://github.com/storybookjs/storybook/pull/30290), thanks @yannbf!
19+
- Core: Add connection timeout notification - [#30288](https://github.com/storybookjs/storybook/pull/30288), thanks @valentinpalkovic!
20+
- Csf Tools: Allow ConfigFile to create more import syntaxes - [#30204](https://github.com/storybookjs/storybook/pull/30204), thanks @yannbf!
21+
- Manager: Escape single quotes in dynamic import paths in wrapManagerEntries function - [#30278](https://github.com/storybookjs/storybook/pull/30278), thanks @valentinpalkovic!
22+
- RNW-Vite: Support requires for images/fonts - [#30305](https://github.com/storybookjs/storybook/pull/30305), thanks @dannyhw!
23+
24+
## 8.6.0-alpha.0
25+
26+
27+
## 8.5.0-beta.11
28+
29+
- CLI: Update a11y-test comment with experimental caveat - [#30258](https://github.com/storybookjs/storybook/pull/30258), thanks @shilman!
30+
- Manager API: Fix infinite render-loop caused by `useSharedState` - [#30259](https://github.com/storybookjs/storybook/pull/30259), thanks @JReinhold!
31+
32+
## 8.5.0-beta.10
33+
34+
- Addon A11y: Adjust default behaviour when using with experimental-addon-test - [#30162](https://github.com/storybookjs/storybook/pull/30162), thanks @valentinpalkovic!
35+
- Addon A11y: Change default element selector - [#30253](https://github.com/storybookjs/storybook/pull/30253), thanks @valentinpalkovic!
36+
- Addon Docs: Make new code panel opt in - [#30248](https://github.com/storybookjs/storybook/pull/30248), thanks @shilman!
37+
- Addon Test: Fix generated path to `vitest.setup.js` - [#30233](https://github.com/storybookjs/storybook/pull/30233), thanks @JReinhold!
38+
39+
## 8.5.0-beta.9
40+
41+
- Addon Test: Add prerequisite check for MSW - [#30193](https://github.com/storybookjs/storybook/pull/30193), thanks @yannbf!
42+
- Addon Test: Improve support for mono-repos - [#30216](https://github.com/storybookjs/storybook/pull/30216), thanks @valentinpalkovic!
43+
- Vitest: Add plugins from `viteFinal` - [#30105](https://github.com/storybookjs/storybook/pull/30105), thanks @JReinhold!
44+
45+
## 8.5.0-beta.8
46+
47+
- Automigrations: Skip vite config file migration for react native web - [#30190](https://github.com/storybookjs/storybook/pull/30190), thanks @dannyhw!
48+
- Maintenance: Move `@types/node` to `devDeps` consistently - [#30163](https://github.com/storybookjs/storybook/pull/30163), thanks @ndelangen!
49+
- Manager: Optimize getPanels function with memoization - [#30192](https://github.com/storybookjs/storybook/pull/30192), thanks @valentinpalkovic!
50+
- RNW-Vite: Fix reanimated support with babel plugin for node_modules - [#30188](https://github.com/storybookjs/storybook/pull/30188), thanks @dannyhw!
51+
- React: Force act running always in sequence - [#30191](https://github.com/storybookjs/storybook/pull/30191), thanks @valentinpalkovic!
52+
- UI: Fix overlapping shadow of testing module on scrollbar - [#30132](https://github.com/storybookjs/storybook/pull/30132), thanks @valentinpalkovic!
53+
- Vite: Fix wrong import paths when configDir is not in project root - [#30206](https://github.com/storybookjs/storybook/pull/30206), thanks @JReinhold!
54+
155
## 8.5.0-beta.7
256

357
- Addon Test: Context menu updates - [#30107](https://github.com/storybookjs/storybook/pull/30107), thanks @ghengeveld!

MIGRATION.md

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<h1>Migration</h1>
22

3-
- [From version 8.4.x to 8.5.x](#from-version-84x-to-85x)
4-
- [Introducing features.developmentModeForBuild](#introducing-featuresdevelopmentmodeforbuild)
3+
- [From version 8.5.x to 8.6.x](#from-version-85x-to-86x)
4+
- [Angular: Support experimental zoneless support](#angular-support-experimental-zoneless-support)
55
- [Added source code panel to docs](#added-source-code-panel-to-docs)
66
- [Addon-a11y: Component test integration](#addon-a11y-component-test-integration)
7+
- [Addon-a11y: Changing the default element selector](#addon-a11y-changing-the-default-element-selector)
78
- [Addon-a11y: Deprecated `parameters.a11y.manual`](#addon-a11y-deprecated-parametersa11ymanual)
8-
- [Indexing behavior of @storybook/experimental-addon-test is changed](#indexing-behavior-of-storybookexperimental-addon-test-is-changed)
9+
- [Addon-test: You should no longer copy the content of `viteFinal` to your configuration](#addon-test-you-should-no-longer-copy-the-content-of-vitefinal-to-your-configuration)
10+
- [Addon-test: Indexing behavior of @storybook/experimental-addon-test is changed](#addon-test-indexing-behavior-of-storybookexperimental-addon-test-is-changed)
911
- [From version 8.2.x to 8.3.x](#from-version-82x-to-83x)
1012
- [Removed `experimental_SIDEBAR_BOTTOM` and deprecated `experimental_SIDEBAR_TOP` addon types](#removed-experimental_sidebar_bottom-and-deprecated-experimental_sidebar_top-addon-types)
1113
- [New parameters format for addon backgrounds](#new-parameters-format-for-addon-backgrounds)
@@ -425,6 +427,37 @@
425427
- [Packages renaming](#packages-renaming)
426428
- [Deprecated embedded addons](#deprecated-embedded-addons)
427429

430+
## From version 8.5.x to 8.6.x
431+
432+
### Angular: Support experimental zoneless support
433+
434+
Storybook now supports [Angular's experimental zoneless mode](https://angular.dev/guide/experimental/zoneless). This mode is intended to improve performance by removing Angular's zone.js dependency. To enable zoneless mode in your Angular Storybook, set the `experimentalZoneless` config in your `angular.json` file:
435+
436+
```diff
437+
{
438+
"projects": {
439+
"your-project": {
440+
"architect": {
441+
"storybook": {
442+
...
443+
"options": {
444+
...
445+
+ "experimentalZoneless": true
446+
}
447+
}
448+
"build-storybook": {
449+
...
450+
"options": {
451+
...
452+
+ "experimentalZoneless": true
453+
}
454+
}
455+
}
456+
}
457+
}
458+
}
459+
```
460+
428461
## From version 8.4.x to 8.5.x
429462

430463
### Introducing features.developmentModeForBuild
@@ -434,25 +467,26 @@ As part of our ongoing efforts to improve the testability and debuggability of S
434467
In development mode, React and other libraries often include additional checks and warnings that help catch potential issues early. These checks are usually stripped out in production builds to optimize performance. However, when running tests or debugging issues in a built Storybook, having these additional checks can be incredibly valuable. One such feature is React's `act`, which ensures that all updates related to a test are processed and applied before making assertions. `act` is crucial for reliable and predictable test results, but it only works correctly when `NODE_ENV` is set to `development`.
435468

436469
```js
437-
// main.js
470+
// .storybook/main.js
438471
export default {
439472
features: {
440473
developmentModeForBuild: true,
441474
},
442475
};
443-
```
476+
````
444477

445478
### Added source code panel to docs
446479

447-
Starting in 8.5, Storybook Docs (`@storybook/addon-docs`) automatically adds a new addon panel to stories that displays a source snippet beneath each story. This works similarly to the existing [source snippet doc block](https://storybook.js.org/docs/writing-docs/doc-blocks#source), but in the story view. It is intended to replace the [Storysource addon](https://storybook.js.org/addons/@storybook/addon-storysource).
480+
Storybook Docs (`@storybook/addon-docs`) now can automatically add a new addon panel to stories that displays a source snippet beneath each story. This is an experimental feature that works similarly to the existing [source snippet doc block](https://storybook.js.org/docs/writing-docs/doc-blocks#source), but in the story view. It is intended to replace the [Storysource addon](https://storybook.js.org/addons/@storybook/addon-storysource).
448481

449-
If you wish to disable this panel globally, add the following line to your `.storybook/preview.js` project configuration. You can also selectively disable/enable at the story level.
482+
To enable this globally, add the following line to your project configuration. You can also configure at the component/story level.
450483

451484
```js
485+
// .storybook/preview.js
452486
export default {
453487
parameters: {
454488
docs: {
455-
codePanel: false,
489+
codePanel: true,
456490
},
457491
},
458492
};
@@ -480,11 +514,30 @@ const annotations = setProjectAnnotations([
480514
beforeAll(annotations.beforeAll);
481515
```
482516
517+
### Addon-a11y: Changing the default element selector
518+
519+
In Storybook 8.5, we changed the default element selector used by the Accessibility addon from `#storybook-root` to `body`. This change was made to align with the default element selector used by the Test addon when running accessibility tests via Vitest. Additionally, Tooltips or Popovers that are rendered outside the `#storybook-root` element will now be included in the accessibility tests per default allowing for a more comprehensive test coverage. If you want to fall back to the previous behavior, you can set the `a11y.element` parameter in your `.storybook/preview.<ts|js>` configuration:
520+
521+
```diff
522+
// .storybook/preview.js
523+
export const parameters = {
524+
a11y: {
525+
+ element: '#storybook-root',
526+
},
527+
};
528+
```
529+
483530
### Addon-a11y: Deprecated `parameters.a11y.manual`
484531
485532
We have deprecated `parameters.a11y.manual` in 8.5. Please use `globals.a11y.manual` instead.
486533
487-
### Indexing behavior of @storybook/experimental-addon-test is changed
534+
### Addon-test: You should no longer copy the content of `viteFinal` to your configuration
535+
536+
In version 8.4 of `@storybook/experimental-addon-test`, it was required to copy any custom configuration you had in `viteFinal` in `main.ts`, to the Vitest Storybook project. This is no longer necessary, as the Storybook Test plugin will automatically include your `viteFinal` configuration. You should remove any configurations you might already have in `viteFinal` to remove duplicates.
537+
538+
This is especially the case for any plugins you might have, as they could now end up being loaded twice, which is likely to cause errors when running tests. In 8.4 we documented and automatically added some Vite plugins from Storybook frameworks like `@storybook/experimental-nextjs-vite` and `@storybook/sveltekit` - **these needs to be removed as well**.
539+
540+
### Addon-test: Indexing behavior of @storybook/experimental-addon-test is changed
488541
489542
The Storybook test addon used to index stories based on the `test.include` field in the Vitest config file. This caused indexing issues with Storybook, because stories could have been indexed by Storybook and not Vitest, and vice versa. Starting in Storybook 8.5.0-alpha.18, we changed the indexing behavior so that it always uses the globs defined in the `stories` field in `.storybook/main.js` for a more consistent experience. It is now discouraged to use `test.include`, please remove it.
490543

code/.storybook/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ const config: StorybookConfig = {
160160
// disable sourcemaps in CI to not run out of memory
161161
sourcemap: process.env.CI !== 'true',
162162
},
163+
server: {
164+
watch: {
165+
// Something odd happens with tsconfig and nx which causes Storybook to keep reloading, so we ignore them
166+
ignored: ['**/.nx/cache/**', '**/tsconfig.json'],
167+
},
168+
},
163169
} satisfies typeof viteConfig);
164170
},
165171
// logLevel: 'debug',

0 commit comments

Comments
 (0)