Skip to content

feat: [DSRN] Add KeyValueColumn#1046

Open
brianacnguyen wants to merge 11 commits intomainfrom
dsrn/keyvaluecolumn
Open

feat: [DSRN] Add KeyValueColumn#1046
brianacnguyen wants to merge 11 commits intomainfrom
dsrn/keyvaluecolumn

Conversation

@brianacnguyen
Copy link
Copy Markdown
Contributor

@brianacnguyen brianacnguyen commented Apr 7, 2026

Description

This PR adds KeyValueColumn to @metamask/design-system-react-native: a key–value pattern with the label above the value (vertical stack via BoxVertical), each row laid out horizontally with BoxHorizontal.

Related issues

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

Manual testing steps

  1. From the repo root, run React Native Storybook (yarn storybook:ios or yarn storybook:android per your setup).
  2. Open Components → KeyValueColumn and confirm Default, accessory stories, button-icon stories, and layout stories (SingleColumnStack, TwoColumnGrid, Overflow) render as expected.
  3. Run package tests: yarn jest packages/design-system-react-native/src/components/KeyValueColumn/KeyValueColumn.test.tsx (or your usual Jest scope).

Screenshots/Recordings

If applicable, add screenshots and/or recordings to visualize the before and after of your change.

Before

N/A — new component.

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-04-06.at.16.41.05.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

Medium Risk
Moderate risk because this introduces a new exported UI component and shared prop types that become part of the public design-system API surface. Failures would be limited to UI rendering/interaction and Storybook/tests cover key behaviors.

Overview
Adds a new KeyValueColumn component to @metamask/design-system-react-native that renders a vertical key-over-value pair with optional start/end accessories on both rows, including optional ButtonIcon end-actions via keyEndButtonIconProps/valueEndButtonIconProps.

Exports the component from the RN components index, registers new Storybook stories, and adds Jest coverage for rendering, accessory precedence, truncation defaults, twClassName merging, and text prop overrides. Also introduces KeyValueColumnPropsShared in design-system-shared and documents usage/recommended layouts in a new README.

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

@brianacnguyen brianacnguyen self-assigned this Apr 7, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner April 7, 2026 03:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📖 Storybook Preview

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📖 Storybook Preview

Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

Clean implementation. Styling follows conventions, test coverage is solid, and the composite layout stories (SingleColumnStack, TwoColumnGrid, Overflow) are a great addition for communicating real-world usage patterns.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📖 Storybook Preview

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📖 Storybook Preview

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📖 Storybook Preview

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📖 Storybook Preview

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.

3 participants