Skip to content

feat(dsr): add SectionHeader React parity (DSYS-751) - #1440

Draft
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/react-parity-from-mobile-7460
Draft

feat(dsr): add SectionHeader React parity (DSYS-751)#1440
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/react-parity-from-mobile-7460

Conversation

@cursor

@cursor cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Description

Adds React (@metamask/design-system-react) SectionHeader parity for epic DSYS-302 / DSYS-751, matching the existing React Native + shared SectionHeader consumer API.

Queue note: Content (DSYS-1043, PR #1436) and ListItem (DSYS-713, PR #1439) already have open draft PRs, so this run took the next priority-queue item (SectionHeader). Jira MCP could not be authenticated in this cloud environment (interactive OAuth unavailable), so the ticket was not auto-assigned/transitioned.

Implementation follows the flatter parity strategy: direct Box / Text / Icon (no React BoxRow). Interactive rows use role="button", onClick, Enter/Space activation, and active:opacity-70 (matching RN pressed opacity).

SectionHeader Audit & Insight Report

https://www.figma.com/board/V2fkXytJJjljIjLqG4sYT1/Section-Header-Audit---Insight-Report?node-id=0-1&t=cuG8k8eROPkPvLUc-1

Audit comparison (Phase 1)

Concern Extension / web API Mobile / RN (MMDS) API Decision
Component name / location Legacy ui/components/ui/section-header (label, className) — thin wrapper already importing DSR Box/Text. Not in component-library. MMDS SectionHeader with title, accessories, icons, children, isInteractive Keep MMDS SectionHeader name in DSR; Extension local wrapper is a differently shaped consumer
Prop names label only title, titleAccessory, startAccessory/endAccessory, startIconName/endIconName, children, isInteractive Unified to RN/shared API for the new React surface
Types / variants / sizes Body-sm alternative text styling TextVariant.HeadingMd + TextColor.TextDefault for string titles Match RN/shared heading styles
Interaction None (static) isInteractive + onPress + default ArrowRight end icon Web: isInteractive + onClick + role="button" + Enter/Space; keep platform event names
Styling className twClassName Platform layer only (className on React)
Internal helpers N/A RN uses BoxRow for rows Do not port BoxRow to React; use direct Box flex rows

Answers

  • Shared vs platform: Shared: title, titleAccessory, children, startAccessory/endAccessory, startIconName/endIconName. Platform: className/style, titleProps/titleWrapperProps/*IconProps, isInteractive, onClick (web) vs onPress (RN).
  • Naming conflicts: Extension label → MMDS title. No disabled vs isDisabled conflict; interactive disabled is platform HTML/Pressable.
  • Strategy: Unified for the new React API (align to RN/shared). Extension’s local SectionHeader remains a Phase 2 consumer migration (labeltitle, adopt richer props).
  • Mapping: React parity belongs under SectionHeader in DSR. Extension ui/components/ui/section-header is a thin namesake, not the MMDS API.

Known gaps (Phase 2)

  • Extension ui/components/ui/section-header still uses label + body-sm styling; migrate consumers to DSR SectionHeader separately.
  • isInteractive remains platform-discriminated (same as RN types today), not yet on SectionHeaderPropsShared.

Related issues

Fixes: DSYS-751 (parent epic DSYS-302)

Manual testing steps

  1. yarn storybook (port 6006).
  2. Open React Components / SectionHeader.
  3. Verify Default, StartIconName, EndIconName, accessories, Children, and IsInteractive stories.
  4. Confirm interactive story is keyboard-activatable (Enter/Space) and shows default ArrowRight end icon.

Screenshots/Recordings

Before

N/A — component did not exist in @metamask/design-system-react.

After

SectionHeader Default story
SectionHeader StartIconName story
SectionHeader EndIconName story
SectionHeader TitleAccessory story
SectionHeader Children story
SectionHeader IsInteractive story

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

To show artifacts inline, enable in settings.

Open in Web View Automation 

cursor Bot pushed a commit that referenced this pull request Aug 9, 2026
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 9, 2026

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)

@github-actions

github-actions Bot commented Aug 9, 2026

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)

@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)

@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)

@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)

and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

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.

@cursoragent remove all changes to this file revert it to the one from main branch

@cursor cursor Bot Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  • Reverted packages/design-system-react/CHANGELOG.md to match origin/main (restored “Unreleased” + 0.35.2 section and link refs).
  • Committed as: “chore(dsr): revert design-system-react CHANGELOG to match main”.
  • Pushed to cursor/react-parity-from-mobile-7460 and updated PR #1440.
Open in Web Open in Cursor 

@georgewrmarshall

Copy link
Copy Markdown
Contributor

@metamaskbot publish-preview

@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)

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/design-system-react": "0.35.1-preview.a9a176d8",
  "@metamask-previews/design-system-react-native": "0.39.0-preview.a9a176d8",
  "@metamask-previews/design-system-shared": "0.32.0-preview.a9a176d8",
  "@metamask-previews/design-system-tailwind-preset": "0.10.0-preview.a9a176d8",
  "@metamask-previews/design-system-twrnc-preset": "0.8.0-preview.a9a176d8",
  "@metamask-previews/design-tokens": "8.7.0-preview.a9a176d8"
}

cursoragent and others added 4 commits August 11, 2026 09:13
Bring design-system-react SectionHeader in line with the RN/shared
consumer API using a flatter Box/Text/Icon implementation (no BoxRow).

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Markdown pipe tables render as raw text in Storybook docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
…tionHeader

Interactive rows dim with opacity instead of using the hover and pressed
background tokens the other interactive React components use.

Co-authored-by: Cursor <cursoragent@cursor.com>
Design guidance specifies hover and pressed feedback at 0.8 opacity, not
background hover/pressed tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
@georgewrmarshall
georgewrmarshall force-pushed the cursor/react-parity-from-mobile-7460 branch from a9a176d to 7f3914e Compare August 11, 2026 16:14
@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.

2 participants