Skip to content

feat: [DSRN] Added SectionHeader#1175

Merged
brianacnguyen merged 9 commits into
mainfrom
dsrn/section-header
May 15, 2026
Merged

feat: [DSRN] Added SectionHeader#1175
brianacnguyen merged 9 commits into
mainfrom
dsrn/section-header

Conversation

@brianacnguyen

@brianacnguyen brianacnguyen commented May 15, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds SectionHeader to @metamask/design-system-react-native, a horizontal row for section titles with optional start/end icons or custom accessories and an optional title inline accessory (titleAccessory).

Figma Link: https://www.figma.com/design/1D6tnzXqWgnUC3spaAOELN/branch/i0yqn71LpKHyOdlQFBXJpe/%F0%9F%A6%8A-MMDS-Components?m=auto&node-id=12135-740&t=yxu0vfJ3yYix0gji-1

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-584

Manual testing steps

  1. From the repo root, install deps if needed, then run yarn workspace @metamask/design-system-react-native run test and confirm all tests pass (including SectionHeader).
  2. Run React Native Storybook (yarn storybook:ios or yarn storybook:android), open Components → SectionHeader, and verify Default (interactive title / icon controls) plus stories for StartIconName, EndIconName, TitleAccessory, StartAccessory, and EndAccessory render as expected on device.
  3. Optionally run yarn build:types (or your CI equivalent) after yarn workspace @metamask/design-system-shared run build if needed so SectionHeaderPropsShared resolves in dist typings for consumers.

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-05-14.at.22.01.01.mov

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
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

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.

Note

Low Risk
Low risk: this is a new, self-contained UI component with additive exports and scoped styling behavior, plus unit tests and Storybook coverage.

Overview
Adds a new SectionHeader component to @metamask/design-system-react-native that renders a horizontal header row with an optional title row, optional inline titleAccessory, and optional start/end icons (falling back to custom accessories) while forwarding outer ViewProps and supporting twClassName styling.

Introduces SectionHeaderPropsShared in @metamask/design-system-shared and wires up package exports, along with comprehensive README docs, Storybook stories, and unit tests covering rendering, prop precedence (icon vs accessory), and basic layout/style merging.

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

@brianacnguyen brianacnguyen self-assigned this May 15, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner May 15, 2026 05:38
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

Comment thread packages/design-system-react-native/src/components/SectionHeader/index.ts Outdated
Comment thread packages/design-system-react-native/CHANGELOG.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ccbb46a. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

amandaye0h
amandaye0h previously approved these changes May 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

kirillzyusko
kirillzyusko previously approved these changes May 15, 2026
@brianacnguyen brianacnguyen dismissed stale reviews from kirillzyusko and amandaye0h via 335bb84 May 15, 2026 17:55
@github-actions

Copy link
Copy Markdown
Contributor

📖 Storybook Preview

@brianacnguyen brianacnguyen merged commit 1a7b516 into main May 15, 2026
44 checks passed
@brianacnguyen brianacnguyen deleted the dsrn/section-header branch May 15, 2026 18:03
@brianacnguyen brianacnguyen mentioned this pull request May 20, 2026
18 tasks
georgewrmarshall pushed a commit that referenced this pull request May 20, 2026
## Release 41.0.0

This release adds mobile layout components (`TitleAlert`,
`SectionHeader`, `SectionDivider`), exports shared types for the new
cross-platform contracts, and updates the `Telegram` icon asset on web
and mobile. There are no breaking API changes.

### 📦 Package Versions

- `@metamask/design-system-shared`: **0.19.0**
- `@metamask/design-system-react`: **0.23.1**
- `@metamask/design-system-react-native`: **0.26.0**

### 🔄 Shared Type Updates (0.19.0)

#### Component Type Additions
([#1131](#1131),
[#1175](#1175))

**What Changed:**

- Exported `TitleAlertPropsShared` for alert-style title layouts
(severity, title row, optional description)
- Exported `SectionHeaderPropsShared` for section headings with optional
accessories and icon shortcuts
- Updated the shared `Telegram` icon asset to match the official
Telegram logo
([#1176](#1176))

**Impact:**

- Enables consistent `TitleAlert` and `SectionHeader` implementations
across React and React Native
- Continues ADR-0003/ADR-0004 const-object + string-union pattern
adoption
- Apps using `IconName.Telegram` on either platform get the updated
glyph without API changes

### 🌐 React Web Updates (0.23.1)

#### Changed

- Updated the `Telegram` icon asset to match the official Telegram logo
([#1176](#1176))

### 📱 React Native Updates (0.26.0)

#### Added

- Added `TitleAlert` for alert-style headings with a severity icon,
title row, and optional description in modals, bottom sheets, and other
compact surfaces
([#1131](#1131))
- Added `SectionHeader` for section titles with optional start and end
accessories, icon shortcuts, and an inline title accessory
([#1175](#1175))
- Added `SectionDivider` as a horizontal rule with a muted top border
and default vertical spacing for separating screen sections
([#1174](#1174))

#### Changed

- Updated the `Telegram` icon asset to match the official Telegram logo
([#1176](#1176))

### ⚠️ Breaking Changes

None in this release.

### ✅ Checklist

- [x] Changelogs updated with human-readable descriptions
- [x] Changelog validation passed (`yarn changelog:validate`)
- [x] Version bumps follow semantic versioning
- [x] design-system-shared: **minor** (0.18.0 → 0.19.0) — new shared
type exports + icon asset update
- [x] design-system-react: **patch** (0.23.0 → 0.23.1) — `Telegram` icon
asset update only
- [x] design-system-react-native: **minor** (0.25.0 → 0.26.0) — new
components + icon asset update
- [x] Breaking changes documented with migration guidance — N/A (no
breaking changes)
- [x] Migration guides updated with before/after examples — N/A (no
breaking changes)
- [x] PR references included in changelog entries

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs)
- [x] I've reviewed the [Release
Workflow](./.cursor/rules/release-workflow.md) cursor rule
- [x] All tests pass (`yarn build && yarn test && yarn lint`)
- [x] Changelog validation passes (`yarn changelog:validate`)

## **Pre-merge reviewer checklist**

- [ ] I've reviewed the [Reviewing Release
PRs](./docs/reviewing-release-prs.md) guide
- [ ] Package versions follow semantic versioning
- [ ] Changelog entries are consumer-facing (not commit message
regurgitation)
- [ ] Breaking changes are documented in MIGRATION.md with examples —
N/A
- [ ] All unreleased changes are accounted for in changelogs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants