Skip to content

feat: toast#892

Merged
kirillzyusko merged 8 commits into
MetaMask:mainfrom
kirillzyusko:feat/toast
Feb 20, 2026
Merged

feat: toast#892
kirillzyusko merged 8 commits into
MetaMask:mainfrom
kirillzyusko:feat/toast

Conversation

@kirillzyusko

@kirillzyusko kirillzyusko commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Adopted Toast component.

Related issues

Fixes: 🤷‍♂️

Manual testing steps

  1. Open StoryBook app
  2. Check Toast specs

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-10.at.17.59.11.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
New UI component with animation/timing and ref-based imperative API; risk is mainly around edge cases in rapid successive toasts and safe-area/layout behavior, but it’s well-covered by tests and isolated to the design system.

Overview
Adds a new Toast component to design-system-react-native, including a context wrapper + imperative showToast/closeToast API, slide-in/out animations (with optional auto-dismiss), and support for multiple variants (plain, account, network, app, icon) plus optional description/link/close actions.

Wires the component into exports, adds Storybook stories for interactive testing, and includes a comprehensive test suite and README documentation for integration/usage.

Written by Cursor Bugbot for commit 33b2706. This will update automatically on new commits. Configure here.

@kirillzyusko kirillzyusko marked this pull request as ready for review February 17, 2026 17:47
@kirillzyusko kirillzyusko requested a review from a team as a code owner February 17, 2026 17:47
Comment thread packages/design-system-react-native/src/components/Toast/Toast.tsx Outdated
Comment thread packages/design-system-react-native/src/components/Toast/Toast.tsx
Comment thread packages/design-system-react-native/src/components/Toast/Toast.tsx
@brianacnguyen

Copy link
Copy Markdown
Contributor

@kirillzyusko can you resolve the cursor comments?

@kirillzyusko kirillzyusko marked this pull request as draft February 19, 2026 18:34
@kirillzyusko kirillzyusko marked this pull request as ready for review February 19, 2026 19:56
@kirillzyusko kirillzyusko enabled auto-merge (squash) February 20, 2026 11:50
@kirillzyusko kirillzyusko merged commit 92a3f38 into MetaMask:main Feb 20, 2026
80 checks passed

@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 2 potential issues.

export { TextOrChildren } from './temp-components/TextOrChildren';
export type { TextOrChildrenProps } from './temp-components/TextOrChildren';

export { Toast, ToastVariant, ToastContext } from './Toast';

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.

ToastContextWrapper missing from package barrel export

High Severity

ToastContextWrapper is exported from Toast/index.ts but not re-exported from components/index.ts, which is the package's barrel file (re-exported via src/index.ts). The README documents importing ToastContextWrapper from @metamask/design-system-react-native and it's required as step 1 of the three-step Toast setup. Consumers importing from the main package path will get an import error, making the Toast feature unusable without a direct deep import.

Fix in Cursor Fix in Web

"./stories/WalletHome.stories.tsx": require("../stories/WalletHome.stories.tsx"),
"./../../packages/design-system-react-native/src/components/Toast/Toast.stories.tsx": require("../../../packages/design-system-react-native/src/components/Toast/Toast.stories.tsx"),
// "./stories/Backgrounds.stories.tsx": require("../stories/Backgrounds.stories.tsx"),
// "./stories/WalletHome.stories.tsx": require("../stories/WalletHome.stories.tsx"),

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.

Unrelated storybook stories accidentally commented out

Medium Severity

The Backgrounds.stories.tsx and WalletHome.stories.tsx requires are commented out. Both story files still exist in the repository and are fully functional. Since this PR is about adding the Toast component, disabling these unrelated stories appears accidental — likely leftover from local debugging. This removes two example stories from the Storybook app with no stated justification.

Fix in Cursor Fix in Web

georgewrmarshall added a commit that referenced this pull request Feb 20, 2026
## Summary

Reverts the failed Release 20.0.0 (#921) to redo it properly with
complete changelogs and correct yarn.lock.

## Context

Release 20.0.0 was merged to main but the publish workflow failed due to
a yarn.lock issue:
- **Failed workflow:**
https://github.com/MetaMask/metamask-design-system/actions/runs/22198282954
- **Root cause:** yarn.lock not updated when peer dependency changed

After the release was merged, 7 additional PRs were merged to main:
1. Label component (#907)
2. HeaderBase component (#902)
3. Skeleton (#891)
4. Card (#923)
5. BottomSheetFooter (#899)
6. Toast (#892)
7. Input component (#909)

## Why Revert?

To maintain clean version history and proper changelogs:
- Release 20.0.0 was never published to NPM (latest is 19.0.0)
- The 7 PRs merged after are not documented in Release 20.0.0 changelog
- Reverting allows us to create a proper Release 20.0.0 that includes
ALL changes

## Changes

This PR reverts commit `45004196` which:
- Restores package versions to pre-release state (8.1.1, 0.7.0, 0.6.0,
etc.)
- Restores root package.json version from 20.0.0 to 19.0.0
- Removes Release 20.0.0 changelog entries

## Next Steps

After this is merged:
1. Create new `release/20.0.0` branch using standard release process
2. Include all changes (original + 7 PRs) in changelogs
3. **Run `yarn install` to update yarn.lock**
4. Merge new Release 20.0.0 PR
5. Publish workflow will succeed with correct lockfile

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants