-
Notifications
You must be signed in to change notification settings - Fork 220
Fix Storybook 10 compatibility after Dependabot upgrade #4262
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
base: main
Are you sure you want to change the base?
Conversation
Bumps the storybook group with 7 updates in the /extensions/ql-vscode directory: | Package | From | To | | --- | --- | --- | | [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `8.6.14` | `9.1.6` | | [@storybook/addon-actions](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/actions) | `8.6.14` | `9.0.8` | | [@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/links) | `8.6.14` | `9.1.6` | | [@storybook/icons](https://github.com/storybookjs/icons) | `1.4.0` | `1.6.0` | | [@storybook/react](https://github.com/storybookjs/storybook/tree/HEAD/code/renderers/react) | `8.6.14` | `9.1.6` | | [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `8.6.14` | `9.1.6` | | [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `8.6.14` | `9.1.6` | Updates `@storybook/addon-a11y` from 8.6.14 to 9.1.6 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v9.1.6/code/addons/a11y) Updates `@storybook/addon-actions` from 8.6.14 to 9.0.8 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/v9.0.8/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v9.0.8/code/addons/actions) Updates `@storybook/addon-links` from 8.6.14 to 9.1.6 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v9.1.6/code/addons/links) Updates `@storybook/icons` from 1.4.0 to 1.6.0 - [Release notes](https://github.com/storybookjs/icons/releases) - [Changelog](https://github.com/storybookjs/icons/blob/main/CHANGELOG.md) - [Commits](storybookjs/icons@v1.4.0...v1.6.0) Updates `@storybook/react` from 8.6.14 to 9.1.6 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v9.1.6/code/renderers/react) Updates `@storybook/react-vite` from 8.6.14 to 9.1.6 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v9.1.6/code/frameworks/react-vite) Updates `storybook` from 8.6.14 to 9.1.6 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v9.1.6/code/core) --- updated-dependencies: - dependency-name: "@storybook/addon-a11y" dependency-version: 9.1.6 dependency-type: direct:development update-type: version-update:semver-major dependency-group: storybook - dependency-name: "@storybook/addon-actions" dependency-version: 9.0.8 dependency-type: direct:development update-type: version-update:semver-major dependency-group: storybook - dependency-name: "@storybook/addon-links" dependency-version: 9.1.6 dependency-type: direct:development update-type: version-update:semver-major dependency-group: storybook - dependency-name: "@storybook/icons" dependency-version: 1.6.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: storybook - dependency-name: "@storybook/react" dependency-version: 9.1.6 dependency-type: direct:development update-type: version-update:semver-major dependency-group: storybook - dependency-name: "@storybook/react-vite" dependency-version: 9.1.6 dependency-type: direct:development update-type: version-update:semver-major dependency-group: storybook - dependency-name: storybook dependency-version: 9.1.6 dependency-type: direct:development update-type: version-update:semver-major dependency-group: storybook ... Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
…rily disabling MDX - Convert require.resolve() to ES module syntax using import.meta.url - Remove MDX files from stories config to fix build (MDX support needs proper addon configuration) Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
- Install @storybook/addon-docs package - Add addon-docs to the addons configuration in main.ts - Update Overview.mdx to use @storybook/addon-docs/blocks import path - Re-enable MDX files in stories configuration - Verify build succeeds with MDX documentation included Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
…low-lint-again Fix TypeScript type errors in VSCode Elements event handlers and refs
…low-again Re-enable MDX documentation support in Storybook v10
|
@copilot Please rebase this PR (including its parent PR in branch |
Rebased onto main and updated the PR description to include all commits. Storybook 10 builds and runs successfully. Latest commit: ef85f1d |
Removed deprecated imports from @storybook/addon-docs/blocks and converted to plain MDX with frontmatter. Added @storybook/addon-docs package which was missing. The Overview page now loads correctly without errors. Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Fixed the Overview.mdx error by removing deprecated imports from Commit: e1bc98f Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades Storybook from v8.6.14 to v10.1.11 to address breaking API changes in Storybook 9/10. The upgrade involves package updates, import path changes to use the new consolidated storybook package, TypeScript configuration updates for ESM module resolution, and fixes for type compatibility issues in React components.
Changes:
- Upgraded Storybook packages from v8 to v10 (including core, addons, and react-vite)
- Updated import paths to use consolidated Storybook 10 API (
storybook/manager-api,storybook/theming,storybook/actions) - Changed TypeScript
moduleResolutionfrom"node"to"bundler"for ESM compatibility - Fixed event handler types (changed from specific React event types to generic
Event) - Updated component ref types and removed deprecated addon configurations
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json / package-lock.json | Upgraded Storybook packages to v10.1.11, removed deprecated packages, added @storybook/addon-docs |
| .storybook/main.ts | Removed deprecated addon-essentials and autodocs config, added addon-docs |
| .storybook/preview.ts | Updated imports to use storybook/* paths, added tags: ["autodocs"] |
| .storybook/manager.ts | Updated imports to use storybook/manager-api and storybook/theming |
| .storybook/vscode-theme-addon/* | Converted to ES modules, updated imports for Storybook 10 |
| .storybook/tsconfig.json | Changed moduleResolution to "bundler" |
| src/stories/Overview.mdx | Removed deprecated @storybook/blocks imports, converted to plain MDX |
| src/stories/results/AlertTable.stories.tsx | Updated action import to storybook/actions |
| src/view components | Fixed event handler types from InputEvent/ChangeEvent to Event |
| src/view/common/DataGrid.tsx | Fixed ref types from HTMLElement to HTMLDivElement |
| src/view/model-editor/MethodRow.tsx | Fixed forwardRef types to HTMLDivElement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { | ||
| IconButton, | ||
| TooltipLinkList, |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import for components should use storybook/internal/components instead of @storybook/components to be consistent with Storybook 10's consolidated package structure. The PR description mentions this update was made in commit ef85f1d, but this file still imports from the old v8 path.
See below for a potential fix:
} from "storybook/internal/components";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit d7cfd8c. Updated the import to use storybook/internal/components.
| const handleChange = useCallback((e: ChangeEvent<HTMLSelectElement>) => { | ||
| const target = e.target as HTMLSelectElement; | ||
| const handleChange = useCallback((e: Event) => { | ||
| const target = e.target as HTMLInputElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these type changes (and others like it) really necessary? Aren't types like ChangeEvent<HTMLSelectElement> more accurate and still available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct - the more specific types are still available and more accurate. Reverted ModelTypeTextbox.tsx to use ChangeEvent<HTMLSelectElement> in commit d7cfd8c.
|
@copilot apply changes based on the comments in this thread |
- Updated ThemeSelector.tsx to use storybook/internal/components instead of deprecated @storybook/components - Reverted ModelTypeTextbox.tsx to use more specific ChangeEvent<HTMLSelectElement> type instead of generic Event type Addresses review comments from PR #4262 Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Applied both changes from the review:
Commit: d7cfd8c |


This PR upgrades Storybook from v8.6.14 to v10.1.11 and fixes all compatibility issues that arose from the breaking API changes in Storybook 9/10.
📸 Screenshot
Storybook 10 running successfully with the Overview page displaying correctly:
🔧 Changes Made
1. Dependabot Package Upgrade (Commit:
256e738)@storybook/addon-a11y: 8.6.14 → 10.1.11@storybook/addon-links: 8.6.14 → 10.1.11@storybook/icons: 1.4.0 → 2.0.1@storybook/react: 8.6.14 → 10.1.11@storybook/react-vite: 8.6.14 → 10.1.11storybook: 8.6.14 → 10.1.11@playwright/test: 1.50.1 → 1.57.0 (to match main branch)2. Updated Import Paths for Storybook 10 API (Commit:
b3527e8)Storybook 10 consolidated packages into the core
storybookpackage. Updated imports:@storybook/manager-api→storybook/manager-api@storybook/theming→storybook/theming@storybook/addon-actions→storybook/actionsstorybook/internal/typesforAddon_TypesEnumstorybook/internal/componentsfor UI componentsFiles updated:
.storybook/manager.ts.storybook/preview.ts.storybook/vscode-theme-addon/manager.tsx.storybook/vscode-theme-addon/ThemeSelector.tsxsrc/stories/results/AlertTable.stories.tsxsrc/stories/Overview.mdx3. Removed Deprecated Packages (Commit:
b3527e8)These packages are now part of core
storybook:@storybook/addon-actions@storybook/addon-essentials@storybook/addon-interactions@storybook/blocks@storybook/manager-api@storybook/themingUpdated
.storybook/main.tsto remove deprecated addons from the config.4. Migrated Autodocs Configuration (Commit:
b3527e8)docs.autodocsfrommain.tstags: ["autodocs"]topreview.ts(new Storybook 10 syntax)5. Updated TypeScript Module Resolution (Commit:
b3527e8)Changed
moduleResolutionfrom"node"to"bundler"in:.storybook/tsconfig.jsonsrc/stories/tsconfig.jsonThis is required for Storybook 10's ESM exports to work properly.
6. Fixed Storybook Build Issues (Commits:
b5cc230,def9366).storybook/vscode-theme-addon/preset.tsto ES modules7. Fixed TypeScript Type Errors (Commits:
703ad38,11c0150,a933209)ChangeEvent<HTMLSelectElement>) where applicable8. Fixed Overview.mdx Documentation Page (Commit:
e1bc98f)@storybook/addon-docs/blocks@storybook/addon-docs@10.1.11package9. Fixed Component Imports and Type Safety (Commit:
d7cfd8c)ThemeSelector.tsxto import UI components fromstorybook/internal/componentsinstead of deprecated@storybook/componentsModelTypeTextbox.tsxuses specificChangeEvent<HTMLSelectElement>type for better type safety📊 Results
🔄 Rebased
This PR has been rebased onto
mainto include the latest changes from the repository.Remember to update the changelog if there have been user-facing changes!
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.