Skip to content

Commit 6442cfd

Browse files
authored
Merge branch 'storybookjs:next' into my-first-storybook-contribution
2 parents d1d6100 + b400750 commit 6442cfd

File tree

141 files changed

+835
-276
lines changed

Some content is hidden

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

141 files changed

+835
-276
lines changed

CHANGELOG.prerelease.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 8.0.0-rc.3
2+
3+
- Addon-themes: Fix switcher initialization after first start - [#26353](https://github.com/storybookjs/storybook/pull/26353), thanks @valentinpalkovic!
4+
- Build: Upgrade `esbuild` (`0.20.1`) - [#26255](https://github.com/storybookjs/storybook/pull/26255), thanks @43081j!
5+
- Core: Fix path separator issue in check-addon-order - [#26362](https://github.com/storybookjs/storybook/pull/26362), thanks @valentinpalkovic!
6+
- Dependencies: Remove `qs` from `@storybook/manager-api` & `@storybook/channels` - [#26285](https://github.com/storybookjs/storybook/pull/26285), thanks @43081j!
7+
- UI: Fix sidebar scrolling to selected story when state changes - [#26337](https://github.com/storybookjs/storybook/pull/26337), thanks @JReinhold!
8+
- UI: Remove 'left' property from TooltipLinkList and Link components - [#26324](https://github.com/storybookjs/storybook/pull/26324), thanks @valentinpalkovic!
9+
- Viewport: Fix editing when default viewport is set - [#26360](https://github.com/storybookjs/storybook/pull/26360), thanks @shilman!
10+
- Vue: Fix reference error when using re-exports with "vue-component-meta" - [#26303](https://github.com/storybookjs/storybook/pull/26303), thanks @larsrickert!
11+
112
## 8.0.0-rc.2
213

314
- CLI: Add @storybook/addons automigration - [#26295](https://github.com/storybookjs/storybook/pull/26295), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!

MIGRATION.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
- [Removed `passArgsFirst` option](#removed-passargsfirst-option)
6666
- [Methods and properties from AddonStore](#methods-and-properties-from-addonstore)
6767
- [Methods and properties from PreviewAPI](#methods-and-properties-from-previewapi)
68+
- [Removals in @storybook/components](#removals-in-storybookcomponents)
6869
- [Removals in @storybook/types](#removals-in-storybooktypes)
6970
- [--use-npm flag in storybook CLI](#--use-npm-flag-in-storybook-cli)
7071
- [hideNoControlsWarning parameter from addon controls](#hidenocontrolswarning-parameter-from-addon-controls)
@@ -1068,6 +1069,44 @@ The following exports from `@storybook/preview-api` are now removed:
10681069

10691070
Please file an issue if you need these APIs.
10701071

1072+
#### Removals in @storybook/components
1073+
1074+
The `TooltipLinkList` UI component used to customize the Storybook toolbar has been updated to use the `icon` property instead of the `left` property to position its content. If you've enabled this property in your `globalTypes` configuration, addons, or any other place, you'll need to replace it with an `icon` property to mimic the same behavior. For example:
1075+
1076+
```diff
1077+
// .storybook/preview.js|ts
1078+
// Replace your-framework with the framework you are using (e.g., react, vue3)
1079+
import { Preview } from '@storybook/your-framework';
1080+
1081+
const preview: Preview = {
1082+
globalTypes: {
1083+
locale: {
1084+
description: 'Internationalization locale',
1085+
defaultValue: 'en',
1086+
toolbar: {
1087+
icon: 'globe',
1088+
items: [
1089+
{
1090+
value: 'en',
1091+
right: '🇺🇸',
1092+
- left: '$'
1093+
+ icon: 'facehappy'
1094+
title: 'English'
1095+
},
1096+
{ value: 'fr', right: '🇫🇷', title: 'Français' },
1097+
{ value: 'es', right: '🇪🇸', title: 'Español' },
1098+
{ value: 'zh', right: '🇨🇳', title: '中文' },
1099+
{ value: 'kr', right: '🇰🇷', title: '한국어' },
1100+
],
1101+
},
1102+
},
1103+
},
1104+
};
1105+
1106+
export default preview;
1107+
```
1108+
To learn more about the available icons and their names, see the [Storybook documentation](https://storybook.js.org/docs/8.0/faq#what-icons-are-available-for-my-toolbar-or-my-addon).
1109+
10711110
#### Removals in @storybook/types
10721111

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

code/addons/a11y/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-a11y",
3-
"version": "8.0.0-rc.2",
3+
"version": "8.0.0-rc.3",
44
"description": "Test component compliance with web accessibility standards",
55
"keywords": [
66
"a11y",

code/addons/actions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-actions",
3-
"version": "8.0.0-rc.2",
3+
"version": "8.0.0-rc.3",
44
"description": "Get UI feedback when an action is performed on an interactive element",
55
"keywords": [
66
"storybook",

code/addons/actions/src/loaders.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import type { LoaderFunction } from '@storybook/types';
33
import { action } from './runtime';
44

5+
export const tinySpyInternalState = Symbol.for('tinyspy:spy');
6+
57
const attachActionsToFunctionMocks: LoaderFunction = (context) => {
68
const {
79
args,
@@ -15,7 +17,11 @@ const attachActionsToFunctionMocks: LoaderFunction = (context) => {
1517
typeof value === 'function' && '_isMockFunction' in value && value._isMockFunction
1618
)
1719
.forEach(([key, value]) => {
18-
const previous = value.getMockImplementation();
20+
// See this discussion for context:
21+
// https://github.com/vitest-dev/vitest/pull/5352
22+
const previous =
23+
value.getMockImplementation() ??
24+
(tinySpyInternalState in value ? value[tinySpyInternalState]?.getOriginal() : undefined);
1925
if (previous?._actionAttached !== true && previous?.isAction !== true) {
2026
const implementation = (...params: unknown[]) => {
2127
action(key)(...params);

code/addons/backgrounds/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-backgrounds",
3-
"version": "8.0.0-rc.2",
3+
"version": "8.0.0-rc.3",
44
"description": "Switch backgrounds to view components in different settings",
55
"keywords": [
66
"addon",

code/addons/controls/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-controls",
3-
"version": "8.0.0-rc.2",
3+
"version": "8.0.0-rc.3",
44
"description": "Interact with component inputs dynamically in the Storybook UI",
55
"keywords": [
66
"addon",

code/addons/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-docs",
3-
"version": "8.0.0-rc.2",
3+
"version": "8.0.0-rc.3",
44
"description": "Document component usage and properties in Markdown",
55
"keywords": [
66
"addon",

code/addons/essentials/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-essentials",
3-
"version": "8.0.0-rc.2",
3+
"version": "8.0.0-rc.3",
44
"description": "Curated addons to bring out the best of Storybook",
55
"keywords": [
66
"addon",

code/addons/gfm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-mdx-gfm",
3-
"version": "8.0.0-rc.2",
3+
"version": "8.0.0-rc.3",
44
"description": "GitHub Flavored Markdown in Storybook",
55
"keywords": [
66
"addon",

0 commit comments

Comments
 (0)