Repository navigation
chore: upgrade storybook to 10.6 and remove legacy-peer-deps - #343
Merged
Merged
Conversation
A value re-export of types leaves an import of nothing in per-file compilers: webpack warned that './types' has no such exports.
Storybook 7 peers React 18 at most, while the repository develops on React 19. - the webpack5 builder no longer compiles TypeScript itself: add the babel compiler addon and declare the babel presets .babelrc.json uses (they came with storybook 7) - manager code moves to @storybook/manager-api; Story type -> StoryFn - remove the abandoned @storybook/addon-knobs (unused) and @storybook/cli - declare @types/react-transition-group, which also came with storybook 7
With storybook 8 the dependency tree is valid: a strict npm ci passes and npm ls is clean.
It is an optional peer of @storybook/react; storybook builds and starts without it.
Contributor
|
Preview is ready. |
- essentials, viewport, manager-api and theming are part of the storybook package now: the separate packages are removed and the imports point to storybook/* - the theme addon is registered from manager.ts; as a main.ts addon it was loaded as a preset - preview: initialGlobals and viewport.options replace the deprecated forms; the unused jsx parameter is removed - features.backgrounds: false keeps the backgrounds tool off, as before - the brand title is one block again: the brand container became a flex row
The lockfile held react-draggable 4.4.6, while applications get 4.7.2 through react-grid-layout. 4.7 requests an animation frame on unmount, and the unmount test counted it as a timer of dashkit. The test no longer fakes animation frames; it still fails when the settled width commit is not cancelled.
korvin89
marked this pull request as ready for review
November 12, 2026 12:40
korvin89
requested review from
Marginy605,
daniil-filippov-dev,
mournfulCoroner and
roberthovsepyan
as code owners
November 12, 2026 12:40
Storybook 10 has no sb binary: npx sb build would download a separate package instead of using the installed CLI. Addresses: 4550777224
daniil-filippov-dev
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades Storybook 7.6 to 10.6 on
release/v11and removeslegacy-peer-deps=truefrom.npmrc.Storybook 7 accepted React 18 at most, while the repository develops on React 19, so
npm cineeded the flag. With Storybook 10 a strictnpm cipasses. The lockfile also movesreact-draggableto 4.7.2, the version applications already get.Details
Storybook
^10.6.7:storybook,@storybook/react,@storybook/react-webpack5. Storybook 10 needs Node 20.19 or 22.12 and later;.nvmrcis 22.@storybook/addon-essentials: controls, actions, viewport and the toolbars are part ofstorybooknow;@storybook/addon-knobs(abandoned at 7.0.2, not used);@storybook/cli(storybookprovides the CLI). Thebuild-storybookscript callsstorybook build.main-preview.ymlruns that script instead ofnpx sb build: Storybook 10 has nosbbinary.@storybook/addon-webpack5-compiler-babelis added; it uses the existing.babelrc.json.@babel/preset-env,@babel/preset-react,@babel/preset-typescript(used by.babelrc.json);@types/react-transition-group(typecheck ofActionPanelfailed without it).storybook/manager-api,storybook/theming,storybook/viewport;manager.ts: listed as an addon inmain.ts, Storybook 10 loads it as a preset and fails on its JSX;main.tsdropsfastRefreshanddocs.autodocs: false(autodocs is on only for stories with theautodocstag, and there are none), and setsfeatures.backgrounds: falseto keep the backgrounds tool off, as before;preview.tsxusesinitialGlobalsandviewport.optionsinstead of the deprecated forms; the unusedjsxparameter is removed;theme.tsis wrapped in one block: the brand container became a flex row, and the two lines stood side by side;Story→StoryFninDashKit.stories.tsx.src/plugins/Title/index.ts:export type {PluginTitleSize, TitleFontParams}. Both are types; webpack warned that./typeshas no such exports. The emitted JavaScript is the same.react-draggable 4.7 and the React 18 job
The
Tests (React 18)job runsnpm install --no-save react@^18 …. Without the flag this install re-resolves the tree and takesreact-draggable4.7.2 instead of the locked 4.4.6, and the testpassive-resize › cancels settled width commit on unmountfailed with it (on React 19 as well):body;Applications already get 4.7.2, because
react-grid-layoutasks forreact-draggable ^4.4.5. So:react-draggableto 4.7.2, to test what applications run;requestAnimationFrame, so it counts only timers. It still fails when the cancellation of the settled width commit is removed fromcomponentWillUnmount.