feat: toast#892
Conversation
145afcf to
a5543c2
Compare
|
@kirillzyusko can you resolve the cursor comments? |
| export { TextOrChildren } from './temp-components/TextOrChildren'; | ||
| export type { TextOrChildrenProps } from './temp-components/TextOrChildren'; | ||
|
|
||
| export { Toast, ToastVariant, ToastContext } from './Toast'; |
There was a problem hiding this comment.
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.
| "./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"), |
There was a problem hiding this comment.
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.
## 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>


Description
Adopted
Toastcomponent.Related issues
Fixes: 🤷♂️
Manual testing steps
Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-10.at.17.59.11.mov
Pre-merge author checklist
Pre-merge reviewer checklist
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
Toastcomponent todesign-system-react-native, including a context wrapper + imperativeshowToast/closeToastAPI, 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.