Skip to content

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

Draft
franco-chan wants to merge 24 commits into
xfrom
claude/implementation-plan-12dc01
Draft

feat: add Storybook component playground and prune covered Gallery demos#12465
franco-chan wants to merge 24 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

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