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.1 #25140

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
7a06c93
feat: Update packages to match Svelte 5 (Beta)
allozaur Nov 17, 2023
27c2b3c
feat: Update code for Svelte's `render.ts`
allozaur Nov 17, 2023
5ea0ac9
feat: Use `createRoot` function to render `PreviewRender`
allozaur Nov 20, 2023
67c4c63
refactor: Remove legacy `$on` event
allozaur Nov 20, 2023
acaf0ce
Merge branch 'release-8-0' of github.com:storybookjs/storybook into a…
JReinhold Nov 22, 2023
baf72a6
expand svelte dependency version ranges
JReinhold Nov 22, 2023
6561d0c
make webpackFinal consistent across docs
kylemeenehan Nov 29, 2023
e1475b7
Merge branch 'next' of github.com:storybookjs/storybook into allozaur…
JReinhold Nov 29, 2023
7abeedf
remove event handler, fix types
JReinhold Nov 29, 2023
f324a2b
Add missing `barHoverColor` in theme common snippet
julien-deramond Nov 30, 2023
f012da8
add back Svelte 4 support
JReinhold Nov 30, 2023
af572b8
add Svelte 5 sandbox
JReinhold Nov 30, 2023
3fdca57
add temporary push event
JReinhold Nov 30, 2023
4281a88
try pull_request event
JReinhold Nov 30, 2023
f33e3c9
remove temp event
JReinhold Nov 30, 2023
ab5ff2c
update yarn.lock
JReinhold Nov 30, 2023
073d84d
cleanup
JReinhold Nov 30, 2023
79c17ec
cleanup
JReinhold Nov 30, 2023
8458221
refactor: use encodeURIComponent to encode story name
xyy94813 Nov 30, 2023
7aa831c
Docs: Readme move Storyshots to deprecated status
jonniebigodes Nov 30, 2023
fdbe873
Merge branch 'next' into docs_readme_storyshots_cleanup
jonniebigodes Nov 30, 2023
ef0235f
Fixes the community link
jonniebigodes Nov 30, 2023
0574aa7
Merge branch 'docs_readme_storyshots_cleanup' of https://github.com/s…
jonniebigodes Nov 30, 2023
d5211b2
Merge branch 'next' into docs_readme_storyshots_cleanup
jonniebigodes Nov 30, 2023
f9d8358
upgrade to [email protected]
JReinhold Dec 1, 2023
a44a421
Merge branch 'next' into allozaur/#24886
JReinhold Dec 1, 2023
d0050f7
Merge branch 'next' into docs_readme_storyshots_cleanup
jonniebigodes Dec 2, 2023
25f3a33
add svelte 5 resolution to sveltekit prerelease sandbox
JReinhold Dec 4, 2023
8144998
Merge branch 'next' of github.com:storybookjs/storybook into allozaur…
JReinhold Dec 4, 2023
e07105b
fix addWorkaroundResolutions call
JReinhold Dec 4, 2023
1ed3441
Merge branch 'next' into feature/subheading-tag-id
valentinpalkovic Dec 4, 2023
876cbde
disable peer error instead of using resolutions
JReinhold Dec 4, 2023
48c2d74
Remove deprecated packages from next
kasperpeulen Dec 4, 2023
b5ca2b0
Remove deprecated packages from next
kasperpeulen Dec 4, 2023
39fd813
Docs: Svelte docs and examples update
jonniebigodes Dec 4, 2023
acd5864
Merge branch 'next' into docs_svelte_ts_example
jonniebigodes Dec 4, 2023
15fd3f5
use sandbox key instead of dir
JReinhold Dec 5, 2023
b362874
Merge branch 'next' of github.com:storybookjs/storybook into allozaur…
JReinhold Dec 5, 2023
2a7bd55
upgrade svelte typings
JReinhold Dec 5, 2023
9c786f8
Fix sandboxes
kasperpeulen Dec 5, 2023
c60406e
Merge remote-tracking branch 'origin/next' into kasper/remove-depreca…
kasperpeulen Dec 5, 2023
ab31b0d
fix broken yarn.lock
JReinhold Dec 5, 2023
b9b73ba
Remove more references
kasperpeulen Dec 5, 2023
87c2001
Merge branch 'next' into docs/webpack
jonniebigodes Dec 5, 2023
2b74b86
Merge branch 'next' into docs_svelte_ts_example
jonniebigodes Dec 5, 2023
1f91ca2
Fix unit tests
kasperpeulen Dec 5, 2023
184b5d6
Fix frameworksToRenderer
kasperpeulen Dec 5, 2023
d95b2cc
Merge branch 'next' into docs/webpack
jonniebigodes Dec 5, 2023
ca1f850
Merge branch 'next' into docs_svelte_ts_example
jonniebigodes Dec 5, 2023
52e1d6e
Merge branch 'next' into docs/webpack
jonniebigodes Dec 5, 2023
43d6dd3
Merge pull request #25038 from kylemeenehan/docs/webpack
jonniebigodes Dec 5, 2023
32997f2
Merge branch 'next' into next-jd-add-missing-barHoverColor-in-your-th…
jonniebigodes Dec 5, 2023
dfb4aac
Merge pull request #25051 from julien-deramond/next-jd-add-missing-ba…
jonniebigodes Dec 5, 2023
f6fc00d
Merge branch 'next' into docs_svelte_ts_example
jonniebigodes Dec 5, 2023
32a8d30
rebuild yarn.lock
JReinhold Dec 6, 2023
7192c90
add template stories for sveltekit prerelease
JReinhold Dec 6, 2023
71a4575
disable actions e2e test for svelte prerelease
JReinhold Dec 6, 2023
5aaa283
Merge pull request #24889 from allozaur/allozaur/#24886
JReinhold Dec 6, 2023
606829c
Merge branch 'next' into docs_readme_storyshots_cleanup
jonniebigodes Dec 6, 2023
10cfd34
Fix mapping
kasperpeulen Dec 6, 2023
88c67c4
Merge pull request #25063 from storybookjs/docs_readme_storyshots_cle…
jonniebigodes Dec 6, 2023
825b0ad
Fix wrapper snippets
jonniebigodes Dec 6, 2023
a297319
Merge branch 'docs_svelte_ts_example' of https://github.com/storybook…
jonniebigodes Dec 6, 2023
f1e6e2d
Merge branch 'next' into docs_svelte_ts_example
jonniebigodes Dec 6, 2023
7bee11f
Merge pull request #25110 from storybookjs/docs_svelte_ts_example
jonniebigodes Dec 6, 2023
8f7360a
Merge remote-tracking branch 'origin/next' into kasper/remove-depreca…
kasperpeulen Dec 6, 2023
6b29931
Fix merge conflicts
kasperpeulen Dec 6, 2023
ee46686
Merge pull request #25108 from storybookjs/kasper/remove-deprecated-p…
kasperpeulen Dec 6, 2023
9e1492b
Docs: SWC compiler cross link to API docs
jonniebigodes Dec 6, 2023
f46e4c7
Merge branch 'next' into docs_fix_compiler_swc
jonniebigodes Dec 6, 2023
f885ece
Merge pull request #25136 from storybookjs/docs_fix_compiler_swc
jonniebigodes Dec 6, 2023
7c32fb5
Merge pull request #25062 from xyy94813/feature/subheading-tag-id
valentinpalkovic Dec 7, 2023
b6c83fe
Write changelog for 8.0.0-alpha.1 [skip ci]
storybook-bot Dec 7, 2023
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
30 changes: 15 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -504,27 +504,27 @@ workflows:
requires:
- unit-tests
- create-sandboxes:
parallelism: 14
parallelism: 13
requires:
- build
- build-sandboxes:
parallelism: 14
parallelism: 13
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 11
parallelism: 10
requires:
- build-sandboxes
- e2e-production:
parallelism: 9
parallelism: 8
requires:
- build-sandboxes
- e2e-dev:
parallelism: 2
requires:
- create-sandboxes
- test-runner-production:
parallelism: 9
parallelism: 8
requires:
- build-sandboxes
- bench:
Expand Down Expand Up @@ -560,27 +560,27 @@ workflows:
requires:
- unit-tests
- create-sandboxes:
parallelism: 21
parallelism: 20
requires:
- build
- build-sandboxes:
parallelism: 21
parallelism: 20
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 18
parallelism: 17
requires:
- build-sandboxes
- e2e-production:
parallelism: 16
parallelism: 15
requires:
- build-sandboxes
- e2e-dev:
parallelism: 2
requires:
- create-sandboxes
- test-runner-production:
parallelism: 16
parallelism: 15
requires:
- build-sandboxes
- bench:
Expand Down Expand Up @@ -614,30 +614,30 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 35
parallelism: 34
requires:
- build
# - smoke-test-sandboxes: # disabled for now
# requires:
# - create-sandboxes
- build-sandboxes:
parallelism: 35
parallelism: 34
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 32
parallelism: 31
requires:
- build-sandboxes
- e2e-production:
parallelism: 30
parallelism: 29
requires:
- build-sandboxes
- e2e-dev:
parallelism: 2
requires:
- create-sandboxes
- test-runner-production:
parallelism: 30
parallelism: 29
requires:
- build-sandboxes
# TODO: reenable once we find out the source of flakyness
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
## 8.0.0-alpha.1

- Angular: Drop v14.x support - [#25101](https://github.com/storybookjs/storybook/pull/25101), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Angular: Fix CSF Plugin - [#25098](https://github.com/storybookjs/storybook/pull/25098), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Build: Fix Angular sandbox - [#23896](https://github.com/storybookjs/storybook/pull/23896), thanks [@Marklb](https://github.com/Marklb)!
- CLI: Improve dependency metadata detection in storybook doctor - [#25037](https://github.com/storybookjs/storybook/pull/25037), thanks [@yannbf](https://github.com/yannbf)!
- CLI: Point the update-notice to the changelog in the suggested version - [#19911](https://github.com/storybookjs/storybook/pull/19911), thanks [@cprecioso](https://github.com/cprecioso)!
- CLI: Typescript strict mode - [#22254](https://github.com/storybookjs/storybook/pull/22254), thanks [@0916dhkim](https://github.com/0916dhkim)!
- CSF: Autotitle fix multiple dots and handle stories.js - [#21840](https://github.com/storybookjs/storybook/pull/21840), thanks [@agriffis](https://github.com/agriffis)!
- Docs: Use encodeURIComponent to encode story name - [#25062](https://github.com/storybookjs/storybook/pull/25062), thanks [@xyy94813](https://github.com/xyy94813)!
- Next.js: Add next/font/local declarations support - [#24983](https://github.com/storybookjs/storybook/pull/24983), thanks [@MauricioRobayo](https://github.com/MauricioRobayo)!
- Next.js: Drop Next.js < v13.5 support - [#25104](https://github.com/storybookjs/storybook/pull/25104), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Next.js: Fix AppRouterProvider usage - [#25032](https://github.com/storybookjs/storybook/pull/25032), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Next.js: Fix next/font/local usage in babel mode - [#25045](https://github.com/storybookjs/storybook/pull/25045), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Next.js: Update validateData function for next/font compatibility - [#25061](https://github.com/storybookjs/storybook/pull/25061), thanks [@kkirby](https://github.com/kkirby)!
- NextJS: Add experimental RSC support - [#25091](https://github.com/storybookjs/storybook/pull/25091), thanks [@shilman](https://github.com/shilman)!
- React-Docgen: Make error-handling more gentle - [#25055](https://github.com/storybookjs/storybook/pull/25055), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- React: Change `StoryFnReactReturnType` to `JSX.Element` - [#23204](https://github.com/storybookjs/storybook/pull/23204), thanks [@chakAs3](https://github.com/chakAs3)!
- React: Set `react-docgen` to default TS docgen - [#24165](https://github.com/storybookjs/storybook/pull/24165), thanks [@shilman](https://github.com/shilman)!
- Svelte: Support v5 prereleases - [#24889](https://github.com/storybookjs/storybook/pull/24889), thanks [@allozaur](https://github.com/allozaur)!
- SvelteKit: Fix HMR not working - [#25031](https://github.com/storybookjs/storybook/pull/25031), thanks [@JReinhold](https://github.com/JReinhold)!
- TypeScript: Migrate `@storybook/docs-tools` to strict TS - [#22567](https://github.com/storybookjs/storybook/pull/22567), thanks [@efrenaragon96](https://github.com/efrenaragon96)!
- UI: Add stricter types to the language property of the SyntaxHighlighter - [#22790](https://github.com/storybookjs/storybook/pull/22790), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Viewport: Fix viewport dts files - [#25107](https://github.com/storybookjs/storybook/pull/25107), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- Vue: Remove deprecated vue packages from next - [#25108](https://github.com/storybookjs/storybook/pull/25108), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- Webpack: Fix exclude regex in react-docgen-loader - [#25030](https://github.com/storybookjs/storybook/pull/25030), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!

## 8.0.0-alpha.0

- Addon Viewport: Expose types for user parameter validation - [#24896](https://github.com/storybookjs/storybook/pull/24896), thanks [@piratetaco](https://github.com/piratetaco)!
Expand Down
67 changes: 0 additions & 67 deletions Issue.md

This file was deleted.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,21 @@ For additional help, share your issue in [the repo's GitHub Discussions](https:/
| [measure](code/addons/measure/) | Visually inspect the layout and box model within the Storybook UI |
| [outline](code/addons/outline/) | Visually debug the CSS layout and alignment within the Storybook UI |
| [query params](https://github.com/storybookjs/addon-queryparams) | Mock query params |
| [storyshots](code/addons/storyshots-core/) | Snapshot testing for components in Storybook |
| [storysource](code/addons/storysource/) | View the code of your stories within the Storybook UI |
| [viewport](code/addons/viewport/) | Change display sizes and layouts for responsive components using Storybook |

See [Addon / Framework Support Table](https://storybook.js.org/docs/react/api/frameworks-feature-support)

### Deprecated Addons

| Addons | |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [contexts](https://storybook.js.org/addons/@storybook/addon-contexts/) | Addon for driving your components under dynamic contexts |
| [info](https://github.com/storybookjs/deprecated-addons/tree/master/addons/info) | Annotate stories with extra component usage information |
| [knobs](https://github.com/storybookjs/addon-knobs) | Interactively edit component prop data in the Storybook UI |
| [notes](https://github.com/storybookjs/deprecated-addons/tree/master/addons/notes) | Annotate Storybook stories with notes |
| [options](https://www.npmjs.com/package/@storybook/addon-options) | Customize the Storybook UI in code |
| Addons | |
| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [contexts](https://storybook.js.org/addons/@storybook/addon-contexts/) | Addon for driving your components under dynamic contexts |
| [info](https://github.com/storybookjs/deprecated-addons/tree/master/addons/info) | Annotate stories with extra component usage information |
| [knobs](https://github.com/storybookjs/addon-knobs) | Interactively edit component prop data in the Storybook UI |
| [notes](https://github.com/storybookjs/deprecated-addons/tree/master/addons/notes) | Annotate Storybook stories with notes |
| [options](https://www.npmjs.com/package/@storybook/addon-options) | Customize the Storybook UI in code |
| [storyshots](https://github.com/storybookjs/storybook/tree/main/code/addons/storyshots-core) | Snapshot testing for components in Storybook |

To continue improving your experience, we have to eventually deprecate certain addons in favor of new and better tools.

Expand Down
1 change: 0 additions & 1 deletion code/addons/essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/vue": "workspace:*",
"typescript": "^5.3.2"
},
"peerDependencies": {
Expand Down
7 changes: 7 additions & 0 deletions code/e2e-tests/addon-actions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ import process from 'process';
import { SbPage } from './util';

const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';
const templateName = process.env.STORYBOOK_TEMPLATE_NAME || '';

test.describe('addon-actions', () => {
test('should trigger an action', async ({ page }) => {
// eslint-disable-next-line jest/no-disabled-tests
test.skip(
// eslint-disable-next-line jest/valid-title
templateName.includes('svelte') && templateName.includes('prerelease'),
'Svelte 5 prerelase does not support automatic actions with our current example components yet'
);
await page.goto(storybookUrl);
const sbPage = new SbPage(page);
sbPage.waitUntilLoaded();
Expand Down
3 changes: 0 additions & 3 deletions code/e2e-tests/addon-docs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ test.describe('addon-docs', () => {
// - template: https://638db567ed97c3fb3e21cc22-ulhjwkqzzj.chromatic.com/?path=/docs/addons-docs-docspage-basic--docs
// - real: https://638db567ed97c3fb3e21cc22-ulhjwkqzzj.chromatic.com/?path=/docs/example-button--docs
'lit-vite',
// Vue doesn't update when you change args, apparently fixed by this:
// https://github.com/storybookjs/storybook/pull/20995
'vue2-vite',
];
test.skip(
new RegExp(`^${skipped.join('|')}`, 'i').test(`${templateName}`),
Expand Down
6 changes: 3 additions & 3 deletions code/frameworks/svelte-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@
"@storybook/svelte": "workspace:*",
"@sveltejs/vite-plugin-svelte": "^2.4.2",
"magic-string": "^0.30.0",
"svelte-preprocess": "^5.0.4",
"svelte-preprocess": "^5.1.1",
"sveltedoc-parser": "^4.2.1",
"ts-dedent": "^2.2.0"
},
"devDependencies": {
"@types/node": "^18.0.0",
"svelte": "^4.0.0",
"svelte": "^5.0.0-next.16",
"typescript": "^5.3.2",
"vite": "^4.0.0"
},
"peerDependencies": {
"svelte": "^3.0.0 || ^4.0.0",
"svelte": "^4.0.0 || ^5.0.0-next.16",
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/svelte-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"peerDependencies": {
"@babel/core": "*",
"svelte": "^3.48.0 || ^4.0.0",
"svelte": "^4.0.0 || ^5.0.0-next.16",
"svelte-loader": "*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"vite": "^4.0.0"
},
"peerDependencies": {
"svelte": "^3.0.0 || ^4.0.0",
"svelte": "^4.0.0 || ^5.0.0-next.16",
"vite": "^4.0.0"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<script lang="ts">
/**
* @component Button TypeScript
* @wrapper
*/
import { global as globalThis } from '@storybook/global';
// @ts-ignore
const Button = globalThis.Components?.Button;

/**
* Rounds the button
*/
export let primary: boolean = false;

/**
* Displays the count
*/
export let count: number = 0;

/**
* Button text
* @slot
*/
export let text: string = 'You clicked';

function handleClick(_event: MouseEvent) {
count += 1;
}
</script>

<h1>Button TypeScript</h1>

<Button {primary} on:click on:click={handleClick} label="{text}: {count}" />

<p>A little text to show this is a view.</p>
<p>If we need to test components in a Svelte environment, for instance to test slot behaviour,</p>
<p>then wrapping the component up in a view</p>
<p>made just for the story is the simplest way to achieve this.</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
import { enhance } from '$app/forms';
</script>

<form use:enhance>
<button>enhance</button>
</form>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ul>
<li><a href="/basic-href">Link to <code>/basic-href</code></a></li>
<li>
<a href="/deep/nested/link?with=true&multiple-params=200#and-an-id"
>Link to <code>/deep/nested/link?with=true&multiple-params=200#and-an-id</code></a
>
</li>
</ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script>
import { goto, invalidate, invalidateAll, afterNavigate } from '$app/navigation';

export let afterNavigateFn;

afterNavigate(afterNavigateFn);
</script>

<button
on:click={() => {
goto('/storybook-goto');
}}>goto</button
>

<button
on:click={() => {
invalidate('/storybook-invalidate');
}}>invalidate</button
>

<button
on:click={() => {
invalidateAll();
}}>invalidateAll</button
>
Loading