Skip to content

refactor: update Storybook configuration, and enhance documentation#16

Merged
AFOJ merged 4 commits into
mainfrom
spike/improve-storybook
Jul 18, 2026
Merged

refactor: update Storybook configuration, and enhance documentation#16
AFOJ merged 4 commits into
mainfrom
spike/improve-storybook

Conversation

@AFOJ

@AFOJ AFOJ commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary by Sourcery

Update Storybook configuration and theming to better showcase the Flux Design System and provide an introductory documentation page.

New Features:

  • Add an Introduction MDX page to Storybook describing the Flux Design System, components, themes, and linking to the GitHub repository.

Enhancements:

  • Configure Storybook to load static assets from the public directory and include MDX stories.
  • Customize Storybook’s manager UI theme with Flux branding, colors, typography, and sidebar root display.
  • Adjust Storybook sidebar item styling and alignment via a custom manager head style block.
  • Set a custom favicon and brand logo for the Storybook instance.
  • Retitle existing Card and LoginDrawer stories to appear under a Showcase section in the Storybook sidebar.

@AFOJ AFOJ self-assigned this Jul 18, 2026
@sourcery-ai

sourcery-ai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Refines Storybook’s configuration and UI theming, introduces an introductory docs page, reorganizes story hierarchy, and adds brand assets (favicon and logo) for the Flux Design System.

File-Level Changes

Change Details Files
Enhance Storybook configuration to support static assets, MDX docs, and custom sidebar styling.
  • Add public directory as a static asset source for Storybook.
  • Extend stories glob to include MDX documentation files alongside TS/JS stories.
  • Inject custom CSS into the Storybook manager head to hide sidebar item icons and better align sidebar item content.
.storybook/main.ts
Rebrand and reorganize component stories under a new Showcase section.
  • Update Card story title to appear under the Showcase/Card path.
  • Update Login Drawer story title to appear under the Showcase/Login Drawer path.
src/components/card/Card.stories.tsx
src/components/login-drawer/LoginDrawer.stories.tsx
Introduce a top-level Introduction MDX docs page for the Flux Design System.
  • Create an Introduction page that explains the Flux Design System, components, themes, and links to the GitHub repository.
src/stories/Introduction.mdx
Configure Storybook manager theming and branding for Flux.
  • Set a custom light theme including colors, typography, and layout for the Storybook UI.
  • Configure Flux branding (title and logo) and enable root-level sidebar grouping in the manager configuration.
.storybook/manager.ts
Add public-facing branded assets for Storybook and the app shell.
  • Add a custom favicon and configure Storybook preview head to use it.
  • Add a Flux logo SVG used as the Storybook brand image.
.storybook/preview-head.html
public/favicon.svg
public/flux.svg

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The Introduction.mdx file is importing Meta from @storybook/addon-docs/blocks, which is deprecated in newer Storybook versions; consider switching to @storybook/blocks to align with the current API.
  • The custom sidebar CSS injected via managerHead in .storybook/main.ts could be harder to maintain as a string; consider moving this styling into a dedicated manager-head.html or CSS file so it can be edited and validated more easily.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `Introduction.mdx` file is importing `Meta` from `@storybook/addon-docs/blocks`, which is deprecated in newer Storybook versions; consider switching to `@storybook/blocks` to align with the current API.
- The custom sidebar CSS injected via `managerHead` in `.storybook/main.ts` could be harder to maintain as a string; consider moving this styling into a dedicated `manager-head.html` or CSS file so it can be edited and validated more easily.

## Individual Comments

### Comment 1
<location path=".storybook/manager.ts" line_range="7" />
<code_context>
+addons.setConfig({
+  theme: create({
+    base: 'light',
+    brandImage: './flux.svg',
+    brandTitle: 'Flux Design System',
+    brandTarget: '_self',
</code_context>
<issue_to_address>
**issue (bug_risk):** Use an absolute path for `brandImage` to align with `staticDirs` configuration.

Because `staticDirs` serves `public` from the root, `flux.svg` will be exposed as `/flux.svg`. A relative path like `'./flux.svg'` may not resolve correctly in the manager UI, so using `brandImage: '/flux.svg'` will be more reliable.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .storybook/manager.ts Outdated
@AFOJ
AFOJ merged commit 6db0b71 into main Jul 18, 2026
3 checks passed
@AFOJ
AFOJ deleted the spike/improve-storybook branch July 18, 2026 01:39
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.

1 participant