Skip to content

Conversation

@banana-claude
Copy link
Contributor

@banana-claude banana-claude bot commented Jan 18, 2026

Summary

  • Adds toast notification component using @react-aria/toast and @react-stately/toast
  • Supports three intents: default (purple border), success (green), error (red)
  • Global showToast() function for displaying toasts from any component
  • Stacking support for up to 5 visible toasts
  • Auto-dismiss with configurable timeout (default 5s)
  • Follows existing codebase patterns (CSS modules, design tokens)

Closes #42

Usage

import { showToast } from 'ui/base/toast';

showToast('Map uploaded');                    // default (purple border)
showToast('Upload complete', 'success');      // green background
showToast('Upload failed', 'error');          // red background
showToast('Processing...', 'default', 10000); // custom 10s duration

Test plan

  • Verify toasts appear at top-right of screen
  • Verify each intent displays correct colors
  • Verify toasts stack when multiple are shown
  • Verify close button dismisses toast
  • Verify auto-dismiss after timeout
  • Verify dark mode styling

Generated with Claude Code

@banana-claude banana-claude bot requested a review from bitnimble January 18, 2026 04:07
@vercel
Copy link

vercel bot commented Jan 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
paradb Ready Ready Preview, Comment Jan 18, 2026 10:55am

@bitnimble
Copy link
Owner

@intern use Toast from react-aria-components instead of the hook from react-aria and react-stately

@banana-claude
Copy link
Contributor Author

banana-claude bot commented Jan 18, 2026

Claude finished @bitnimble's task in 2m 41s —— View job


Refactoring Toast to use react-aria-components

  • Read current toast implementation
  • Refactor to use Toast from react-aria-components instead of hooks
  • Test the implementation compiles
  • Commit and push changes

Refactored to use UNSTABLE_ToastRegion, UNSTABLE_Toast, and UNSTABLE_ToastContent from react-aria-components instead of the useToast and useToastRegion hooks. The implementation is now cleaner and matches the patterns used by other components in the codebase.
· Branch

github-actions bot and others added 3 commits January 18, 2026 20:37
Uses @react-aria/toast and @react-stately/toast for accessible toast
notifications. Supports three intents (default, success, error), stacking
of multiple toasts, and auto-dismiss with configurable timeout.

Global showToast() function allows any component to display toasts
without prop drilling.

Co-authored-by: bitnimble <bitnimble@users.noreply.github.com>
Co-authored-by: bitnimble <bitnimble@users.noreply.github.com>
@bitnimble bitnimble force-pushed the claude/issue-42-20260118-0403 branch from 8275d63 to f1871da Compare January 18, 2026 10:52
@bitnimble bitnimble merged commit 1948845 into main Jan 18, 2026
1 check passed
@bitnimble bitnimble deleted the claude/issue-42-20260118-0403 branch January 18, 2026 10:53
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.

Add toast base component

1 participant