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 beta 8.6.0-beta.0 #30512

Merged
merged 490 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
490 commits
Select commit Hold shift + click to select a range
4302698
Merge branch 'norbert/cli-with-ink' of https://github.com/storybookjs…
ndelangen Jan 24, 2025
44e01cb
fix types
yannbf Jan 24, 2025
e71bade
fix test
yannbf Jan 24, 2025
375762c
simplify
xeho91 Jan 26, 2025
04ab7b9
atttempt to fix type error
xeho91 Jan 26, 2025
1cd8644
Preview API: Add csf factory utilities
yannbf Jan 27, 2025
3f6a53e
split essentials in index/preset
yannbf Jan 27, 2025
6266659
add detection
ndelangen Jan 27, 2025
2c13a66
Introduce AnyRenderer
kasperpeulen Jan 27, 2025
29e75e1
I suppose we could do it like this
ndelangen Jan 27, 2025
e858811
add cwd
ndelangen Jan 27, 2025
7967016
add /preview to addon-essentials
yannbf Jan 27, 2025
6b9ec5d
Wrapup Vitest compatibility checks
ghengeveld Jan 27, 2025
5c6599e
Merge pull request #30388 from storybookjs/yann/csf-factory-utils-pre…
yannbf Jan 27, 2025
488fd4f
CLI: Run csf-2-to-3 as part of csf-factories codemod
yannbf Jan 28, 2025
6f059c1
Add new compatibility checks to old create-storybook CLI
ghengeveld Jan 28, 2025
a594eea
Fix installation process
ghengeveld Jan 28, 2025
b068e8b
Merge branch 'kasper/csf-factories' into yann/addon-annotations-as-fu…
yannbf Jan 28, 2025
ab9329e
Merge pull request #30395 from storybookjs/yann/csf-factory-codemod-f…
kasperpeulen Jan 28, 2025
43e3c4e
Fix type issues
kasperpeulen Jan 28, 2025
cab9679
Merge remote-tracking branch 'origin/yann/addon-annotations-as-functi…
kasperpeulen Jan 28, 2025
5b68c6a
fix addon docs issue with --test flag
yannbf Jan 28, 2025
a3d613d
Merge pull request #30376 from storybookjs/yann/addon-annotations-as-…
yannbf Jan 28, 2025
8468f6f
remove unused ink
ndelangen Jan 29, 2025
700ec5a
Merge branch 'next' into kasper/csf-factories
yannbf Jan 29, 2025
88f3cbc
Merge branch 'next' into norbert/cli-with-ink
ndelangen Jan 29, 2025
ef2f0e6
make intents question optional && more cleanup
ndelangen Jan 29, 2025
c3b2f8b
improve check
ndelangen Jan 29, 2025
46771c5
cleanup
ndelangen Jan 29, 2025
f4f1e3b
fix typing
ndelangen Jan 29, 2025
457a447
cleanup
ndelangen Jan 29, 2025
1c0dd49
fix
ndelangen Jan 29, 2025
9028541
do not run on CI
ndelangen Jan 29, 2025
c81b6a0
Add types for Parameters and Globals for all addons
yannbf Jan 29, 2025
8ceedc1
Base definePreview
kasperpeulen Jan 29, 2025
02a4069
Add types for renderers and frameworks
yannbf Jan 29, 2025
876fbc0
Merge branch 'next' into kasper/csf-factories
yannbf Jan 29, 2025
46de186
Merge branch 'kasper/csf-factories' into yann/add-parameter-and-globa…
yannbf Jan 29, 2025
23c49db
update a11y types
yannbf Jan 30, 2025
2085d4b
Add type tests
kasperpeulen Jan 30, 2025
b93d96a
Make storybook/internal/csf
kasperpeulen Jan 30, 2025
fccc0df
Adjust runtime
kasperpeulen Jan 30, 2025
bd5f88c
Adjust runtime
kasperpeulen Jan 30, 2025
c5cb4b1
Fix TODO
kasperpeulen Jan 30, 2025
209cdeb
Use default export for preview
kasperpeulen Jan 30, 2025
d5b592a
Fix type inference issue
kasperpeulen Jan 30, 2025
1f5a406
Fix
kasperpeulen Jan 30, 2025
6a6e89b
Merge branch 'next' into norbert/cli-with-ink
ndelangen Jan 31, 2025
1f4c92f
Fix import
kasperpeulen Jan 31, 2025
1a356cb
Fix build
kasperpeulen Jan 31, 2025
03ec593
Fix test
kasperpeulen Jan 31, 2025
e433a08
cleanup
ndelangen Jan 31, 2025
cecfd85
Fix eslint
kasperpeulen Jan 31, 2025
6867b54
add intents to telemetry
ndelangen Jan 31, 2025
da37286
cleanup
ndelangen Jan 31, 2025
8e0d959
cleanup
ndelangen Jan 31, 2025
fe2dc28
cleanup
ndelangen Jan 31, 2025
5bad95b
cleanup
ndelangen Jan 31, 2025
815c778
Fix eslint
kasperpeulen Jan 31, 2025
43ac425
Fix vitest
kasperpeulen Jan 31, 2025
2a2806f
prebundle create-storybook more
ndelangen Jan 31, 2025
2ff6044
remove prettier as a dependency
ndelangen Jan 31, 2025
70429c2
Re-export definePreview
kasperpeulen Jan 31, 2025
a838e73
Adjust codemod
kasperpeulen Jan 31, 2025
dc79392
Move csf4 stories
kasperpeulen Jan 31, 2025
5adcfd5
direct depend on storybook/core
ndelangen Jan 31, 2025
d43667d
fix forgotten usages of storybook/internal
ndelangen Jan 31, 2025
3847a11
add csfFactory modification option for sandboxes
yannbf Jan 31, 2025
b5b0420
fix tests
yannbf Jan 31, 2025
43029f5
Add support for extending existing Vitest workspace file
ghengeveld Jan 31, 2025
aa305bb
fix issues
yannbf Jan 31, 2025
dc10757
Handle non-interactive (non TTY) mode
ghengeveld Jan 31, 2025
ce00ea5
fix sandboxes
yannbf Jan 31, 2025
35656f0
add CLi flag for intents & send original intent to telemetry
ndelangen Jan 31, 2025
78a2d72
Don't default to migrating to nextjs-vite
ghengeveld Jan 31, 2025
d0c668b
review changes
yannbf Jan 31, 2025
66131f1
Merge pull request #30417 from storybookjs/yann/add-parameter-and-glo…
yannbf Jan 31, 2025
0063c5e
Check for framework compatibility with addon-test
ghengeveld Jan 31, 2025
1d637ec
Merge branch 'kasper/csf-factories' into kasper/base-factories
yannbf Jan 31, 2025
8d4b99f
Addon-docs: Change URL hash when ToC item is clicked and when scrolling
sookmax Jul 26, 2023
c23efac
Router: Strengthen detection of empty URL hash
sookmax Jul 26, 2023
1dad9db
Addon-docs: Revert updating the URL hash when scrolling to a new ToC …
Sidnioulz Dec 23, 2024
853ca13
Core: Preserve location hash in URL Core API
Sidnioulz Dec 23, 2024
55ec571
Addon-docs: URL encode anchor IDs when clicking in ToC
Sidnioulz Dec 23, 2024
426789e
Addon-docs: Make Table of Content click handler safer
Sidnioulz Dec 24, 2024
2322fb0
Blocks: Ensure Subheading slugs heading IDs to remove spaces
Sidnioulz Jan 15, 2025
8cc7f4a
Manager: Fix state management in URL tests
Sidnioulz Jan 15, 2025
8c13344
Force storybook package version for sb add command
ghengeveld Feb 3, 2025
985843b
Avoid caret syntax in addon version string when using PR canary
ghengeveld Feb 3, 2025
580f1e2
support storysort in csf factories
yannbf Feb 3, 2025
1dd4f35
Move templates to directory and include them in dist
ghengeveld Feb 3, 2025
025b64f
Merge pull request #30443 from storybookjs/yann/csf-factories-storyso…
yannbf Feb 3, 2025
c862158
UI: Support CSF factories when creating story files from UI
yannbf Feb 3, 2025
14b609a
remove dependency on core from create-storybook
ndelangen Feb 3, 2025
de6ae64
Addon Docs: Add missing type entrypoints
yannbf Feb 3, 2025
e3b1620
Merge pull request #30451 from storybookjs/yann/fix-addon-docs-types
yannbf Feb 3, 2025
96c4ab2
ignore some types issues, not generate types for create-storybook
ndelangen Feb 3, 2025
fa56300
cleanup
ndelangen Feb 3, 2025
35224f1
fixes
ndelangen Feb 3, 2025
9b97c5d
deal with no linting in test
ndelangen Feb 3, 2025
d4531ab
Merge branch 'next' into norbert/cli-with-ink
ndelangen Feb 3, 2025
674194b
fix checks
ndelangen Feb 3, 2025
7ef841f
Merge branch 'norbert/cli-with-ink' of https://github.com/storybookjs…
ndelangen Feb 3, 2025
3cd19d6
skip failing test
ndelangen Feb 3, 2025
b4de21b
knip fix
ndelangen Feb 3, 2025
b701414
large
ndelangen Feb 4, 2025
a9d4f39
move templates to top-level package
ndelangen Feb 4, 2025
eecb7f3
cleanup
ndelangen Feb 4, 2025
e08bf93
Update existing config file and only fall back to creating a workspac…
ghengeveld Feb 4, 2025
078ba9c
Move templates to addon root so we don't need to copy it to dist
ghengeveld Feb 4, 2025
6decde5
Fix template path
ghengeveld Feb 4, 2025
7e96e46
Merge pull request #30447 from storybookjs/yann/add-component-csf-fac…
yannbf Feb 4, 2025
09ccce4
add semver to regular deps
ndelangen Feb 4, 2025
a2a9f27
Merge branch 'norbert/cli-with-ink' of https://github.com/storybookjs…
ndelangen Feb 4, 2025
da7da85
Vue: Consider custom code snippet in story code panel
larsrickert Jan 3, 2025
2528db8
remove redundant import
larsrickert Jan 3, 2025
1f21e81
feat: sync light/dark mode with theme
larsrickert Jan 15, 2025
636346d
fix types
yannbf Feb 4, 2025
e383e7d
Merge remote-tracking branch 'origin/kasper/csf-factories' into kaspe…
kasperpeulen Feb 4, 2025
b1c03f6
Merge branch 'next' into kasper/csf-factories
yannbf Feb 4, 2025
0f00a18
Fix react-webpack/17-ts
kasperpeulen Feb 4, 2025
8b1aa95
do not install addon-interactions when test intent is set, as it will…
ndelangen Feb 4, 2025
6e89d67
Merge pull request #30416 from storybookjs/kasper/base-factories
kasperpeulen Feb 4, 2025
9349e5b
add option to have relative path in codemod
yannbf Feb 4, 2025
29c6263
Merge branch 'kasper/csf-factories' into yann/imports-map-options
yannbf Feb 4, 2025
3d1a386
fixes
ndelangen Feb 4, 2025
1b9a3ea
tweaks
yannbf Feb 4, 2025
fe0a73b
try both panel names
ndelangen Feb 4, 2025
ec2e1a2
more
ndelangen Feb 4, 2025
7f2ab10
fix e2e test for addon-interactions by skipping them wheb appropriate
ndelangen Feb 4, 2025
359ec9c
fix codemod
yannbf Feb 4, 2025
f787874
do not add experimental-addon-test when non interactive CLI, this is …
ndelangen Feb 4, 2025
9760a3e
Update code/lib/cli-storybook/src/codemod/csf-factories.ts
yannbf Feb 5, 2025
c99a686
add extra CI step to test intents
ndelangen Feb 5, 2025
ff5316e
fix
ndelangen Feb 5, 2025
4e104e6
fix
ndelangen Feb 5, 2025
baec739
in one step...
ndelangen Feb 5, 2025
1f39998
Merge branch 'next' into kasper/csf-factories
yannbf Feb 5, 2025
04a004b
improve codemod to be able to run it multiple times
yannbf Feb 5, 2025
0b7a8e6
Refactor sandbox setup to write either workspace or config file based…
ghengeveld Feb 5, 2025
cbc93ee
add extends true, as @JReinhold suggested
ndelangen Feb 5, 2025
a3a3440
Merge branch 'norbert/cli-with-ink' of https://github.com/storybookjs…
ndelangen Feb 5, 2025
eab4926
fix type issues
yannbf Feb 5, 2025
8def9e0
Merge branch 'kasper/csf-factories' into yann/imports-map-options
yannbf Feb 5, 2025
4820815
clarify message
yannbf Feb 5, 2025
7b4f819
Merge pull request #30463 from storybookjs/yann/imports-map-options
yannbf Feb 5, 2025
ccae917
Merge branch 'next' into norbert/cli-with-ink
ndelangen Feb 5, 2025
c7599ae
Support updating Vite config with test property, and check for Vitest…
ghengeveld Feb 5, 2025
e9c4ae8
Merge branch 'next' into kasper/csf-factories
yannbf Feb 5, 2025
2e92d97
fix lint
yannbf Feb 5, 2025
8babc1d
increase resource of knip step
yannbf Feb 5, 2025
46bc666
fix checks
ndelangen Feb 5, 2025
e4c4b31
Fix EXTENDS_WORKSPACE template value
ghengeveld Feb 5, 2025
ce2f2ae
add jiti to root
ndelangen Feb 5, 2025
566c28c
Merge branch 'norbert/cli-with-ink' of https://github.com/storybookjs…
ndelangen Feb 5, 2025
a30ec76
update test
ndelangen Feb 5, 2025
08bb053
remove logs
yannbf Feb 5, 2025
e21a07b
fix sandbox command
yannbf Feb 5, 2025
39deab4
Merge branch 'next' into kasper/csf-factories
yannbf Feb 5, 2025
de13df0
fix vite types issue
yannbf Feb 5, 2025
391a972
remove unused constants in viewport addon
Guria Feb 6, 2025
2875796
Merge branch 'next' into norbert/cli-with-ink
ndelangen Feb 6, 2025
6fd5f85
fix review comment https://github.com/storybookjs/storybook/pull/3020…
ndelangen Feb 6, 2025
6dc6aa4
fix review comments
ndelangen Feb 6, 2025
2847a36
remove comment
ndelangen Feb 6, 2025
68ed7a9
Remove commented-out code related to Ink-based CLI
ghengeveld Feb 6, 2025
2b2f47e
Merge branch 'next' into norbert/cli-with-ink
ndelangen Feb 6, 2025
270bfed
Merge branch 'norbert/cli-with-ink' of https://github.com/storybookjs…
ndelangen Feb 6, 2025
5e7030c
replace config flow with universalStore
JReinhold Feb 6, 2025
59c3eab
purge config from TestProvider API
JReinhold Feb 6, 2025
2e5de9d
purge watching/watchable from TestProvider API
JReinhold Feb 7, 2025
c45395e
Merge branch 'next' into jeppe/universal-store-in-addon-test
JReinhold Feb 7, 2025
675e015
purge watching/watchable from TestProvider API
JReinhold Feb 7, 2025
98a2dbc
Merge branch 'jeppe/universal-store-in-addon-test' of github.com:stor…
JReinhold Feb 7, 2025
d4b0e41
getStore() -> store
JReinhold Feb 7, 2025
710d623
rename universalStore -> store
JReinhold Feb 7, 2025
80fbe3a
introduce MockUniversalStore
JReinhold Feb 7, 2025
615ffa5
cleanup
ndelangen Feb 10, 2025
26847e8
merge in next
ndelangen Feb 10, 2025
d564e1a
cleanup
ndelangen Feb 10, 2025
e6c0ba8
Merge branch 'next' into norbert/cli-with-ink
ndelangen Feb 10, 2025
df59f7e
Fix printing Date object in MethodCall for component test/interaction…
ghengeveld Feb 10, 2025
8746a9a
Merge remote-tracking branch 'origin/next' into kasper/csf-factories2
kasperpeulen Feb 10, 2025
c7beffe
Merge conflicts
kasperpeulen Feb 10, 2025
842d79c
Docs: Snippet contributions and framework links fixes
jonniebigodes Feb 10, 2025
2ff05ca
Merge branch 'next' into fix_contribution_docs
jonniebigodes Feb 10, 2025
6e3cffc
add MockUniversalStore, use in TestProviderRender.stories
JReinhold Feb 10, 2025
592f6f3
Merge branch 'next' of github.com:storybookjs/storybook into jeppe/un…
JReinhold Feb 11, 2025
ad7a5a0
rename intents to features
ndelangen Feb 11, 2025
42ae010
Builder-Vite: Fix resolve id warning
valentinpalkovic Feb 11, 2025
0e34e4b
Merge pull request #30507 from storybookjs/fix-date-printing
kasperpeulen Feb 11, 2025
2abf798
Check for project type compatibility with addon-test _after_ promptin…
ghengeveld Feb 11, 2025
4b2c5d9
Merge pull request #30511 from storybookjs/valentin/fix-virtual-id-re…
valentinpalkovic Feb 11, 2025
8a17f46
fix mocks in tests
JReinhold Feb 11, 2025
240bb02
Merge branch 'next' into fix_contribution_docs
jonniebigodes Feb 11, 2025
865a0c0
Disable docs if docs feature is not selected and omit docs entries if…
ghengeveld Feb 11, 2025
15cdc17
make Testing Module E2E tests more resilient
JReinhold Feb 11, 2025
7551f2f
dependency inject store into test-manager
JReinhold Feb 11, 2025
0d777a0
Update CHANGELOG.md for v8.5.4 [skip ci]
storybook-bot Feb 11, 2025
24d05c8
add readme
JReinhold Feb 11, 2025
2d76e12
cleanup
JReinhold Feb 11, 2025
1f5205a
Merge branch 'next' into jeppe/universal-store-in-addon-test
JReinhold Feb 11, 2025
875cd97
Merge pull request #30202 from storybookjs/norbert/cli-with-ink
ghengeveld Feb 11, 2025
3ad9d6c
Merge branch 'next' of github.com:storybookjs/storybook into update-2…
JReinhold Feb 11, 2025
4ce1f90
prebundle github-slugger
JReinhold Feb 11, 2025
eeb6dc7
dont double-encode heading ids
JReinhold Feb 11, 2025
42351ac
Merge branch 'next' into fix_contribution_docs
jonniebigodes Feb 11, 2025
0cd4ee4
Addon A11y: Introduce parameters.a11y.test
valentinpalkovic Feb 11, 2025
086477d
Fix messaging in automigration
valentinpalkovic Feb 11, 2025
7637b3f
fix type import
JReinhold Feb 11, 2025
3f65a93
cleanup
JReinhold Feb 11, 2025
a781064
Merge pull request #30509 from storybookjs/fix_contribution_docs
jonniebigodes Feb 11, 2025
8b8e41c
Merge branch 'next' into jeppe/universal-store-in-addon-test
JReinhold Feb 11, 2025
e0154a5
Merge branch 'next' into next
JReinhold Feb 11, 2025
270cbb9
fix types
JReinhold Feb 11, 2025
0017926
Blocks: Ensure Heading slugs heading IDs to remove spaces
Sidnioulz Feb 12, 2025
6271cb6
Fix presets getting a CJS module of core when core is running in ESM
JReinhold Feb 12, 2025
5a9c67c
fix state listeners not getting called when store state was synced
JReinhold Feb 12, 2025
9f9254a
Merge pull request #30130 from storybookjs/update-23618-fix-toc-onclick
JReinhold Feb 12, 2025
ca4d8f5
Apply in review requested changes
valentinpalkovic Feb 12, 2025
3f50bd8
Merge branch 'next' into valentin/a11y-parameter-test
valentinpalkovic Feb 12, 2025
473e1b9
Builder-Vite: Fix turbosnap
valentinpalkovic Feb 12, 2025
147aeda
don't allow events to be handled when store is still syncing
JReinhold Feb 12, 2025
013140e
Merge branch 'next' into jeppe/universal-store-in-addon-test
JReinhold Feb 12, 2025
002aef3
loosen mock testutils types
JReinhold Feb 12, 2025
94f64dd
Merge branch 'jeppe/universal-store-in-addon-test' of github.com:stor…
JReinhold Feb 12, 2025
a3e07f6
Merge remote-tracking branch 'origin/next' into kasper/csf-factories
kasperpeulen Feb 12, 2025
29dc3e5
Merge pull request #30491 from storybookjs/jeppe/universal-store-in-a…
JReinhold Feb 12, 2025
a73f656
Fix type checks
kasperpeulen Feb 12, 2025
7da4abd
Merge pull request #30197 from storybookjs/kasper/csf-factories
kasperpeulen Feb 12, 2025
a019db8
Merge pull request #30522 from storybookjs/valentin/fix-turbosnap
valentinpalkovic Feb 12, 2025
f88cf06
Merge remote-tracking branch 'origin/next' into valentin/a11y-paramet…
valentinpalkovic Feb 12, 2025
2e9408b
Add tests
valentinpalkovic Feb 12, 2025
926ab54
Merge pull request #30179 from storybookjs/larsrickert/code-panel-imp…
valentinpalkovic Feb 12, 2025
38f3bc6
Merge branch 'next' into next
valentinpalkovic Feb 12, 2025
c9e8c78
Merge pull request #30516 from storybookjs/valentin/a11y-parameter-test
valentinpalkovic Feb 12, 2025
e9f1e19
Merge pull request #30479 from Guria/next
valentinpalkovic Feb 12, 2025
58a42be
Update CHANGELOG.md for v8.5.5 [skip ci]
storybook-bot Feb 12, 2025
d0927cb
CI: Increase sharding for unit-tests
valentinpalkovic Feb 13, 2025
a46e215
Fix CSF sandboxes
kasperpeulen Feb 13, 2025
d398d1e
CI: Reduce test sharding but increase CI resourses for test runs
valentinpalkovic Feb 13, 2025
2088039
Adjust glob string for sandboxes
kasperpeulen Feb 13, 2025
e716ac2
Merge pull request #30528 from storybookjs/valentin/fix-129-error-for…
valentinpalkovic Feb 13, 2025
2fb9825
Merge branch 'next' into kasper/fix-csf-sandboxes
valentinpalkovic Feb 13, 2025
3b43722
Fix component directory
kasperpeulen Feb 13, 2025
7214878
Merge remote-tracking branch 'origin/kasper/fix-csf-sandboxes' into k…
kasperpeulen Feb 13, 2025
9003df4
Fix component directory
kasperpeulen Feb 13, 2025
06f222e
Add CSF4 support to react-native-web-vite
kasperpeulen Feb 13, 2025
e4d47ad
Merge pull request #30529 from storybookjs/kasper/fix-csf-sandboxes
kasperpeulen Feb 13, 2025
357b0b2
Write changelog for 8.6.0-beta.0 [skip ci]
storybook-bot Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 39 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
- cancel-workflow-on-failure
knip:
executor:
class: medium
class: large
name: sb_node_22_classic
steps:
- git-shallow-clone/checkout_advanced:
Expand Down Expand Up @@ -314,9 +314,9 @@ jobs:
- cancel-workflow-on-failure
unit-tests:
executor:
class: large
class: xlarge
name: sb_playwright
parallelism: 4
parallelism: 2
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand Down Expand Up @@ -621,7 +621,32 @@ jobs:
command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>
- report-workflow-on-failure:
template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)
test-empty-init:
test-init-features:
executor:
class: small
name: sb_node_22_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Storybook init for features
command: |
cd code
yarn local-registry --open &
cd ../../
mkdir features-1
cd features-1
npm set registry http://localhost:6001
npx create-storybook --yes --package-manager npm --features dev docs test
npx vitest
environment:
IN_STORYBOOK_SANDBOX: true
STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts
STORYBOOK_DISABLE_TELEMETRY: true

test-init-empty:
executor:
class: small
name: sb_node_22_browsers
Expand Down Expand Up @@ -860,6 +885,9 @@ workflows:
- test-ui-testing-module:
requires:
- build
- test-init-features:
requires:
- build
- test-portable-stories:
requires:
- build
Expand Down Expand Up @@ -934,6 +962,9 @@ workflows:
- test-ui-testing-module:
requires:
- build
- test-init-features:
requires:
- build
- bench-sandboxes:
parallelism: 5
requires:
Expand Down Expand Up @@ -1007,7 +1038,10 @@ workflows:
- test-ui-testing-module:
requires:
- build
- test-empty-init:
- test-init-features:
requires:
- build
- test-init-empty:
requires:
- build
matrix:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 8.5.5

- Builder-Vite: Fix Turbosnap - [#30522](https://github.com/storybookjs/storybook/pull/30522), thanks @valentinpalkovic!

## 8.5.4

- Addon A11y: Make Vitest Axe optional - [#30442](https://github.com/storybookjs/storybook/pull/30442), thanks @valentinpalkovic!
- Builder-Vite: Fix allowedHosts handling for custom hosts - [#30432](https://github.com/storybookjs/storybook/pull/30432), thanks @JSMike!
- Builder-Vite: Fix resolve id warning - [#30511](https://github.com/storybookjs/storybook/pull/30511), thanks @valentinpalkovic!
- React: Update react-docgen-typescript to fix CI hanging issues - [#30422](https://github.com/storybookjs/storybook/pull/30422), thanks @yannbf!

## 8.5.3

- Preview: Add `globals` to `extract()` - [#30415](https://github.com/storybookjs/storybook/pull/30415), thanks @ndelangen!
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 8.6.0-beta.0

- Addon A11y: Introduce parameters.a11y.test - [#30516](https://github.com/storybookjs/storybook/pull/30516), thanks @valentinpalkovic!
- Addon-Docs: Change URL hash when TOC item is clicked, and fix TOC loading bugs - [#30130](https://github.com/storybookjs/storybook/pull/30130), thanks @Sidnioulz!
- Addon-Test: Fix config and watch mode inconsistencies - [#30491](https://github.com/storybookjs/storybook/pull/30491), thanks @JReinhold!
- Addon-docs: Consider custom code snippet in story code panel and update styles - [#30179](https://github.com/storybookjs/storybook/pull/30179), thanks @larsrickert!
- Builder-Vite: Fix Turbosnap - [#30522](https://github.com/storybookjs/storybook/pull/30522), thanks @valentinpalkovic!
- CSF: Add support for CSF factories - [#30197](https://github.com/storybookjs/storybook/pull/30197), thanks @kasperpeulen!
- Cleanup: Remove unused constants in viewport addon - [#30479](https://github.com/storybookjs/storybook/pull/30479), thanks @Guria!
- Svelte: Fix conflicting variable names and support for `+page.svelte` files - [#30369](https://github.com/storybookjs/storybook/pull/30369), thanks @xeho91!

## 8.6.0-alpha.5

- Core: Add `UniversalStore` API to sync state/events between multiple environments - [#30445](https://github.com/storybookjs/storybook/pull/30445), thanks @JReinhold!
Expand Down
11 changes: 10 additions & 1 deletion code/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,16 @@ module.exports = {
},
},
{
files: ['*.js', '*.jsx', '*.json', '*.html', '**/.storybook/*.ts', '**/.storybook/*.tsx'],
files: [
'*.js',
'*.jsx',
'*.json',
'*.html',
'**/.storybook/*.ts',
'**/.storybook/*.tsx',
'**/.storybook/**/*.ts',
'**/.storybook/**/*.tsx',
],
parserOptions: {
project: null,
},
Expand Down
9 changes: 5 additions & 4 deletions code/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { join } from 'node:path';

import type { StorybookConfig } from '../frameworks/react-vite';
import { defineMain } from '../frameworks/react-vite/src/node';

const componentsPath = join(__dirname, '../core/src/components');
const managerApiPath = join(__dirname, '../core/src/manager-api');
const imageContextPath = join(__dirname, '..//frameworks/nextjs/src/image-context.ts');
const imageContextPath = join(__dirname, '../frameworks/nextjs/src/image-context.ts');

const config: StorybookConfig = {
const config = defineMain({
stories: [
'./*.stories.@(js|jsx|ts|tsx)',
{
Expand Down Expand Up @@ -159,6 +159,7 @@ const config: StorybookConfig = {
build: {
// disable sourcemaps in CI to not run out of memory
sourcemap: process.env.CI !== 'true',
target: ['chrome100'],
},
server: {
watch: {
Expand All @@ -169,6 +170,6 @@ const config: StorybookConfig = {
} satisfies typeof viteConfig);
},
// logLevel: 'debug',
};
});

export default config;
38 changes: 30 additions & 8 deletions code/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ import { DocsContext } from '@storybook/blocks';
import { global } from '@storybook/global';
import type { Decorator, Loader, ReactRenderer } from '@storybook/react';

// TODO add empty preview
// import * as storysource from '@storybook/addon-storysource';
// import * as designs from '@storybook/addon-designs/preview';
import addonTest from '@storybook/experimental-addon-test';
import { definePreview } from '@storybook/react-vite';

import addonA11y from '@storybook/addon-a11y';
import addonEssentials from '@storybook/addon-essentials';
import addonThemes from '@storybook/addon-themes';

import * as addonsPreview from '../addons/toolbars/template/stories/preview';
import * as templatePreview from '../core/template/stories/preview';
import { DocsPageWrapper } from '../lib/blocks/src/components';
import '../renderers/react/template/components/index';
import { isChromatic } from './isChromatic';

const { document } = global;
Expand Down Expand Up @@ -120,7 +133,7 @@ const ThemedSetRoot = () => {
// eslint-disable-next-line no-underscore-dangle
const preview = (window as any).__STORYBOOK_PREVIEW__ as PreviewWeb<ReactRenderer> | undefined;
const channel = (window as any).__STORYBOOK_ADDONS_CHANNEL__ as Channel | undefined;
export const loaders = [
const loaders = [
/**
* This loader adds a DocsContext to the story, which is required for the most Blocks to work. A
* story will specify which stories they need in the index with:
Expand Down Expand Up @@ -169,7 +182,7 @@ export const loaders = [
},
] as Loader[];

export const decorators = [
const decorators = [
// This decorator adds the DocsContext created in the loader above
(Story, { loaded: { docsContext } }) =>
docsContext ? (
Expand Down Expand Up @@ -307,11 +320,7 @@ export const decorators = [
},
] satisfies Decorator[];

export const parameters = {
options: {
storySort: (a, b) =>
a.title === b.title ? 0 : a.id.localeCompare(b.id, undefined, { numeric: true }),
},
const parameters = {
docs: {
theme: themes.light,
toc: {},
Expand Down Expand Up @@ -360,4 +369,17 @@ export const parameters = {
},
};

export const tags = ['test', 'vitest'];
export default definePreview({
addons: [
addonThemes(),
addonEssentials(),
addonA11y(),
addonTest(),
addonsPreview,
templatePreview,
],
decorators,
loaders,
tags: ['test', 'vitest'],
parameters,
});
17 changes: 2 additions & 15 deletions code/.storybook/storybook.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,12 @@ import { beforeAll, vi, expect as vitestExpect } from 'vitest';
import { setProjectAnnotations } from '@storybook/react';
import { userEvent as storybookEvent, expect as storybookExpect } from '@storybook/test';

// eslint-disable-next-line import/namespace
import * as testAnnotations from '@storybook/experimental-addon-test/preview';

import * as a11yAddonAnnotations from '@storybook/addon-a11y/preview';

import * as coreAnnotations from '../addons/toolbars/template/stories/preview';
import * as componentAnnotations from '../core/template/stories/preview';
// register global components used in many stories
import '../renderers/react/template/components';
import * as projectAnnotations from './preview';
import preview from './preview';

vi.spyOn(console, 'warn').mockImplementation((...args) => console.log(...args));

const annotations = setProjectAnnotations([
a11yAddonAnnotations,
projectAnnotations,
componentAnnotations,
coreAnnotations,
testAnnotations,
preview.composed,
{
// experiment with injecting Vitest's interactivity API over our userEvent while tests run in browser mode
// https://vitest.dev/guide/browser/interactivity-api.html
Expand Down
2 changes: 0 additions & 2 deletions code/addons/a11y/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ export const DOCUMENTATION_DISCREPANCY_LINK = `${DOCUMENTATION_LINK}#why-are-my-
export const TEST_PROVIDER_ID = 'storybook/addon-a11y/test-provider';

export const EVENTS = { RESULT, REQUEST, RUNNING, ERROR, MANUAL };

export const A11Y_TEST_TAG = 'a11y-test';
7 changes: 7 additions & 0 deletions code/addons/a11y/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
import { definePreview } from 'storybook/internal/preview-api';

import * as addonAnnotations from './preview';

export { PARAM_KEY } from './constants';
export * from './params';
export type { A11yParameters } from './types';

export default () => definePreview(addonAnnotations);
5 changes: 4 additions & 1 deletion code/addons/a11y/src/params.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import type { ElementContext, ImpactValue, RunOptions, Spec } from 'axe-core';
import type { ElementContext, RunOptions, Spec } from 'axe-core';

type A11yTest = 'off' | 'todo' | 'error';

export interface Setup {
element?: ElementContext;
Expand All @@ -13,4 +15,5 @@ export interface A11yParameters {
/** @deprecated Use globals.a11y.manual instead */
manual?: boolean;
disable?: boolean;
test?: A11yTest;
}
39 changes: 24 additions & 15 deletions code/addons/a11y/src/preview.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { StoryContext } from 'storybook/internal/csf';

import { run } from './a11yRunner';
import { A11Y_TEST_TAG } from './constants';
import { experimental_afterEach } from './preview';
import { getIsVitestRunning, getIsVitestStandaloneRun } from './utils';

Expand Down Expand Up @@ -88,12 +87,13 @@ describe('afterEach', () => {
addReport: vi.fn(),
},
parameters: {
a11y: {},
a11y: {
test: 'error',
},
},
globals: {
a11y: {},
},
tags: [A11Y_TEST_TAG],
...overrides,
}) as any;

Expand Down Expand Up @@ -138,33 +138,39 @@ describe('afterEach', () => {
});
});

it('should report passed status when there are no violations', async () => {
const context = createContext();
it('should run accessibility checks and should report them as warnings', async () => {
const context = createContext({
parameters: {
a11y: {
test: 'todo',
},
},
});
const result = {
violations: [],
violations,
};

mockedRun.mockResolvedValue(result as any);
mocks.getIsVitestStandaloneRun.mockReturnValue(false);

await experimental_afterEach(context);

expect(mockedRun).toHaveBeenCalledWith(context.parameters.a11y);

expect(context.reporting.addReport).toHaveBeenCalledWith({
type: 'a11y',
version: 1,
result,
status: 'passed',
status: 'warning',
});
});

it('should run accessibility checks if "a11y-test" flag is not available and is not running in Vitest', async () => {
const context = createContext({
tags: [],
});
it('should report passed status when there are no violations', async () => {
const context = createContext();
const result = {
violations: [],
};
mockedRun.mockResolvedValue(result as any);
vi.mocked(getIsVitestRunning).mockReturnValue(false);

await experimental_afterEach(context);

Expand Down Expand Up @@ -222,11 +228,14 @@ describe('afterEach', () => {
expect(context.reporting.addReport).not.toHaveBeenCalled();
});

it('should not run accessibility checks if vitest is running and story is not tagged with a11ytest', async () => {
it('should not run accessibility checks when parameters.a11y.test is "off"', async () => {
const context = createContext({
tags: [],
parameters: {
a11y: {
test: 'off',
},
},
});
vi.mocked(getIsVitestRunning).mockReturnValue(true);

await experimental_afterEach(context);

Expand Down
Loading