Skip to content

feat: add Storybook component playground and prune covered Gallery demos#12465

Merged
originalix merged 27 commits into
xfrom
claude/implementation-plan-12dc01
Jul 20, 2026
Merged

feat: add Storybook component playground and prune covered Gallery demos#12465
originalix merged 27 commits into
xfrom
claude/implementation-plan-12dc01

Conversation

@franco-chan

Copy link
Copy Markdown
Collaborator

Summary

Adds a dedicated component workbench (apps/playground) with one shared CSF story set rendered by two shells, and removes the kit Gallery demo pages those stories now cover — so component demos have a single maintained surface going forward.

  • Web shell: Storybook 10.5 + Vite — yarn workspace @onekeyhq/playground sb:dev (port 6006).
  • On-device iOS shell: @storybook/react-native under apps/mobile/.rnstorybook, rendering the same stories inside the real app runtime.
  • Coverage: 77 components from @onekeyhq/components; 15 components intentionally excluded with reasons documented in apps/playground/README.md.
  • Gallery cleanup: 53 covered-component Gallery pages deleted (−10,317 lines); EGalleryRoutes pruned 119 → 66 with galleryScreenList registrations removed in pairs, keeping the dev URL allowlist consistent.

What Gallery keeps

Kit-level component pages (AccountAvatar, AddressInput, Token, …), dev/debug tool pages (LocalDB, Hardware, Logger, …), token/typography reference pages (Typography, ThemeColors, Font), and the Gallery pages for documented story exclusions (ImageCrop, RefreshControl, Shortcut, RichSizeableText).

Ripple fixes

  • NavigatorRoute big-list demo modal previously mounted the deleted Icon gallery page — replaced with a self-contained 500-row ListView so the virtualization-in-modal demo still works.
  • Gallery home now validates the persisted galleryLastRoute pin, since MMKV/localStorage may still hold a route that no longer exists.

Verification

  • yarn agent:check --profile commit passed on every commit; --profile pr passes on the final branch.
  • Web app runtime smoke at /dev/components: home lists exactly the kept pages, search filters correctly, kept pages open, deleted URLs (e.g. /dev/component-Button) fall through to Not Found, zero new console errors. The single component-Navigation not found dev log is pre-existing (enum member never had a registered screen) and intentionally untouched.
  • Every story batch was verified in both shells (web Storybook + on-device iOS); per-batch findings and platform caveats are recorded in apps/playground/README.md.

Notes for reviewers

  • Draft while x is release-frozen; ready for review once the freeze lifts.
  • No production code paths change: deletions are dev-only Gallery pages, and apps/playground is a standalone workspace that ships nowhere.

@socket-security

socket-security Bot commented Jul 13, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@franco-chan
franco-chan marked this pull request as ready for review July 20, 2026 03:11
Comment thread apps/mobile/index.ts Outdated
Comment thread packages/components/src/forms/Slider/Slider.stories.tsx
@originalix
originalix disabled auto-merge July 20, 2026 07:14
@originalix
originalix merged commit f4e02c3 into x Jul 20, 2026
16 checks passed
@originalix
originalix deleted the claude/implementation-plan-12dc01 branch July 20, 2026 07:14
franco-chan added a commit that referenced this pull request Jul 20, 2026
Resolve the Gallery conflicts from the Storybook playground PR (#12465),
which pruned Gallery demos for components now covered by CSF stories.

Keep the SetupStepItem Gallery page: it is a kit-level Onboarding v2
component, and the playground deliberately excludes @onekeyhq/kit imports,
so it cannot be hosted as a CSF story. This matches the 61 kit-level Gallery
routes x kept. Take x's deletions for every component it did move to stories.
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