Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into valentin/add-vitest-3…
Browse files Browse the repository at this point in the history
…-support
  • Loading branch information
valentinpalkovic committed Jan 15, 2025
2 parents b1e99df + d8fe93a commit 2fdb0bf
Show file tree
Hide file tree
Showing 103 changed files with 1,339 additions and 390 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 8.5.0-beta.11

- CLI: Update a11y-test comment with experimental caveat - [#30258](https://github.com/storybookjs/storybook/pull/30258), thanks @shilman!
- Manager API: Fix infinite render-loop caused by `useSharedState` - [#30259](https://github.com/storybookjs/storybook/pull/30259), thanks @JReinhold!

## 8.5.0-beta.10

- Addon A11y: Adjust default behaviour when using with experimental-addon-test - [#30162](https://github.com/storybookjs/storybook/pull/30162), thanks @valentinpalkovic!
- Addon A11y: Change default element selector - [#30253](https://github.com/storybookjs/storybook/pull/30253), thanks @valentinpalkovic!
- Addon Docs: Make new code panel opt in - [#30248](https://github.com/storybookjs/storybook/pull/30248), thanks @shilman!
- Addon Test: Fix generated path to `vitest.setup.js` - [#30233](https://github.com/storybookjs/storybook/pull/30233), thanks @JReinhold!

## 8.5.0-beta.9

- Addon Test: Add prerequisite check for MSW - [#30193](https://github.com/storybookjs/storybook/pull/30193), thanks @yannbf!
- Addon Test: Improve support for mono-repos - [#30216](https://github.com/storybookjs/storybook/pull/30216), thanks @valentinpalkovic!
- Vitest: Add plugins from `viteFinal` - [#30105](https://github.com/storybookjs/storybook/pull/30105), thanks @JReinhold!

## 8.5.0-beta.8

- Automigrations: Skip vite config file migration for react native web - [#30190](https://github.com/storybookjs/storybook/pull/30190), thanks @dannyhw!
Expand Down
16 changes: 15 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [Introducing features.developmentModeForBuild](#introducing-featuresdevelopmentmodeforbuild)
- [Added source code panel to docs](#added-source-code-panel-to-docs)
- [Addon-a11y: Component test integration](#addon-a11y-component-test-integration)
- [Addon-a11y: Changing the default element selector](#addon-a11y-changing-the-default-element-selector)
- [Addon-a11y: Deprecated `parameters.a11y.manual`](#addon-a11y-deprecated-parametersa11ymanual)
- [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)
- [Addon-test: Indexing behavior of @storybook/experimental-addon-test is changed](#addon-test-indexing-behavior-of-storybookexperimental-addon-test-is-changed)
Expand Down Expand Up @@ -482,11 +483,24 @@ const annotations = setProjectAnnotations([
beforeAll(annotations.beforeAll);
```

### Addon-a11y: Changing the default element selector

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:

```diff
// .storybook/preview.js
export const parameters = {
a11y: {
+ element: '#storybook-root',
},
};
```

### Addon-a11y: Deprecated `parameters.a11y.manual`

We have deprecated `parameters.a11y.manual` in 8.5. Please use `globals.a11y.manual` instead.

### 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

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.

Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/a11yRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const runNext = async () => {
export const run = async (input: A11yParameters = defaultParameters) => {
const { default: axe } = await import('axe-core');

const { element = '#storybook-root', config = {}, options = {} } = input;
const { element = 'body', config = {}, options = {} } = input;
const htmlElement = document.querySelector(element as string) ?? document.body;

if (!htmlElement) {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/essentials/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-essentials",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/gfm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-mdx-gfm",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "GitHub Flavored Markdown in Storybook",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/highlight/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-highlight",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Highlight DOM nodes within your stories",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-interactions",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Automate, test and debug user interactions",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/measure/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-measure",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Inspect layouts by visualizing the box model",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/onboarding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-onboarding",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Storybook Addon Onboarding - Introduces a new onboarding experience",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/outline/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-outline",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Outline all elements with CSS to help with layout placement and alignment",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/storysource/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "View a story’s source code to see how it works and paste into your app",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/experimental-addon-test",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Integrate Vitest with Storybook",
"keywords": [
"storybook-addons",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/themes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-themes",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Switch between multiple themes for you components in Storybook",
"keywords": [
"css",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/toolbars/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-toolbars",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Create your own toolbar items that control story rendering",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/viewport/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-viewport",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Build responsive components by adjusting Storybook’s viewport size and orientation",
"keywords": [
"addon",
Expand Down
2 changes: 1 addition & 1 deletion code/builders/builder-vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/builder-vite",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "A plugin to run and build Storybooks with Vite",
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion code/builders/builder-webpack5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/builder-webpack5",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion code/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/core",
"version": "8.5.0-beta.8",
"version": "8.5.0-beta.11",
"description": "Storybook framework-agnostic API",
"keywords": [
"storybook"
Expand Down
Loading

0 comments on commit 2fdb0bf

Please sign in to comment.