Skip to content

Set up StrataKit in storybook and test-app - #1614

Merged
GerardasB merged 3 commits into
masterfrom
gerardas/setup-stratakit
Sep 8, 2026
Merged

GerardasB merged 3 commits into
masterfrom
gerardas/setup-stratakit

Conversation

@GerardasB

Copy link
Copy Markdown
Collaborator

Changes

Extracted from #1587

Applied initial setup to test-app and storybook.
Additionally, updated widget stories to use a single story to display available icon formats (which required to add render StrataKit icon with a fallback, when theme bridge is not enabled).

Testing

N/A

@GerardasB
GerardasB requested a review from a team as a code owner September 8, 2026 10:10
@GerardasB
GerardasB requested a lite review from Copilot September 8, 2026 10:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Storybook theme-bridge context provider is incorrect (so the bridge never enables for consumers) and the Vite assetsInlineLimit callbacks can return undefined, both of which can break the intended StrataKit integration behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR wires StrataKit into the Storybook environment and the test-app, including dependency updates, Storybook theme-bridge plumbing, and updated widget stories to showcase multiple icon formats (with a fallback when the theme bridge is disabled).

Changes:

  • Update workspace/catalog dependencies to use @stratakit/mui (and @mui/material) alongside updated StrataKit package versions.
  • Add Storybook theme-bridge addon structure (ThemeBridge, ThemeBridgeRoot, StrataKitIcon) and adjust preview wiring.
  • Consolidate widget icon stories into a single story that demonstrates available icon formats and deprecated icon specs.
File summaries
File Description
pnpm-workspace.yaml Updates catalog dependencies for StrataKit + MUI integration.
pnpm-lock.yaml Lockfile updates reflecting new/updated dependencies.
docs/storybook/tsconfig.json Adds StrataKit MUI type inclusion for Storybook TS compilation.
docs/storybook/src/widget/Widget.tsx Wraps widget story rendering with PreviewFeaturesProvider to toggle preview features.
docs/storybook/src/widget/Widget.stories.tsx Consolidates icon stories and adds a StrataKit icon fallback component usage.
docs/storybook/package.json Adds @mui/material and @stratakit/mui dependencies (removes bricks).
docs/storybook/.storybook/preview.ts Updates ThemeBridge addon import path.
docs/storybook/.storybook/main.ts Adds Vite build config to avoid inlining StrataKit SVG icons.
docs/storybook/.storybook/addons/theme-bridge/ThemeBridgeRoot.tsx Refactors root wrapper for theme bridge and StrataKit Root integration.
docs/storybook/.storybook/addons/theme-bridge/ThemeBridge.tsx Adds ThemeBridge decorator, toolbar global, and theme bridge context.
docs/storybook/.storybook/addons/theme-bridge/StrataKitIcon.tsx Adds a StrataKit icon renderer with fallback when theme bridge is disabled.
apps/test-app/vite.config.ts Adds Vite build config to avoid inlining StrataKit SVG icons.
apps/test-app/tsconfig.json Adds StrataKit MUI type inclusion for test-app TS compilation.
apps/test-app/src/routes/__root.tsx Switches to @stratakit/mui Root and adjusts ThemeBridge Root props.
apps/test-app/package.json Adds @mui/material, @stratakit/icons, and @stratakit/mui dependencies (removes bricks).
Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file

Suppressed comments (1)

docs/storybook/.storybook/addons/theme-bridge/ThemeBridgeRoot.tsx:16

  • ThemeBridgeContext is a React context, but it is being rendered as a component. This means the Provider is never applied and consumers will always see the default (false), so the StrataKit icon fallback will always be used even when theme bridge is enabled.
  • Files reviewed: 14/15 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread apps/test-app/vite.config.ts
Comment thread docs/storybook/.storybook/main.ts
Comment thread docs/storybook/.storybook/addons/theme-bridge/ThemeBridge.tsx
@GerardasB
GerardasB merged commit 13633bd into master Sep 8, 2026
18 of 19 checks passed
@GerardasB
GerardasB deleted the gerardas/setup-stratakit branch September 8, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants