Update storybook to v10: Misc updates#74491
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| viteFinal: async ( _config ) => { | ||
| return mergeConfig( _config, { |
There was a problem hiding this comment.
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)
|
Thanks for suggesting these changes 👍 |
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
What?
Adds some suggestions to #74396
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast