Skip to content

Commit

Permalink
Merge branch 'next' into typescript-config
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/configure/overview.md
  • Loading branch information
ndelangen committed Jul 6, 2022
2 parents 5d27ec9 + b4bf826 commit a5eace1
Show file tree
Hide file tree
Showing 573 changed files with 11,083 additions and 3,648 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ jobs:
- run:
name: run e2e tests cra
command: yarn test:e2e-framework --pnp cra
- run:
name: run e2e tests vue
command: yarn test:e2e-framework --pnp sfcVue
# - run:
# name: run e2e tests vue
# command: yarn test:e2e-framework --pnp sfcVue
- run:
name: prep artifacts
when: always
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/markdown-link-check-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@
},
{
"pattern": "https://stackblitz.com/*"
},
{
"pattern": "https://*.chromatic.com"
},
{
"pattern": "https://www.chromatic.com/build?*"
},
{
"pattern": "http://*.nodeca.com"
},
{
"pattern": "http://definitelytyped.org/*"
},
{
"pattern": "https://yoursite.com/*"
},
{
"pattern": "https://my-specific-domain.com"
}
]
],
"aliveStatusCodes": [429, 200]
}
120 changes: 120 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,123 @@
## 6.5.0-rc.1 (May 18, 2022)

### Bug Fixes

- CLI: Improve webpack version and add detection of nextjs ([#18220](https://github.com/storybookjs/storybook/pull/18220))
- ArgsTable: Gracefully handle conditional args failures ([#18248](https://github.com/storybookjs/storybook/pull/18248))
- Controls: Fix reset button broken for !undefined URL values ([#18231](https://github.com/storybookjs/storybook/pull/18231))
- Vue3: Add support for TSX in single file components ([#18038](https://github.com/storybookjs/storybook/pull/18038))

## 6.5.0-rc.0 (May 17, 2022)

### Features

- Addon-a11y: Show % of users in toolbar menu ([#18003](https://github.com/storybookjs/storybook/pull/18003))

### Bug Fixes

- Web-components: Clean Lit Expression comments in story source ([#18108](https://github.com/storybookjs/storybook/pull/18108))
- Vue: Map args correctly in CSF3 implicit render function ([#18209](https://github.com/storybookjs/storybook/pull/18209))
- Vue3: Fix CSF3 implicit render function when storyStoreV7 is enabled ([#18208](https://github.com/storybookjs/storybook/pull/182)

### Maintenance

- CLI: Don't throw is Ctrl + C was pressed when selecting a package in the build command ([#18195](https://github.com/storybookjs/storybook/pull/18195))
- Build: Cleanup noise from unit tests ([#18196](https://github.com/storybookjs/storybook/pull/18196))

### Dependency Upgrades

- Fixed PnP compatibility for bundled components package ([#18015](https://github.com/storybookjs/storybook/pull/18015))

## 6.5.0-beta.8 (May 11, 2022)

### Bug Fixes

- Composition: Fix metadata.json incorrectly overriding main.js refs versions ([#18185](https://github.com/storybookjs/storybook/pull/18185))

### Maintenance

- Examples: Set channelOptions to disallow function serialization ([#18071](https://github.com/storybookjs/storybook/pull/18071))

### Dependency Upgrades

- Upgrade to telejson 6 ([#18164](https://github.com/storybookjs/storybook/pull/18164))

## 6.5.0-beta.7 (May 9, 2022)

### Features

- CSF3: Add title prefix support for stories with custom titles ([#17724](https://github.com/storybookjs/storybook/pull/17724))

### Bug Fixes

- Components: Fix race conditions in SyntaxHighlighter ([#18158](https://github.com/storybookjs/storybook/pull/18158))

### Maintenance

- API: Deprecate isToolshown, rename to showToolbar ([#18131](https://github.com/storybookjs/storybook/pull/18131))

## 6.5.0-beta.6 (May 6, 2022)

### Bug Fixes

- Controls: Fix undefined args handling ([#18135](https://github.com/storybookjs/storybook/pull/18135))

### Maintenance

- CLI: Update Introduction.stories.mdx template to be MDX2-friendly ([#18141](https://github.com/storybookjs/storybook/pull/18141))

### Dependency Upgrades

- Remove jest from cli peerDependencies ([#18149](https://github.com/storybookjs/storybook/pull/18149))

## 6.5.0-beta.5 (May 4, 2022)

### Bug Fixes

- Core: Fix anonymous ID generation ([#18133](https://github.com/storybookjs/storybook/pull/18133))

## 6.5.0-beta.4 (May 4, 2022)

### Features

- UI: Add a parent level toolbar exclusion key for tabs ([#18106](https://github.com/storybookjs/storybook/pull/18106))
- Addon-a11y: Display a11y issues number in addon tab title ([#17983](https://github.com/storybookjs/storybook/pull/17983))

### Bug Fixes

- Addon-docs: Fix Canvas block CURRENT_SELECTION handling ([#18130](https://github.com/storybookjs/storybook/pull/18130))
- Telemetry: Add safecheck for crash reports ([#18129](https://github.com/storybookjs/storybook/pull/18129))
- Addon-a11y: Fix a11y params > element use ([#17989](https://github.com/storybookjs/storybook/pull/17989))

## 6.5.0-beta.3 (May 4, 2022)

### Bug Fixes

- UI: Externalize `react-syntax-highlighter` from components ([#18127](https://github.com/storybookjs/storybook/pull/18127))

## 6.5.0-beta.2 (May 2, 2022)

### Features

- Core: Add optional telemetry and crash reporting ([#18046](https://github.com/storybookjs/storybook/pull/18046))

### Bug Fixes

- Controls: Fix URL deserialization for argTypes with mapping ([#18124](https://github.com/storybookjs/storybook/pull/18124))
- Core: Fix telemetry project root detection ([#18125](https://github.com/storybookjs/storybook/pull/18125))
- React: Fix version detection for older versions of `react-dom` ([#18105](https://github.com/storybookjs/storybook/pull/18105))
- CLI: Add non-monorepo testing tools to exclude lists ([#18092](https://github.com/storybookjs/storybook/pull/18092))

### Maintenance

- Examples: Update example to restore 6.4 auto-title behavior in UI ([#18109](https://github.com/storybookjs/storybook/pull/18109))
- CLI: Remove git.io URL ([#18070](https://github.com/storybookjs/storybook/pull/18070))
- UI: Make panel position a persistent preference ([#18036](https://github.com/storybookjs/storybook/pull/18036))

### Dependency Upgrades

- React: Fix jest-specific-snapshot dev dependency ([#18095](https://github.com/storybookjs/storybook/pull/18095))

## 6.5.0-beta.1 (April 28, 2022)

### Features
Expand Down
4 changes: 2 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This document outlines some of the processes that the maintainers should adhere
| api:(name) | Issue, bug, or pull request related to Storybook's API (e.g.,[makeDecorator](/docs/addons/addons-api.md#makeDecorator-API)) |
| args | Issue, bug, or pull request related to Storybook's [args](/docs/writing-stories/args.md) |
| babel/webpack | Issue, bug, or pull request related to Storybook's build system (e.g., Webpack or Babel), for Webpack 5 issues see below |
| block:(name) | Issue or bug within a certain surface are of Storybook (e.g., [argsTable](/docs/writing-docs/doc-blocks.md#argstable)) |
| block:(name) | Issue or bug within a certain surface are of Storybook (e.g., [argsTable](/docs/writing-docs/doc-block-argstable.md)) |
| BREAKING CHANGE | Issue or pull request that introduces a breaking change within Storybook's ecosystem. |
| BREAKING PRERELASE | Breaking, but only for prerelease users (not relative to the stable release) |
| build-storybook | Issue, bug, or pull request related to Storybook's production build |
Expand All @@ -24,7 +24,7 @@ This document outlines some of the processes that the maintainers should adhere
| cli | Issue, bug, or pull request that affects the Storybook's CLI |
| compatibility with other tools | Issue, bug, or pull request between Storybook and other tools (e.g., [Nuxt](https://nuxtjs.org/)) |
| components | Issue, bug, or pull request related to Storybook's internal components |
| composition | Issue, bug, or pull request related to Storybook [Composition](/docs/workflows/storybook-composition.md) |
| composition | Issue, bug, or pull request related to Storybook [Composition](/docs/sharing/storybook-composition.md) |
| configuration | Issue, bug, or pull request related to Storybook [configuration](/docs/configure/overview.md) |
| core | Issue, bug, or pull request related to Storybook's Core |
| cra | Issue, bug, or pull request that affects Storybook's compatibility with Create React APP ([CRA](https://create-react-app.dev/docs/getting-started/))|
Expand Down
96 changes: 94 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<h1>Migration</h1>

- [From version 6.4.x to 6.5.0](#from-version-64x-to-650)
- [Vue 3 upgrade](#vue-3-upgrade)
- [React18 new root API](#react18-new-root-api)
- [Renamed isToolshown to showToolbar](#renamed-istoolshown-to-showtoolbar)
- [Deprecated register.js](#deprecated-registerjs)
- [Dropped support for addon-actions addDecorators](#dropped-support-for-addon-actions-adddecorators)
- [Vite builder renamed](#vite-builder-renamed)
Expand All @@ -10,6 +12,7 @@
- [CSF3 auto-title improvements](#csf3-auto-title-improvements)
- [Auto-title filename case](#auto-title-filename-case)
- [Auto-title redundant filename](#auto-title-redundant-filename)
- [Auto-title always prefixes](#auto-title-always-prefixes)
- [From version 6.3.x to 6.4.0](#from-version-63x-to-640)
- [Automigrate](#automigrate)
- [CRA5 upgrade](#cra5-upgrade)
Expand Down Expand Up @@ -200,6 +203,10 @@

## From version 6.4.x to 6.5.0

### Vue 3 upgrade

Storybook 6.5 supports Vue 3 out of the box when you install it fresh. However, if you're upgrading your project from a previous version, you'll need to [follow the steps for opting-in to webpack 5](#webpack-5).

### React18 new root API

React 18 introduces a [new root API](https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html#updates-to-client-rendering-apis). Starting in 6.5, Storybook for React will auto-detect your react version and use the new root API automatically if you're on React18.
Expand All @@ -212,6 +219,21 @@ module.exports = {
};
```

### Renamed isToolshown to showToolbar

Storybook's [manager API](docs/addons/addons-api.md) has deprecated the `isToolshown` option (to show/hide the toolbar) and renamed it to `showToolbar` for consistency with other similar UI options.

Example:

```js
// .storybook/manager.js
import { addons } from '@storybook/addons';

addons.setConfig({
showToolbar: false,
});
```

### Deprecated register.js

In ancient versions of Storybook, addons were registered by referring to `addon-name/register.js`. This is going away in SB7.0. Instead you should just add `addon-name` to the `addons` array in `.storybook/main.js`.
Expand Down Expand Up @@ -288,6 +310,19 @@ This might be considered a breaking change. However, we feel justified to releas
1. We consider it a bug in the initial auto-title implementation
2. CSF3 and the auto-title feature are experimental, and we reserve the right to make breaking changes outside of semver (tho we try to avoid it)

If you want to restore the old titles in the UI, you can customize your sidebar with the following code snippet in `.storybook/manager.js`:

```js
import { addons } from '@storybook/addons';
import startCase from 'lodash/startCase';

addons.setConfig({
sidebar: {
renderLabel: ({ name, type }) => (type === 'story' ? name : startCase(name)),
},
});
```

#### Auto-title redundant filename

The heuristic failed in the common scenario in which each component gets its own directory, e.g. `atoms/Button/Button.stories.js`, which would result in the redundant title `Atoms/Button/Button`. Alternatively, `atoms/Button/index.stories.js` would result in `Atoms/Button/Index`.
Expand All @@ -301,6 +336,36 @@ Since CSF3 is experimental, we are introducing this technically breaking change
export default { title: 'Atoms/Button/Button' };
```

#### Auto-title always prefixes

When the user provides a `prefix` in their `main.js` `stories` field, it now prefixes all titles to matching stories, whereas in 6.4 and earlier it only prefixed auto-titles.

Consider the following example:

```js
// main.js
module.exports = {
stories: [{ directory: '../src', titlePrefix: 'Custom' }]
}

// ../src/NoTitle.stories.js
export default { component: Foo };

// ../src/Title.stories.js
export default { component: Bar, title: 'Bar' }
```

In 6.4, the final titles would be:

- `NoTitle.stories.js` => `Custom/NoTitle`
- `Title.stories.js` => `Bar`

In 6.5, the final titles would be:

- `NoTitle.stories.js` => `Custom/NoTitle`
- `Title.stories.js` => `Custom/Bar`

<!-- markdown-link-check-disable -->
## From version 6.3.x to 6.4.0

### Automigrate
Expand All @@ -314,7 +379,9 @@ For example, if you're in a webpack5 project but still use Storybook's default w
You can run the existing suite of automigrations to see which ones apply to your project. This won't update any files unless you accept the changes:

```
npx sb@next automigrate
```

The automigration suite also runs when you create a new project (`sb init`) or when you update storybook (`sb upgrade`).
Expand All @@ -324,7 +391,9 @@ The automigration suite also runs when you create a new project (`sb init`) or w
Storybook 6.3 supports CRA5 out of the box when you install it fresh. However, if you're upgrading your project from a previous version, you'll need to upgrade the configuration. You can do this automatically by running:

```
npx sb@next automigrate
```

Or you can do the following steps manually to force Storybook to use webpack 5 for building your project:
Expand Down Expand Up @@ -685,7 +754,29 @@ The `--static-dir` flag has been deprecated and will be removed in Storybook 7.0
### Webpack 5
Storybook 6.3 brings opt-in support for building both your project and the manager UI with webpack 5. To do so:
Storybook 6.3 brings opt-in support for building both your project and the manager UI with webpack 5. To do so, there are two ways:
1 - Upgrade command
If you're upgrading your Storybook version, run this command, which will both upgrade your dependencies but also detect whether you should migrate to webpack5 builders and apply the changes automatically:
```shell
npx sb upgrade
```
2 - Automigrate command
If you don't want to change your Storybook version but want Storybook to detect whether you should migrate to webpack5 builders and apply the changes automatically:
```shell
npx sb automigrate
```
3 - Manually
If either methods did not work or you just want to proceed manually, do the following steps:
Install the dependencies:
```shell
yarn add @storybook/builder-webpack5 @storybook/manager-webpack5 --dev
Expand Down Expand Up @@ -2153,7 +2244,7 @@ Theming has been rewritten in v5. If you used theming in v4, please consult the
### Story hierarchy defaults
Storybook's UI contains a hierarchical tree of stories that can be configured by `hierarchySeparator` and `hierarchyRootSeparator` [options](./addons/options/README.md).
Storybook's UI contains a hierarchical tree of stories that can be configured by `hierarchySeparator` and `hierarchyRootSeparator` [options](https://github.com/storybookjs/deprecated-addons/blob/master/MIGRATION.md#options-addon-deprecated).
In Storybook 4.x the values defaulted to `null` for both of these options, so that there would be no hierarchy by default.
Expand Down Expand Up @@ -2818,3 +2909,4 @@ If you **are** using these addons, it takes two steps to migrate:
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
```
<!-- markdown-link-check-enable -->
Loading

0 comments on commit a5eace1

Please sign in to comment.