Skip to content

refactor: migrate from @storybook/addons to manager-api for Storybook 9 #1079

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

Merged
merged 4 commits into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .storybook/addons/expand-all/register.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { STORY_RENDERED } from "@storybook/core-events";
import { addons } from "@storybook/addons";
import { STORY_RENDERED, STORIES_EXPAND_ALL } from "@storybook/core-events";
import { addons } from "@storybook/manager-api";

let hasExpanded = false;

Expand All @@ -8,7 +8,7 @@ addons.register("expand-all", api => {

emitter.on(STORY_RENDERED, () => {
if (!hasExpanded) {
setTimeout(api.expandAll); // Calling on the next tick after storyRendered seems to work reliably.
setTimeout(() => api.emit(STORIES_EXPAND_ALL)); // Calling on the next tick after storyRendered seems to work reliably.
hasExpanded = true;
}
});
Expand Down
4 changes: 2 additions & 2 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addons } from "@storybook/addons";
import { create } from "@storybook/theming";
import { addons } from "storybook/manager-api";
import { create } from "storybook/theming";

const glideTheme = create({
base: "dark",
Expand Down
Loading