Skip to content

fix(storybook): filter non-component icon exports - #2544

Merged
Astro-Han merged 1 commit into
apache:mainfrom
me2seeks:fix/2541-icon-story
Aug 9, 2026
Merged

fix(storybook): filter non-component icon exports#2544
Astro-Han merged 1 commit into
apache:mainfrom
me2seeks:fix/2541-icon-story

Conversation

@me2seeks

@me2seeks me2seeks commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

#2538 added ICON_SIZE to @maka/ui/icons, so that module is no longer component-only. The icon story still cast every namespace export to ElementType, and production Storybook tried to render the size object as a component.

This keeps the catalog self-updating, but filters the namespace to function and forwardRef component shapes before rendering it.

Tested with:

  • Desktop Storybook typecheck
  • production Storybook build
  • full Storybook smoke: 48 manifest checks and 101 catalog stories

Fixes #2541

中文对照

#2538@maka/ui/icons 中加入了 ICON_SIZE,因此这个模块不再只导出组件。图标 Story 仍把命名空间里的每个导出都强制当成 ElementType,导致生产 Storybook 把尺寸对象作为组件渲染。

本次修改保留图标目录的自动追踪,只在渲染前接收函数组件和 forwardRef 组件形态。

已验证 Desktop Storybook 类型检查、生产构建,以及完整 Storybook smoke(48 个 manifest 检查、101 个 catalog Story)。

@me2seeks

me2seeks commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

The Storybook failure is the existing Daily Review 480px bounds check; the icon catalog render passes on this run. #2546 carries the selector fix.

@me2seeks
me2seeks force-pushed the fix/2541-icon-story branch from ceae36b to b0a4c08 Compare August 9, 2026 02:56
@me2seeks

me2seeks commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto #2546. The icon catalog is green now; the remaining Storybook failures are both the Daily Review 480px bounds check.

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.

fix(storybook): ignore non-component exports in the icon catalog

2 participants