fix: Merge Toast descriptionProps defaults in JSX - #1396
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
georgewrmarshall
approved these changes
Jul 21, 2026
amandaye0h
enabled auto-merge (squash)
July 21, 2026 16:43
Contributor
📖 Storybook LinksCompare the preview for this pull request with the latest Storybooks from the 🔀 Pull Request Preview
🌳 Main Branch (Latest)
|
georgewrmarshall
pushed a commit
that referenced
this pull request
Jul 22, 2026
<!-- Release PR Template Use this template for release PRs by creating your PR with: https://github.com/MetaMask/metamask-design-system/compare/main...release/VERSION?template=release.md Or use the default PR template and manually copy this structure. --> ## Release 55.0.0 React Native Toast moves to iOS-style top placement with spring motion, related offset/padding renames, and surface polish (theme background, description color, border radius). ### 📦 Package Versions - `@metamask/design-system-react-native`: **0.37.0** ### 📱 React Native Updates (0.37.0) #### Changed - **BREAKING:** Updated `Toast` / `Toaster` to slide in from the top of the screen (below the safe area) with spring-based enter/exit motion ([#1304](#1304)) - Renamed `bottomOffset` and `customTopOffset` to `topOffset` - Renamed exported `TOAST_BOTTOM_PADDING` to `TOAST_TOP_PADDING` (default padding 36 → 8) - Migration: [Toast topOffset renames](./packages/design-system-react-native/MIGRATION.md#toast-bottomoffset-to-topoffset) - Updated `Toast` surface styling for light/dark themes: light uses `background.default` with medium shadow; dark uses `background.section` with no shadow; border radius 12px → 16px; description defaults to `TextColor.TextAlternative` ([#1391](#1391)) #### Fixed - Fixed `Toast` `descriptionProps` so partial consumer props merge with the default `TextAlternative` color instead of replacing it ([#1396](#1396)) ###⚠️ Breaking Changes #### Toast top placement and offset renames (React Native Only) **What Changed:** - Toasts now appear from the **top** of the screen (below the safe area) instead of the bottom - `bottomOffset` / `customTopOffset` → `topOffset` - `TOAST_BOTTOM_PADDING` → `TOAST_TOP_PADDING` (default 36 → 8) **Migration:** ```tsx // Before (0.36.0) import { TOAST_BOTTOM_PADDING, toast, } from '@metamask/design-system-react-native'; toast({ hasNoTimeout: false, title: 'Saved', bottomOffset: 24, }); const padding = TOAST_BOTTOM_PADDING; // After (0.37.0) import { TOAST_TOP_PADDING, toast } from '@metamask/design-system-react-native'; toast({ hasNoTimeout: false, title: 'Saved', topOffset: 24, }); const padding = TOAST_TOP_PADDING; ``` **Impact:** - Call sites using `bottomOffset`, `customTopOffset`, or `TOAST_BOTTOM_PADDING` must rename and re-evaluate numeric offsets tuned for bottom placement See [React Native Migration Guide](./packages/design-system-react-native/MIGRATION.md#from-version-0360-to-0370) ### ✅ Checklist - [x] Changelogs updated with human-readable descriptions - [x] Changelog validation passed (`yarn changelog:validate`) - [x] Version bumps follow semantic versioning - [x] design-system-react-native: minor (0.36.0 → 0.37.0) - Toast top placement feature + breaking offset/padding renames - [x] Breaking changes documented with migration guidance - [x] Migration guides updated with before/after examples (if 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 - [ ] All unreleased changes are accounted for in changelogs --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #1391 (Toast polish: background, description color, border radius).
What issues does this PR address?
descriptionPropsdefaults replace instead of merge: In #1391, Toast defaulteddescriptionPropsin the destructure (descriptionProps = { color: TextColor.TextAlternative }). Passing any consumer object (e.g.{ numberOfLines: 2 }or{ testID: '...' }) replaced the whole default, soTextAlternativewas silently dropped.Key improvements
descriptionProps={{ color: TextColor.TextAlternative, ...descriptionProps }}, matching the team convention for props objects.descriptionPropsand asserts the default color is still applied.Notes for reviewers
descriptionPropsin JSX instead of defaulting in the destructure.Related issues
Follow-up to: #1391
Manual testing steps
yarn storybook:iosoryarn storybook:android) and navigate to Toast stories.descriptionProps={{ testID: '...' }}(ornumberOfLines) keeps the alternative color.Screenshots/Recordings
Before
N/A — behavior fix; visual default is unchanged when
descriptionPropsis omittedAfter
N/A — behavior fix; visual default is unchanged when
descriptionPropsis omittedPre-merge author checklist
Pre-merge reviewer checklist
Made with Cursor