feat(dsr): add SectionHeader React parity (DSYS-751) - #1440
Conversation
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
There was a problem hiding this comment.
@cursoragent remove all changes to this file revert it to the one from main branch
There was a problem hiding this comment.
- Reverted
packages/design-system-react/CHANGELOG.mdto matchorigin/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-7460and updated PR #1440.
|
@metamaskbot publish-preview |
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
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>
a9a176d to
7f3914e
Compare
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|


Description
Adds React (
@metamask/design-system-react) SectionHeader parity for epic DSYS-302 / DSYS-751, matching the existing React Native + sharedSectionHeaderconsumer 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 ReactBoxRow). Interactive rows userole="button",onClick, Enter/Space activation, andactive: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)
ui/components/ui/section-header(label,className) — thin wrapper already importing DSRBox/Text. Not incomponent-library.SectionHeaderwithtitle, accessories, icons,children,isInteractiveSectionHeadername in DSR; Extension local wrapper is a differently shaped consumerlabelonlytitle,titleAccessory,startAccessory/endAccessory,startIconName/endIconName,children,isInteractiveTextVariant.HeadingMd+TextColor.TextDefaultfor string titlesisInteractive+onPress+ defaultArrowRightend iconisInteractive+onClick+role="button"+ Enter/Space; keep platform event namesclassNametwClassNameclassNameon React)BoxRowfor rowsBoxRowto React; use directBoxflex rowsAnswers
title,titleAccessory,children,startAccessory/endAccessory,startIconName/endIconName. Platform:className/style,titleProps/titleWrapperProps/*IconProps,isInteractive,onClick(web) vsonPress(RN).label→ MMDStitle. NodisabledvsisDisabledconflict; interactivedisabledis platform HTML/Pressable.SectionHeaderremains a Phase 2 consumer migration (label→title, adopt richer props).SectionHeaderin DSR. Extensionui/components/ui/section-headeris a thin namesake, not the MMDS API.Known gaps (Phase 2)
ui/components/ui/section-headerstill useslabel+ body-sm styling; migrate consumers to DSRSectionHeaderseparately.isInteractiveremains platform-discriminated (same as RN types today), not yet onSectionHeaderPropsShared.Related issues
Fixes: DSYS-751 (parent epic DSYS-302)
Manual testing steps
yarn storybook(port 6006).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
Pre-merge reviewer checklist
To show artifacts inline, enable in settings.