Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: feat(Toast): use View Transition API for Toast animations #7631

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

reidbarber
Copy link
Member

TODO:

  • Debug RSP implementation
  • ARIA docs

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Jan 17, 2025

@rspbot
Copy link

rspbot commented Jan 17, 2025

## API Changes

@react-aria/focus

/@react-aria/focus:isFocusable

 isFocusable {
-  element: Element
+  element: HTMLElement
   returnVal: undefined
 }

@react-aria/test-utils

/@react-aria/test-utils:triggerLongPress

 triggerLongPress {
   opts: {
     element: HTMLElement
   advanceTimer: (number) => void | Promise<unknown>
-  pointerOpts?: Record<string, any>
+  pointerOpts?: {
+  
 }
+}
   returnVal: undefined
 }

@react-aria/utils

/@react-aria/utils:isFocusable

-isFocusable {
-  element: Element
-  returnVal: undefined
-}

/@react-aria/utils:isTabbable

-isTabbable {
-  element: Element
-  returnVal: undefined
-}

@react-spectrum/test-utils

/@react-spectrum/test-utils:triggerLongPress

 triggerLongPress {
   opts: {
     element: HTMLElement
   advanceTimer: (number) => void | Promise<unknown>
-  pointerOpts?: Record<string, any>
+  pointerOpts?: {
+  
 }
+}
   returnVal: undefined
 }

@react-stately/toast

/@react-stately/toast:ToastQueue

 ToastQueue <T> {
   add: (T, ToastOptions) => void
   close: (string) => void
   constructor: (ToastStateProps) => void
   pauseAll: () => void
-  remove: (string) => void
   resumeAll: () => void
   subscribe: (() => void) => void
   visibleToasts: Array<QueuedToast<T>>
 }

/@react-stately/toast:ToastState

 ToastState <T> {
   add: (T, ToastOptions) => string
   close: (string) => void
   pauseAll: () => void
-  remove: (string) => void
   resumeAll: () => void
   visibleToasts: Array<QueuedToast<T>>
 }

/@react-stately/toast:QueuedToast

 QueuedToast <T> {
-  animation?: 'entering' | 'queued' | 'exiting' | null
   content: T
   key: string
   onClose?: () => void
   priority?: number
   timer?: Timer
 }

/@react-stately/toast:ToastStateProps

 ToastStateProps {
-  hasExitAnimation?: boolean
   maxVisibleToasts?: number
 }

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