Conversation
📖 Storybook Preview |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
packages/design-system-react-native/src/components/KeyValuePair/KeyValuePair.stories.tsx
Outdated
Show resolved
Hide resolved
packages/design-system-react-native/src/components/KeyValuePair/KeyValuePair.tsx
Outdated
Show resolved
Hide resolved
📖 Storybook Preview |
📖 Storybook Preview |
packages/design-system-react-native/src/components/KeyValuePair/KeyValuePair.tsx
Outdated
Show resolved
Hide resolved
📖 Storybook Preview |
📖 Storybook Preview |
georgewrmarshall
left a comment
There was a problem hiding this comment.
The ADR-0003/0004 compliance is solid — shared types, const object, correct two-file export pattern, good test coverage. A few things need addressing before merge:
Missing MIGRATION.md — this is a large, breaking API change. The entire field/value object API has been replaced, and the following exports have been removed from the public API:
KeyValueRowStubs(sub-component stubs)KeyValueRowFieldIconSides,KeyValueRowSectionAlignments,TooltipSizes,IconSizes(const objects)KeyValueRowTooltip,KeyValueRowField,PreDefinedKeyValueRowLabel,KeyValueRowLabelProps,KeyValueRowRootProps,KeyValueSectionProps(types)
packages/design-system-react-native/MIGRATION.md needs a section showing the before/after API with realistic examples. The release that ships this will also need a coordinated effort to migrate all existing KeyValueRow usages in downstream consumers (extension, mobile) away from the old field/value object API — and any KeyValueColumn usages if applicable. This should be called out explicitly in the migration guide.
Inline comments cover the styling rule violation, stories convention gaps, and README template issues.
packages/design-system-react-native/src/components/KeyValueRow/KeyValueRow.tsx
Outdated
Show resolved
Hide resolved
packages/design-system-react-native/src/components/KeyValueRow/KeyValueRow.tsx
Outdated
Show resolved
Hide resolved
packages/design-system-react-native/src/components/KeyValueRow/KeyValueRow.stories.tsx
Show resolved
Hide resolved
packages/design-system-react-native/src/components/KeyValueRow/KeyValueRow.stories.tsx
Outdated
Show resolved
Hide resolved
packages/design-system-react-native/src/components/KeyValueRow/README.md
Outdated
Show resolved
Hide resolved
📖 Storybook Preview |
…o dsrn/keyvaluepair
📖 Storybook Preview |
📖 Storybook Preview |

Description
This PR refactors React Native
KeyValueRowto match the newer key/value pair API and shared typing (ADR-0003 / ADR-0004).Why
field/valueobjects (label config, tooltip, icon sides, etc.), which was heavier than what product patterns need and harder to align with shared cross-platform contracts.KeyValueRowRoot,KeyValueSection, andKeyValueLabel; the new layout composesBoxHorizontalandBoxinstead.What changed
@metamask/design-system-shared: addsKeyValueRowVariant(summary→ 40px /h-10,input→ 48px /h-12) andKeyValueRowPropsShared(keyLabel,value, start/end accessories, optionalvariant), and exports them from the package root.KeyValueRow(RN): flat props extending the shared shape plus RN-specificViewProps(minuschildren),twClassName,keyTextProps/valueTextProps, andkeyEndButtonIconProps/valueEndButtonIconProps(wheniconNameis set, aButtonIconis rendered and overrides the corresponding*EndAccessory).KeyValueRowStubs), tooltip-on-label behavior, and the old field/value icon-side model; internal filesKeyValueRowRootandKeyValueLabel(and the old section-based structure) are removed.twClassNamemerging.Breaking change
field/valueobjects tokeyLabel/valueand the new accessory /*ButtonIconPropsprops. There is no drop-in compatibility with the previous prop shape.Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-566
Manual testing steps
yarn storybook:iosoryarn storybook:android).yarn workspace @metamask/design-system-react-native run jest KeyValueRow(or your usual scoped Jest command).
Screenshots/Recordings
Add Storybook before/after or device screenshots if your process requires visual evidence.
Before
After
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-04-06.at.17.52.18.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
This is a breaking API change to a reusable UI component, removing the old
field/valueobject model (including tooltip/icon-side behavior) and changing exports/types, which can cause widespread downstream compile/runtime UI differences if not fully migrated.Overview
Refactors React Native
KeyValueRowto a new flat, shared-props API. The component now takeskeyLabel/value, optionalvariant(Summary/Input), and start/end accessories, with RN-specifickeyTextProps/valueTextPropsandkeyEndButtonIconProps/valueEndButtonIconProps(rendering aButtonIconthat overrides the corresponding end accessory).Removes the previous composable/stub API and related types/constants. Deletes
KeyValueRowStubs, section/root/label subcomponents, tooltip support, icon-side enums, and legacy type exports; adds a newKeyValueRowVariant+KeyValueRowPropsSharedin@metamask/design-system-sharedand re-exportsKeyValueRowVariantfrom the RN package.Updates Storybook stories, unit tests, and adds a
KeyValueRowREADME plus migration docs for0.14.0 → 0.15.0to guide downstream updates.Reviewed by Cursor Bugbot for commit f1ceb72. Bugbot is set up for automated code reviews on this repo. Configure here.