Skip to content

Update storybook to v10: Misc updates#74491

Merged
aduth merged 5 commits intoupdate/storybook-10from
update/storybook-10-misc-updates
Jan 9, 2026
Merged

Update storybook to v10: Misc updates#74491
aduth merged 5 commits intoupdate/storybook-10from
update/storybook-10-misc-updates

Conversation

@manzoorwanijk
Copy link
Member

@manzoorwanijk manzoorwanijk commented Jan 9, 2026

What?

Adds some suggestions to #74396

Why?

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

Before After

@manzoorwanijk manzoorwanijk self-assigned this Jan 9, 2026
@manzoorwanijk manzoorwanijk requested a review from aduth January 9, 2026 13:38
@manzoorwanijk manzoorwanijk added the [Type] Build Tooling Issues or PRs related to build tooling label Jan 9, 2026
@manzoorwanijk manzoorwanijk marked this pull request as ready for review January 9, 2026 13:44
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: aduth <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Comment on lines +60 to +61
viteFinal: async ( _config ) => {
return mergeConfig( _config, {
Copy link
Member

@aduth aduth Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could name this with a qualifier that describes what it is as distinct from the variable it's shadowing, like viteConfig. Underscores have some significant meaning as well, like TypeScript allowing unused variables if they start with an underscore.

Although what I might suggest instead is not assigning config and we could do something like...

export default {
  // ...
} satisfies StorybookConfig;

We'd still get autocompletion and type safety (with satisfies still being strict about type conformance more than as would be).

(I'll make these changes on the base branch after merging and we can continue the discussion there if you have further thoughts)

@aduth
Copy link
Member

aduth commented Jan 9, 2026

Thanks for suggesting these changes 👍

@aduth aduth merged commit 1ab7acc into update/storybook-10 Jan 9, 2026
48 of 50 checks passed
@aduth aduth deleted the update/storybook-10-misc-updates branch January 9, 2026 16:29
aduth added a commit that referenced this pull request Jan 12, 2026
* Use preset for addon

* Convert main.mjs to main.ts

* Disable default links for v10

* Update Storybook test-runner to v0.24.2

* Remove webpack from ignored licenses list

Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: aduth <[email protected]>
aduth added a commit that referenced this pull request Jan 12, 2026
* Use preset for addon

* Convert main.mjs to main.ts

* Disable default links for v10

* Update Storybook test-runner to v0.24.2

* Remove webpack from ignored licenses list

Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: aduth <[email protected]>
aduth added a commit that referenced this pull request Jan 12, 2026
* Use preset for addon

* Convert main.mjs to main.ts

* Disable default links for v10

* Update Storybook test-runner to v0.24.2

* Remove webpack from ignored licenses list

Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: aduth <[email protected]>
aduth added a commit that referenced this pull request Jan 13, 2026
* Use preset for addon

* Convert main.mjs to main.ts

* Disable default links for v10

* Update Storybook test-runner to v0.24.2

* Remove webpack from ignored licenses list

Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: aduth <[email protected]>
aduth added a commit that referenced this pull request Jan 14, 2026
* Update Storybook to v10 with Vite builder

* Update TypeScript base config to use bundler module resolution

* Update storybook to v10: Misc updates (#74491)

* Use preset for addon

* Convert main.mjs to main.ts

* Disable default links for v10

* Update Storybook test-runner to v0.24.2

* Remove webpack from ignored licenses list

Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: aduth <[email protected]>

* Avoid variable shadowing by type-checking as satisfies

* Align types export on jest-console package

* Update E2E Storybook configuration for v10

* Fix file extension on README Storybook configuration file reference

Co-Authored-By: Manzoor Wani <[email protected]>

* Use `?inline` instead of `?raw` for importing compiled Sass

`?raw` imports raw content of the referenced file. `?inline` assigns "the processed CSS string"

See: https://vite.dev/guide/features#disabling-css-injection-into-the-page

* Try renaming JavaScript Story to TypeScript

* Pin user-event to 14.4.3

Newer versions have an issue preventing reassignment of `HTMLElement.prototype.focus`, which is fixed in source, but not published in an available release. The reassignment is part of Ariakit's testing polyfills.

See:

- testing-library/user-event#1265
- https://github.com/ariakit/ariakit/blob/016f8a3ee9d3e59c593e2971221111a7fa137727/packages/ariakit-test/src/__utils.ts#L34

* Sync Storybook dependencies at common version

Also removes stale and conflicting entries in package-lock.json

* Update reference to storybook/react-webpack5 dependency

* Fix Storybook build by updating README import in introduction files

Update the import statements in introduction.mdx files to use '?raw' when importing README.md.

* Remove moduleResolution from sync tsconfig

* Add missing dependency array to useEffect

* Remove unnecessary .lazy suffix from scss files

---------

Co-authored-by: Manzoor Wani <[email protected]>
Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: Manzoor Wani <[email protected]>

Co-authored-by: aduth <[email protected]>
Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: jsnajdr <[email protected]>
Co-authored-by: mirka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants