Skip to content

feat(storybook-rn): add page template and perps example stories - #1408

Draft
georgewrmarshall wants to merge 4 commits into
mainfrom
feat/storybook-rn-page-templates
Draft

feat(storybook-rn): add page template and perps example stories#1408
georgewrmarshall wants to merge 4 commits into
mainfrom
feat/storybook-rn-page-templates

Conversation

@georgewrmarshall

@georgewrmarshall georgewrmarshall commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds four Storybook React Native example stories to apps/storybook-react-native/stories/ based on a full header/title pattern audit of MetaMask Mobile. These serve as copy-paste references for the ~150 screens being migrated to MMDS components.

Stories added

File Storybook path Key components
FullScreenList.stories.tsx Examples/Page Templates/Full Screen List HeaderStandard, ListItem, SectionHeader, SectionDivider
PerpsMarketList.stories.tsx Examples/Perps Market List ListItem, SegmentedControl, FilterButton, SectionHeader, SensitiveTextLength via valueProps
PerpsMarketStats.stories.tsx Examples/Perps Market Stats FilterButtonGroup, KeyValueColumn, Tag in SectionHeader title, BannerAlert
PerpsOrderForm.stories.tsx Examples/Perps Order Form HeaderSubpage, KeyValueRow.Input, KeyValueRow.Summary, SelectButton, BannerAlert

FullScreenList variants

  • Default (Settings)onBack + single endButtonIconProps (help), 3 sections, section dividers
  • Multi-action (Networks) — two endButtonIconProps (search + add), active network indicator
  • Root screenonClose only (no back), subtitle slot, modal-stack root pattern

Patterns demonstrated

  • descriptionProps / valueProps / subvalueProps for colour and isHidden masking (DSYS-936 / PR feat: Add isHidden support to RN Content, TitleHub, and KeyValueRow #1406) — no manual <SensitiveText> wrappers in string slots
  • includesTopInset on all HeaderStandard instances
  • KeyValueRow.Input vs KeyValueRow.Summary distinction
  • Tag as ReactNode inside SectionHeader title
  • FilterButtonGroup vs SegmentedControl use cases

Related issues

Jira: DSYS-937, DSYS-938

Test plan

  • yarn storybook:ios — open Examples/Page Templates/Full Screen List, confirm 3 variants render
  • Open Examples/Perps Market List — confirm gainers/losers toggle, position rows, watchlist add buttons
  • Open Examples/Perps Order Form — tap order type selector, confirm limit price row appears
  • Open Examples/Perps Market Stats — confirm category pills, 2×2 stat grids, low-liquidity banner
  • yarn lint passes (Prettier + ESLint)

Note

Low Risk
Changes are documentation-style stories and CI plumbing only; no production app or auth/data paths.

Overview
Adds four React Native Storybook example screens under Examples/ as migration references: Full Screen List (settings, multi-action header, root/close-only variants), Perps Market List, Perps Market Stats, and Perps Order Form. They demonstrate HeaderStandard / HeaderSubpage, list layouts, KeyValueRow input vs summary, filters, banners, and balance masking via list item props.

CI workflow tweaks in the same PR: drop redundant Node 24.x matrices where unused; always enable node_modules caching on prepare; run yarn test:scripts in a dedicated test-scripts job instead of each package test matrix job; stop checking out the repo for the DO-NOT-MERGE label job; let analyse-code run without waiting on check-workflows.

Reviewed by Cursor Bugbot for commit 17f7bdd. Bugbot is set up for automated code reviews on this repo. Configure here.

- Remove single-value node-version matrices from lint-build-test and
  chromatic workflows; they added matrix scheduling overhead for zero
  parallelism benefit. Set cache-node-modules to true unconditionally.
- Extract yarn test:scripts into its own one-shot job so it no longer
  runs once per workspace package in the test matrix.
- Remove action-checkout-and-setup from the label-check workflow; the
  github-script action receives the full PR payload via context and
  needs no local checkout.
- Run analyse-code in parallel with check-workflows instead of waiting
  for it to complete first; the security scanner has no dependency on
  workflow validation.
Adds four Storybook React Native example stories to
apps/storybook-react-native/stories/:

- FullScreenList — HeaderStandard + scrollable list (3 variants:
  Default/Settings, MultiAction/Networks, RootScreen/Notifications)
- PerpsMarketList — ListItem market rows, SegmentedControl top movers,
  SensitiveText privacy masking via valueProps/subvalueProps isHidden
- PerpsOrderForm — HeaderSubpage + KeyValueRow Input/Summary variants,
  BannerAlert service interruption, SelectButton order type
- PerpsMarketStats — FilterButtonGroup category pills, KeyValueColumn
  2x2 grid, Tag in SectionHeader title slot, BannerAlert low liquidity

All stories use descriptionProps/valueProps/subvalueProps for styling
(isHidden-capable after DSYS-936 / PR #1406) rather than manual
SensitiveText wrappers in string slots.

Jira: DSYS-937, DSYS-938
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Links

Compare the preview for this pull request with the latest Storybooks from the main branch.

🔀 Pull Request Preview

🌳 Main Branch (Latest)

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