Skip to content

feat(toaster): add Toaster organism with ToasterApi controller - #27

Closed
eumaninho54 wants to merge 33 commits into
mainfrom
feat/organisms-toaster
Closed

feat(toaster): add Toaster organism with ToasterApi controller#27
eumaninho54 wants to merge 33 commits into
mainfrom
feat/organisms-toaster

Conversation

@eumaninho54

Copy link
Copy Markdown
Member

Summary

  • Add Toaster Organism following the same architecture as BottomModal (static controller, ViewModel hook, Reanimated animation)
  • ToasterApi.show({ type, title, description?, duration? }) and ToasterApi.hide() for imperative usage
  • 4 types: success, error, warning, info — each with mapped color and Lucide icon
  • Slide-in from bottom + fade animation via Reanimated (useReanimatedStyles)
  • Auto-dismiss with configurable duration (default DEFAULT_TOAST_DURATION_MS = 3000)
  • Absolute positioned at bottom of screen; pointerEvents gated by visibility

Changes

  • src/components/Organisms/Toaster/ — full component with types, hooks, controller, constants, styles
  • src/components/Organisms/index.ts — added export * from './Toaster'
  • __mocks__/react-native-reanimated.ts — added interpolate mock
  • example/.rnstorybook/stories/Organisms/Toaster/ — Default (4 types) + Interactive stories

Test plan

  • yarn test --testPathPattern="Toaster" — 20 tests, 3 suites, all passing
  • Mount <Toaster /> at app root and call ToasterApi.show({ type: 'success', title: 'Saved!' })
  • Verify auto-dismiss after 3s
  • Verify custom duration is honored
  • Verify ToasterApi.hide() dismisses immediately
  • Verify all 4 types render correct color
  • Verify description is optional and renders correctly when provided
  • Verify exit animation plays (toast slides down + fades out)
  • Note: bottom offset does not account for iOS safe area home indicator — acceptable for v1

🤖 Generated with Claude Code

eumaninho54 and others added 30 commits May 2, 2026 22:21
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat(atoms): inline bold rendering with Geist semibold
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Button and all inputs updated from xs/md to lg (16px).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
eumaninho54 and others added 3 commits May 3, 2026 23:10
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

This PR has been closed automatically. Only release/vX.Y.Z branches may target main. Please retarget this PR to a release branch.

@github-actions github-actions Bot closed this May 4, 2026
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.

1 participant