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 alpha 7.5.0-alpha.3 #24138

Merged
merged 200 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
d4504f1
Build: Migrate @storybook/addon-backgrounds to strict-ts
kasperpeulen Apr 20, 2023
645c7cd
fix: adjust tree node alignment when using a different font
bdriguesdev Apr 23, 2023
d45f0bd
fix: use secondary-based color as background when BranchNode is hover…
yoshi2no Apr 26, 2023
9093fbb
fix: use secondary-based color as background when LeafNode is hovered…
yoshi2no Apr 26, 2023
8387a40
Merge branch 'next' into kasper/strict-ts-backgrounds
kasperpeulen May 1, 2023
578cbbf
fix: sandbox package.json when pre-existing NODE_OPTIONS value contai…
sookmax May 22, 2023
7356c51
Merge branch 'next' into kasper/strict-ts-backgrounds
kasperpeulen May 31, 2023
72abeb0
Merge branch 'next' into kasper/strict-ts-backgrounds
kasperpeulen May 31, 2023
f562120
refactor: change FunctionComponent for FC to type components
bdriguesdev Jun 26, 2023
222e687
Merge branch 'next' into fix/tree-node-alignment
ndelangen Jun 27, 2023
5dcec37
set file-system-cache to ^2.4.1
seriouz Jun 29, 2023
1de752e
refactor: format file
bdriguesdev Jun 30, 2023
2bc038b
Merge branch 'next' into fix/tree-node-alignment
cdedreuille Jun 30, 2023
2a0fb5f
Merge branch 'next' into next
JReinhold Jul 3, 2023
73165b4
set file-system-cache to ^2.4.2
seriouz Jul 9, 2023
cec13f3
Merge branch 'next' into next
seriouz Jul 9, 2023
c12baf2
file-system-cache requires @types/fs-extra as devDependency
seriouz Jul 9, 2023
da0d4a5
add aliases that resolve react & react-dom to next/dist/compiled/
sookmax Aug 1, 2023
caf8e1b
Remove broken dangerouslySetInnerHTML property on mounting div in Inl…
valentinpalkovic Aug 4, 2023
20a7d21
Expand Ref for selected story
joaonunomota Aug 9, 2023
b050b1f
Merge pull request #23852 from storybookjs/shilman/fix-story-indexer
shilman Aug 16, 2023
3c34b0a
Write changelog for 7.3.1
storybook-bot Aug 16, 2023
a918f7d
Merge pull request #23842 from storybookjs/version-patch-from-7.3.0
shilman Aug 16, 2023
2d5bbb1
Bump version from "7.3.0" to "7.3.1" [skip ci]
storybook-bot Aug 16, 2023
b83bf34
Update ./docs/versions/next.json for v7.4.0-alpha.0
storybook-bot Aug 16, 2023
2e0da32
Merge pull request #23839 from storybookjs/yann/add-parallelism-count…
yannbf Aug 16, 2023
4b7b27b
Merge pull request #23856 from storybookjs/kasper/fix-template-file
kasperpeulen Aug 16, 2023
610ea31
Merge pull request #23857 from storybookjs/version-patch-from-7.3.1
kasperpeulen Aug 16, 2023
fa43dbb
Update README.md
shilman Aug 18, 2023
7e6206a
Merge pull request #23882 from storybookjs/revert-23496-norbert/react…
yannbf Aug 18, 2023
99ff330
Write changelog for 7.3.2
storybook-bot Aug 18, 2023
139cde4
Merge pull request #23884 from storybookjs/version-patch-from-7.3.1
shilman Aug 18, 2023
7247933
Bump version from "7.3.1" to "7.3.2" [skip ci]
storybook-bot Aug 18, 2023
f86b57b
Update error message to be useful when google fonts fail to load
nsheaps Aug 18, 2023
1f5b00b
basic docs (will add code references in a moment)
nsheaps Aug 18, 2023
9fb47bd
Update docs
nsheaps Aug 18, 2023
6405f36
add missing space
nsheaps Aug 18, 2023
9d84f42
remove extra word
nsheaps Aug 18, 2023
f9e9d33
Merge branch 'next' into make-font-failed-to-load-error-message-useful
yannbf Aug 21, 2023
13a729c
linting
nsheaps Aug 21, 2023
abf551f
prettier linting
nsheaps Aug 21, 2023
4d509a5
Update ./docs/versions/next.json for v7.4.0-alpha.1
storybook-bot Aug 23, 2023
20111e4
removed.
mastrzyz Aug 23, 2023
8fd8bca
Fix type checking.
mastrzyz Aug 23, 2023
f7c77b0
fix error for title
mastrzyz Aug 23, 2023
d1526a3
more fixes.
mastrzyz Aug 23, 2023
b4e9e4a
Merge branch 'next' into nextjs-precompiled-react
ndelangen Aug 25, 2023
0978fdc
Merge branch 'next' into fix/tree-node-alignment
ndelangen Aug 25, 2023
da3a420
Update ./docs/versions/next.json for v7.4.0-alpha.2
storybook-bot Aug 25, 2023
643eec1
updated.
mastrzyz Aug 28, 2023
01f18e3
MERGED
mastrzyz Aug 28, 2023
3ca6b45
Merged with next
mastrzyz Aug 28, 2023
b652cd1
MERGED
mastrzyz Aug 28, 2023
be61d0a
MERGED
mastrzyz Aug 28, 2023
d548caa
added
mastrzyz Aug 28, 2023
810cb02
Merge branch 'next' into mastrzyz/fix_two_ts_tests
mastrzyz Aug 28, 2023
01717a6
reverted
mastrzyz Aug 28, 2023
c32bb36
Merge branch 'mastrzyz/fix_two_ts_tests' of https://github.com/mastrz…
mastrzyz Aug 28, 2023
3b7bfba
Updated file-system-cache dependency to 2.4.4
seriouz Aug 29, 2023
230846d
Merge branch 'next' into node-options-quotes
JReinhold Aug 29, 2023
379b0c5
Merge branch 'next' into make-font-failed-to-load-error-message-useful
nsheaps Aug 29, 2023
c2643ea
Merge branch 'next' into mastrzyz/fix_two_ts_tests
mastrzyz Aug 29, 2023
07846ac
PR feedback - move docs into nextjs specific readme
nsheaps Aug 30, 2023
56e6630
Merge branch 'next' into make-font-failed-to-load-error-message-useful
nsheaps Aug 30, 2023
c6c1f7b
Theming: add `barHoverColor`
julien-deramond Dec 8, 2022
80d1420
Merge branch 'next' into make-font-failed-to-load-error-message-useful
nsheaps Aug 31, 2023
b244926
Merge branch 'next' into next-jd-theming-add-bar-hover-color
ndelangen Sep 4, 2023
e072814
Merge branch 'next' into expand-refs
ndelangen Sep 4, 2023
8dae1fe
Apply suggestions from code review
nsheaps Sep 4, 2023
157f003
Merge branch 'next' into make-font-failed-to-load-error-message-useful
nsheaps Sep 4, 2023
aa18344
rename index to indexFn
JReinhold Sep 5, 2023
49ef8fa
indexFn -> createIndex
JReinhold Sep 5, 2023
ea2d83b
Merge branch 'next' into make-font-failed-to-load-error-message-useful
jonniebigodes Sep 6, 2023
1944551
Merge branch 'next' into rename-index-fn
JReinhold Sep 6, 2023
e495101
improve the status ui in the sidebar look and feel
ndelangen Sep 7, 2023
903405b
Merge branch 'next' into rename-index-fn
JReinhold Sep 8, 2023
0c682d0
createIndex in server
JReinhold Sep 8, 2023
f707bb7
Merge branch 'rename-index-fn' of github.com:storybookjs/storybook in…
JReinhold Sep 8, 2023
9a56048
categorize nextjs font errors
yannbf Sep 8, 2023
e6fcf8c
indexFn > createIndex in tests
JReinhold Sep 8, 2023
24ca518
Merge branch 'next' into make-font-failed-to-load-error-message-useful
yannbf Sep 8, 2023
668a65a
fix typo
yannbf Sep 8, 2023
9e9d837
Don't distribute generic type of Meta and Story
kasperpeulen Sep 8, 2023
a2b5d87
change alignment
ndelangen Sep 11, 2023
be8d4b9
upgrade chromatic bin package
ndelangen Sep 11, 2023
e1279df
Merge pull request #24133 from storybookjs/norbert/upgrade-chromatic-bin
ndelangen Sep 11, 2023
a6fa8cd
Merge branch 'next-release' into next
storybook-bot Sep 11, 2023
7a33f70
Update CHANGELOG.md for v7.4.1 [skip ci]
storybook-bot Sep 11, 2023
b67f9f4
Merge pull request #20169 from julien-deramond/next-jd-theming-add-ba…
ndelangen Sep 11, 2023
939bf89
Adds video to the Install page
jonniebigodes Sep 11, 2023
0600f1f
Merge branch 'next' into rename-index-fn
JReinhold Sep 12, 2023
e11c946
align the icon
ndelangen Sep 12, 2023
9a2bc75
Merge pull request #24075 from storybookjs/rename-index-fn
JReinhold Sep 12, 2023
6860953
regen lockfiles
ndelangen Sep 12, 2023
966aa79
cleanup
ndelangen Sep 12, 2023
6235cab
downgrade swc/core because of https://github.com/TypeStrong/ts-node/i…
ndelangen Sep 12, 2023
87ca927
fix types issues, after upgrading by regenerating lockfiles
ndelangen Sep 12, 2023
dd31957
fix linting after
ndelangen Sep 12, 2023
291fb03
downgrade zone.js
ndelangen Sep 12, 2023
10efbd5
downgrade zone.js
ndelangen Sep 12, 2023
22bc762
Merge pull request #24110 from storybookjs/kasper/fix-types
kasperpeulen Sep 12, 2023
a985a6f
downgrade of sb/jest and sb/expect and add prettier types
ndelangen Sep 12, 2023
4f6881e
downgrade overlayscrollbars
ndelangen Sep 12, 2023
49f7577
Merge branch 'next' into norbert/regen-lockfile-september
ndelangen Sep 12, 2023
5446cc0
Merge branch 'next' into docs_add_video_install
jonniebigodes Sep 12, 2023
323b0bf
do not override the path fill if the path has a fill of it's own
ndelangen Sep 12, 2023
b8eb185
add 2 stories for testing the colored left icon in active list
ndelangen Sep 12, 2023
86c218b
Remove unnecessary cast
kasperpeulen Sep 12, 2023
4be9ce5
UI: fix keydown focusInInput check when input is in a shadow dom
stropitek Sep 12, 2023
f86a652
Merge pull request #24152 from storybookjs/norbert/regen-lockfile-sep…
ndelangen Sep 12, 2023
5dce21a
Merge branch 'next' into docs_add_video_install
jonniebigodes Sep 12, 2023
01aa0e8
Merge pull request #24144 from storybookjs/docs_add_video_install
jonniebigodes Sep 12, 2023
bad34e1
Merge pull request #22677 from sookmax/node-options-quotes
JReinhold Sep 12, 2023
f626c74
docs(vite): add the option to install via pnpm
pure-js Sep 13, 2023
0545e3b
Merge branch 'next' into norbert/improve-status-ui-sidebar
ndelangen Sep 13, 2023
5df147c
Merge branch 'next' into norbert/improve-svg-recoloration
ndelangen Sep 13, 2023
dd1b48d
explicitly disable crlf to match prettier rules
decherneyge Sep 13, 2023
0ae48b0
Merge pull request #24164 from decherneyge/my-first-storybook-contrib…
ndelangen Sep 14, 2023
2330cb6
pixel shifting shenanigans
ndelangen Sep 14, 2023
33e042d
Merge branch 'next' into norbert/improve-status-ui-sidebar
ndelangen Sep 14, 2023
f5e2565
bump up esbuild-register to 3.5.0
Sep 14, 2023
9c49e16
Merge pull request #24099 from storybookjs/norbert/improve-status-ui-…
ndelangen Sep 14, 2023
624cb51
Merge branch 'next' into bump-up/esbuild-register
ndelangen Sep 14, 2023
588643e
fix lockfile
ndelangen Sep 14, 2023
72400c6
Merge pull request #24156 from storybookjs/norbert/improve-svg-recolo…
ndelangen Sep 14, 2023
c05b719
throw an error when critical presets fail to load
yannbf Sep 14, 2023
1c7e01f
throw error when Storybook builder is missing
yannbf Sep 14, 2023
2b68630
migrate from config to previewAnnotations
yannbf Sep 14, 2023
9e7c93b
Merge pull request #22221 from bdriguesdev/fix/tree-node-alignment
ndelangen Sep 14, 2023
52aeae7
Docs: Update link to Story "Parameters" section
kBazilio Sep 14, 2023
1964e33
Merge pull request #24180 from kBazilio/parameters-doc-link-update
kasperpeulen Sep 15, 2023
d91b7d1
Merge pull request #24175 from anneau/bump-up/esbuild-register
kasperpeulen Sep 15, 2023
896b2e7
Merge pull request #24178 from storybookjs/yann/nextjs-config-to-prev…
ndelangen Sep 15, 2023
0b5dc9a
Merge pull request #24176 from storybookjs/yann/critical-preset-error
yannbf Sep 15, 2023
3d0d8a1
Merge pull request #24177 from storybookjs/yann/missing-sb-builder-error
yannbf Sep 15, 2023
9c6469d
Update CHANGELOG.md for v7.4.2 [skip ci]
storybook-bot Sep 15, 2023
41a1ee3
Change the Date$/ to Dates$/i
arup1221 Sep 15, 2023
c823fac
Merge branch 'next' into docs-add-pnpm-option-to-vite-build-page
jonniebigodes Sep 16, 2023
0e4106b
Merge branch 'next' into fix/hover-color-inconsistency
yoshi2no Sep 16, 2023
7f98bff
fix: #22199 modify LeafNodeStyleWrapper hover and focus background
yoshi2no Sep 16, 2023
04ced71
Merge pull request #24160 from pure-js/docs-add-pnpm-option-to-vite-b…
jonniebigodes Sep 16, 2023
9f73c2e
Upgrade Chromatic addon to v77 and use `chromatic.config.json`
tmeasday Sep 18, 2023
a941216
Merge branch 'next' into make-font-failed-to-load-error-message-useful
yannbf Sep 18, 2023
dd144a0
Merge pull request #23891 from nsheaps/make-font-failed-to-load-error…
yannbf Sep 18, 2023
f395933
Merge pull request #24160 from pure-js/docs-add-pnpm-option-to-vite-b…
ndelangen Sep 18, 2023
7add65b
enable sandbox filtering
ndelangen Sep 18, 2023
836bea3
wip
ndelangen Sep 18, 2023
2bf4dc5
Merge pull request #24206 from storybookjs/norbert/improve-type-of-st…
ndelangen Sep 18, 2023
73183e9
filter some manager errors
yannbf Sep 18, 2023
5d4c78c
Discard changes to .github/workflows/generate-sandboxes-next.yml
ndelangen Sep 18, 2023
29ea85e
Update .github/workflows/generate-sandboxes-next.yml
ndelangen Sep 18, 2023
f49c9a2
Merge pull request #24208 from storybookjs/norbert/filter-angular-pre…
ndelangen Sep 19, 2023
63f3384
Merge pull request #24217 from storybookjs/yann/filter-certain-manage…
yannbf Sep 19, 2023
c297b5d
fix `sb add` adding the same addon even if already present
ndelangen Sep 19, 2023
b3983c3
Merge branch 'next' into fix/hover-color-inconsistency
cdedreuille Sep 19, 2023
4fbbc31
Merge branch 'next' into nextjs-precompiled-react
yannbf Sep 19, 2023
d4d799c
Merge pull request #23976 from mastrzyz/mastrzyz/remove_concurency_ts…
yannbf Sep 19, 2023
0370753
Merge branch 'next' into seriouz-next
ndelangen Sep 19, 2023
26806a5
Merge branch 'next' into kasper/strict-ts-backgrounds
yannbf Sep 19, 2023
cee6a1e
cleanup
ndelangen Sep 19, 2023
93aa568
Merge pull request #1 from seriouz/next
seriouz Sep 19, 2023
80e55ea
Merge pull request #24203 from storybookjs/upgrade-to-VT-version-77
ndelangen Sep 19, 2023
e00fe77
Merge branch 'next' into nextjs-precompiled-react
ndelangen Sep 19, 2023
5c9099c
Merge branch 'next' into expand-refs
ndelangen Sep 19, 2023
c548c72
Merge branch 'next' into 24120-fix-date
arup1221 Sep 19, 2023
aae03b0
Merge pull request #22178 from storybookjs/kasper/strict-ts-backgrounds
ndelangen Sep 19, 2023
cf5519b
Merge pull request #24232 from seriouz/next_20230919
ndelangen Sep 19, 2023
85ce31e
Merge pull request #23781 from joaonunomota/expand-refs
ndelangen Sep 19, 2023
48356ea
fix lockfile
ndelangen Sep 19, 2023
f02573f
Merge branch 'next' into pr/arup1221/24195
ndelangen Sep 19, 2023
def1784
fix snapshots
ndelangen Sep 19, 2023
2b9bf9a
Merge pull request #23671 from sookmax/nextjs-precompiled-react
ndelangen Sep 19, 2023
16968f0
implement fallback to composedPath in the unlikely case that it doesn…
stropitek Sep 19, 2023
08ae741
Merge pull request #24195 from arup1221/24120-fix-date
ndelangen Sep 19, 2023
b2c69ee
Merge pull request #22262 from yoshi2no/fix/hover-color-inconsistency
ndelangen Sep 19, 2023
960154a
Merge pull request #23932 from mastrzyz/mastrzyz/fix_two_ts_tests
ndelangen Sep 19, 2023
4a29bbb
Merge pull request #24229 from storybookjs/norbert/sb-add-no-duplicat…
yannbf Sep 20, 2023
ffd4e53
fix a bug in useAddonState when using a setter function
ndelangen Sep 20, 2023
901f2ae
Merge branch 'next' into norbert/use-addon-state-bug
ndelangen Sep 20, 2023
80ee481
Make Nextjs 13.5 work again by mapping it's dependencies to aliasses
ndelangen Sep 20, 2023
0d827bf
Merge pull request #24179 from stropitek/fix-shortcuts-shadow-dom
ndelangen Sep 20, 2023
1ce0548
improve the mapping of versions so we can easily change which version…
ndelangen Sep 20, 2023
da8f097
Merge branch 'next' into norbert/fix-nextjs-13-5-compatibility
ndelangen Sep 20, 2023
afe4c53
Apply suggestions from code review
ndelangen Sep 20, 2023
85b63e0
Merge pull request #24239 from storybookjs/norbert/fix-nextjs-13-5-co…
ndelangen Sep 20, 2023
64d4536
Update CHANGELOG.md for v7.4.3 [skip ci]
storybook-bot Sep 20, 2023
c4feec4
Merge branch 'next' into norbert/use-addon-state-bug
ndelangen Sep 20, 2023
ec0aaba
Merge pull request #24237 from storybookjs/norbert/use-addon-state-bug
ndelangen Sep 20, 2023
a49d41b
WIP: Add indexers API reference
kylegach Aug 31, 2023
db17655
indexFn -> createIndex, as per https://github.com/storybookjs/storybo…
JReinhold Sep 8, 2023
0e0ab5c
add indexer title code snippets
JReinhold Sep 8, 2023
907ff2a
add example for json stories
JReinhold Sep 8, 2023
ade1681
replace examples with real use cases
JReinhold Sep 8, 2023
ab79dfc
add ts 4.9 snippets.
JReinhold Sep 8, 2023
59ff6d1
Further improvements
kylegach Sep 12, 2023
48e5a2c
Fix broken link
kylegach Sep 12, 2023
f56d8f0
Revise architectural diagrams
kylegach Sep 14, 2023
3f60b60
Adjust related docs
kylegach Sep 20, 2023
1a0d84f
Merge pull request #23947 from storybookjs/indexer-api-ref
kylegach Sep 20, 2023
c1e3a99
Write changelog for 7.5.0-alpha.3
storybook-bot Sep 21, 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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/**/.yarn/** linguist-generated
* -text
2 changes: 1 addition & 1 deletion .github/workflows/generate-sandboxes-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: yarn wait-on http://localhost:6001
working-directory: ./code
- name: Generate
run: yarn generate-sandboxes --local-registry
run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease
working-directory: ./code
- name: Publish
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-sandboxes-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: yarn wait-on http://localhost:6001
working-directory: ./code
- name: Generate
run: yarn generate-sandboxes --local-registry
run: yarn generate-sandboxes --local-registry --exclude=angular-cli/prerelease
working-directory: ./code
- name: Publish
run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push --branch=next
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 7.4.3

- CLI: Fix `sb add` adding duplicative entries - [#24229](https://github.com/storybookjs/storybook/pull/24229), thanks [@ndelangen](https://github.com/ndelangen)!
- NextJS: Add compatibility with nextjs `13.5` - [#24239](https://github.com/storybookjs/storybook/pull/24239), thanks [@ndelangen](https://github.com/ndelangen)!
- NextJS: Aliases `react` and `react-dom` like `next.js` does - [#23671](https://github.com/storybookjs/storybook/pull/23671), thanks [@sookmax](https://github.com/sookmax)!
- Types: Allow `null` in value of `experimental_updateStatus` to clear status - [#24206](https://github.com/storybookjs/storybook/pull/24206), thanks [@ndelangen](https://github.com/ndelangen)!

## 7.4.2

- Addon API: Improve the updateStatus API - [#24007](https://github.com/storybookjs/storybook/pull/24007), thanks [@ndelangen](https://github.com/ndelangen)!
- Nextjs: Migrate from config to previewAnnotations - [#24178](https://github.com/storybookjs/storybook/pull/24178), thanks [@yannbf](https://github.com/yannbf)!
- UI: Fix SVG override fill when path has a fill attribute - [#24156](https://github.com/storybookjs/storybook/pull/24156), thanks [@ndelangen](https://github.com/ndelangen)!
- UI: Improve look and feel of status UI in sidebar - [#24099](https://github.com/storybookjs/storybook/pull/24099), thanks [@ndelangen](https://github.com/ndelangen)!

## 7.4.1

- CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)!
- CLI: Fix packageManager handling in `sb add` - [#24079](https://github.com/storybookjs/storybook/pull/24079), thanks [@Integrayshaun](https://github.com/Integrayshaun)!
- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)!
- Docs: Fix TOC import - [#24047](https://github.com/storybookjs/storybook/pull/24047), thanks [@shilman](https://github.com/shilman)!
- Telemetry: Filter addon options to protect sensitive info - [#24000](https://github.com/storybookjs/storybook/pull/24000), thanks [@shilman](https://github.com/shilman)!
- Types: Remove `@types/react` dep from `@storybook/types` - [#24042](https://github.com/storybookjs/storybook/pull/24042), thanks [@JReinhold](https://github.com/JReinhold)!
- Vue3: Remove console.log in sourceDecorator - [#24062](https://github.com/storybookjs/storybook/pull/24062), thanks [@oruman](https://github.com/oruman)!

## 7.4.0

- Addon-docs: Resolve `mdx-react-shim` & `@storybook/global` correctly - [#23941](https://github.com/storybookjs/storybook/pull/23941), thanks [@ndelangen](https://github.com/ndelangen)!
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## 7.5.0-alpha.3

- Build: Filter some manager errors - [#24217](https://github.com/storybookjs/storybook/pull/24217), thanks [@yannbf](https://github.com/yannbf)!
- Build: Migrate @storybook/addon-backgrounds to strict-ts - [#22178](https://github.com/storybookjs/storybook/pull/22178), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- Build: Upgrade chromatic bin package - [#24133](https://github.com/storybookjs/storybook/pull/24133), thanks [@ndelangen](https://github.com/ndelangen)!
- CLI: Change `/Date$/` to `/Dates$/i` - [#24195](https://github.com/storybookjs/storybook/pull/24195), thanks [@arup1221](https://github.com/arup1221)!
- CLI: Fix `sb add` adding duplicative entries - [#24229](https://github.com/storybookjs/storybook/pull/24229), thanks [@ndelangen](https://github.com/ndelangen)!
- Core: Throw an error when critical presets fail to load - [#24176](https://github.com/storybookjs/storybook/pull/24176), thanks [@yannbf](https://github.com/yannbf)!
- Core: Unify error when builder is missing - [#24177](https://github.com/storybookjs/storybook/pull/24177), thanks [@yannbf](https://github.com/yannbf)!
- Core: Upgrade `esbuild-register` to `3.5.0` - [#24175](https://github.com/storybookjs/storybook/pull/24175), thanks [@anneau](https://github.com/anneau)!
- Dependencies: Upgrade `file-system-cache` - [#24232](https://github.com/storybookjs/storybook/pull/24232), thanks [@seriouz](https://github.com/seriouz)!
- Indexer: Rename `index` to `createIndex` - [#24075](https://github.com/storybookjs/storybook/pull/24075), thanks [@JReinhold](https://github.com/JReinhold)!
- Maintenance: Regen lockfiles - [#24152](https://github.com/storybookjs/storybook/pull/24152), thanks [@ndelangen](https://github.com/ndelangen)!
- Manager: Fix useAddonState when using a setter function - [#24237](https://github.com/storybookjs/storybook/pull/24237), thanks [@ndelangen](https://github.com/ndelangen)!
- NextJS: Add compatibility with nextjs `13.5` - [#24239](https://github.com/storybookjs/storybook/pull/24239), thanks [@ndelangen](https://github.com/ndelangen)!
- NextJS: Aliases `react` and `react-dom` like `next.js` does - [#23671](https://github.com/storybookjs/storybook/pull/23671), thanks [@sookmax](https://github.com/sookmax)!
- Nextjs: Improve Google Fonts failure error messages and documentation - [#23891](https://github.com/storybookjs/storybook/pull/23891), thanks [@nsheaps](https://github.com/nsheaps)!
- Nextjs: Migrate from config to previewAnnotations - [#24178](https://github.com/storybookjs/storybook/pull/24178), thanks [@yannbf](https://github.com/yannbf)!
- Theming: Add `barHoverColor` - [#20169](https://github.com/storybookjs/storybook/pull/20169), thanks [@julien-deramond](https://github.com/julien-deramond)!
- Types: Allow `null` in value of `experimental_updateStatus` to clear status - [#24206](https://github.com/storybookjs/storybook/pull/24206), thanks [@ndelangen](https://github.com/ndelangen)!
- Types: Don't distribute generic type of Meta and Story - [#24110](https://github.com/storybookjs/storybook/pull/24110), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
- UI: Expand sidebar for selected story when using composition - [#23781](https://github.com/storybookjs/storybook/pull/23781), thanks [@joaonunomota](https://github.com/joaonunomota)!
- UI: Fix SVG override fill when path has a fill attribute - [#24156](https://github.com/storybookjs/storybook/pull/24156), thanks [@ndelangen](https://github.com/ndelangen)!
- UI: Fix TreeNode alignment when using a different font - [#22221](https://github.com/storybookjs/storybook/pull/22221), thanks [@bdriguesdev](https://github.com/bdriguesdev)!
- UI: Fix custom theme hover-color inconsistency - [#22262](https://github.com/storybookjs/storybook/pull/22262), thanks [@yoshi2no](https://github.com/yoshi2no)!
- UI: Fix keydown shortcut within shadow tree - [#24179](https://github.com/storybookjs/storybook/pull/24179), thanks [@stropitek](https://github.com/stropitek)!
- UI: Improve look and feel of status UI in sidebar - [#24099](https://github.com/storybookjs/storybook/pull/24099), thanks [@ndelangen](https://github.com/ndelangen)!

## 7.5.0-alpha.2

- Angular: Categorize legacy build options error - [#24014](https://github.com/storybookjs/storybook/pull/24014), thanks [@yannbf](https://github.com/yannbf)!
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/components/Report/HighlightToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function areAllRequiredElementsHighlighted(
highlighted: string[]
): CheckBoxStates {
const highlightedCount = elementsToHighlight.filter((item) =>
highlighted.includes(item.target[0])
highlighted.includes(item.target[0] as any)
).length;

// eslint-disable-next-line no-nested-ternary
Expand Down Expand Up @@ -52,7 +52,7 @@ const HighlightToggle: React.FC<ToggleProps> = ({ toggleId, elementsToHighlight

const handleToggle = React.useCallback((): void => {
toggleHighlight(
elementsToHighlight.map((e) => e.target[0]),
elementsToHighlight.map((e) => e.target[0] as any),
checkBoxState !== CheckBoxStates.CHECKED
);
}, [elementsToHighlight, checkBoxState, toggleHighlight]);
Expand Down
6 changes: 3 additions & 3 deletions code/addons/backgrounds/src/containers/BackgroundSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { getBackgroundColorByName } from '../helpers';

const createBackgroundSelectorItem = memoize(1000)(
(
id: string,
id: string | null,
name: string,
value: string,
hasSwatch: boolean,
hasSwatch: boolean | null,
change: (arg: { selected: string; name: string }) => void,
active: boolean
): BackgroundSelectorItem => ({
Expand Down Expand Up @@ -102,7 +102,7 @@ export const BackgroundSelector: FC = memo(function BackgroundSelector() {
}

const onBackgroundChange = useCallback(
(value: string) => {
(value: string | undefined) => {
updateGlobals({ [BACKGROUNDS_PARAM_KEY]: { ...globals[BACKGROUNDS_PARAM_KEY], value } });
},
[backgroundsConfig, globals, updateGlobals]
Expand Down
8 changes: 4 additions & 4 deletions code/addons/backgrounds/src/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const isReduceMotionEnabled = () => {
export const getBackgroundColorByName = (
currentSelectedValue: string,
backgrounds: Background[] = [],
defaultName: string
defaultName: string | null | undefined
): string => {
if (currentSelectedValue === 'transparent') {
return 'transparent';
Expand Down Expand Up @@ -52,7 +52,7 @@ export const clearStyles = (selector: string | string[]) => {
const clearStyle = (selector: string) => {
const element = document.getElementById(selector) as HTMLElement;
if (element) {
element.parentElement.removeChild(element);
element.parentElement?.removeChild(element);
}
};

Expand All @@ -70,7 +70,7 @@ export const addGridStyle = (selector: string, css: string) => {
}
};

export const addBackgroundStyle = (selector: string, css: string, storyId: string) => {
export const addBackgroundStyle = (selector: string, css: string, storyId: string | null) => {
const existingStyle = document.getElementById(selector) as HTMLElement;
if (existingStyle) {
if (existingStyle.innerHTML !== css) {
Expand All @@ -85,7 +85,7 @@ export const addBackgroundStyle = (selector: string, css: string, storyId: strin
// If grids already exist, we want to add the style tag BEFORE it so the background doesn't override grid
const existingGridStyle = document.getElementById(gridStyleSelector) as HTMLElement;
if (existingGridStyle) {
existingGridStyle.parentElement.insertBefore(style, existingGridStyle);
existingGridStyle.parentElement?.insertBefore(style, existingGridStyle);
} else {
document.head.appendChild(style);
}
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface Background {
}

export interface BackgroundsParameter {
default?: string;
default?: string | null;
disable?: boolean;
values: Background[];
}
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"strict": false
"strict": true
}
}
2 changes: 1 addition & 1 deletion code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async function webpack(

export const createStoriesMdxIndexer = (legacyMdx1?: boolean): Indexer => ({
test: /(stories|story)\.mdx$/,
index: async (fileName, opts) => {
createIndex: async (fileName, opts) => {
let code = (await fs.readFile(fileName, 'utf-8')).toString();
const { compile } = legacyMdx1
? await import('@storybook/mdx1-csf')
Expand Down
4 changes: 3 additions & 1 deletion code/builders/builder-manager/src/utils/files.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { OutputFile } from 'esbuild';
import { platform } from 'os';
import { sanitizePath } from './files';

Expand All @@ -9,12 +10,13 @@ test('sanitizePath', () => {
? 'C:\\Users\\username\\Projects\\projectname\\storybook'
: '/Users/username/Projects/projectname/storybook';
const text = 'demo text';
const file = {
const file: OutputFile = {
path: isWindows
? 'C:\\Users\\username\\Projects\\projectname\\storybook\\node_modules\\@storybook\\addon-x+y\\dist\\manager.js'
: '/Users/username/Projects/projectname/storybook/node_modules/@storybook/addon-x+y/dist/manager.js',
contents: Uint8Array.from(Array.from(text).map((letter) => letter.charCodeAt(0))),
text,
hash: '',
};
const { location, url } = sanitizePath(file, addonsDir);

Expand Down
2 changes: 1 addition & 1 deletion code/builders/builder-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@storybook/node-logger": "workspace:*",
"@storybook/preview": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@swc/core": "^1.3.49",
"@swc/core": "^1.3.82",
"@types/node": "^16.0.0",
"@types/semver": "^7.3.4",
"babel-loader": "^9.0.0",
Expand Down
8 changes: 8 additions & 0 deletions code/chromatic.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"projectId": "Project:635781f3500dd2c49e189caf",
"projectToken": "80b312430ec4",
"buildScriptName": "storybook:ui:build",
"onlyChanged": true,
"storybookConfigDir": "./ui/.storybook",
"storybookBaseDir": "./code"
}
46 changes: 46 additions & 0 deletions code/frameworks/nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [next/font/google](#nextfontgoogle)
- [next/font/local](#nextfontlocal)
- [Not supported features of next/font](#not-supported-features-of-nextfont)
- [Mocking fonts during testing](#mocking-fonts-during-testing)
- [Next.js Routing](#nextjs-routing)
- [Overriding defaults](#overriding-defaults)
- [Global Defaults](#global-defaults)
Expand Down Expand Up @@ -271,6 +272,51 @@ The following features are not supported (yet). Support for these features might
- [preload](https://nextjs.org/docs/api-reference/next/font#preload) option gets ignored. Storybook handles Font loading its own way.
- [display](https://nextjs.org/docs/api-reference/next/font#display) option gets ignored. All fonts are loaded with display set to "block" to make Storybook load the font properly.

#### Mocking fonts during testing

Occasionally fetching fonts from Google may fail as part of your Storybook build step. It is highly recommended to mock these requests, as those failures can cause your pipeline to fail as well. Next.js [supports mocking fonts](https://github.com/vercel/next.js/blob/725ddc7371f80cca273779d37f961c3e20356f95/packages/font/src/google/fetch-css-from-google-fonts.ts#L36) via a JavaScript module located where the env var `NEXT_FONT_GOOGLE_MOCKED_RESPONSES` references.

For example, using [GitHub Actions](https://www.chromatic.com/docs/github-actions):

```shell
- uses: chromaui/action@v1
env:
#👇 the location of mocked fonts to use
NEXT_FONT_GOOGLE_MOCKED_RESPONSES: ${{ github.workspace }}/mocked-google-fonts.js
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
```

Your mocked fonts will look something like this:

```js
// mocked-google-fonts.js
//👇 Mocked responses of google fonts with the URL as the key
module.exports = {
'https://fonts.googleapis.com/css?family=Inter:wght@400;500;600;800&display=block': `
/* cyrillic-ext */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: block;
src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZJhiJ-Ek-_EeAmM.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* more font declarations go here */
/* latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: block;
src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}`,
};
```

### Next.js Routing

[Next.js's router](https://nextjs.org/docs/routing/introduction) is automatically stubbed for you so that when the router is interacted with, all of its interactions are automatically logged to the Actions ctions panel if you have the [Storybook actions addon](https://storybook.js.org/docs/react/essentials/actions).
Expand Down
1 change: 1 addition & 0 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"@storybook/addon-actions": "workspace:*",
"@storybook/builder-webpack5": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/node-logger": "workspace:*",
"@storybook/preset-react-webpack": "workspace:*",
"@storybook/preview-api": "workspace:*",
Expand Down
14 changes: 14 additions & 0 deletions code/frameworks/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import type { NextConfig } from 'next';
import { DefinePlugin } from 'webpack';
import { addScopedAlias, getNextjsVersion, resolveNextConfig } from '../utils';

const tryResolve = (path: string) => {
try {
return require.resolve(path);
} catch (err) {
return false;
}
};

export const configureConfig = async ({
baseConfig,
nextConfigPath,
Expand All @@ -17,6 +25,12 @@ export const configureConfig = async ({
const nextConfig = await resolveNextConfig({ baseConfig, nextConfigPath, configDir });

addScopedAlias(baseConfig, 'next/config');
if (tryResolve('next/dist/compiled/react')) {
addScopedAlias(baseConfig, 'react', 'next/dist/compiled/react');
}
if (tryResolve('next/dist/compiled/react-dom')) {
addScopedAlias(baseConfig, 'react-dom', 'next/dist/compiled/react-dom');
}
setupRuntimeConfig(baseConfig, nextConfig);

return nextConfig;
Expand Down
36 changes: 36 additions & 0 deletions code/frameworks/nextjs/src/dependency-map.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import type { Configuration as WebpackConfig } from 'webpack';
import semver from 'semver';
import { getNextjsVersion, addScopedAlias } from './utils';

const mapping: Record<string, Record<string, string>> = {
'<11.1.0': {
'next/dist/next-server/lib/router-context': 'next/dist/next-server/lib/router-context',
},
'>=11.1.0': {
'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context',
},
'>=13.5.0': {
'next/dist/shared/lib/router-context': 'next/dist/shared/lib/router-context.shared-runtime',
'next/dist/shared/lib/head-manager-context':
'next/dist/shared/lib/head-manager-context.shared-runtime',
'next/dist/shared/lib/app-router-context':
'next/dist/shared/lib/app-router-context.shared-runtime',
'next/dist/shared/lib/hooks-client-context':
'next/dist/shared/lib/hooks-client-context.shared-runtime',
},
};

export const configureAliasing = (baseConfig: WebpackConfig): void => {
const version = getNextjsVersion();
const result: Record<string, string> = {};

Object.keys(mapping).forEach((key) => {
if (semver.intersects(version, key)) {
Object.assign(result, mapping[key]);
}
});

Object.entries(result).forEach(([name, alias]) => {
addScopedAlias(baseConfig, name, alias);
});
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
import loaderUtils from 'next/dist/compiled/loader-utils3';
import {
GoogleFontsDownloadError,
GoogleFontsLoadingError,
} from '@storybook/core-events/server-errors';
import type { LoaderOptions } from '../types';

const cssCache = new Map<string, Promise<string>>();
Expand Down Expand Up @@ -33,7 +37,10 @@ export async function getFontFaceDeclarations(options: LoaderOptions) {
cssCache.delete(url);
}
if (fontFaceCSS === null) {
throw Error(`Failed to fetch \`${fontFamily}\` from Google Fonts.`);
throw new GoogleFontsDownloadError({
fontFamily,
url,
});
}

return {
Expand All @@ -45,6 +52,6 @@ export async function getFontFaceDeclarations(options: LoaderOptions) {
variable,
};
} catch (error) {
throw new Error("Google Fonts couldn't be loaded.");
throw new GoogleFontsLoadingError({ error, url });
}
}
Loading