react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Toast focus management take 2

Open snowystinger opened this issue 1 year ago โ€ข 21 comments

Closes

In association with https://github.com/adobe/react-spectrum/pull/6011

โœ… 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:

Test instructions in https://github.com/adobe/react-spectrum/pull/6011 description

๐Ÿงข Your Project:

snowystinger avatar Apr 17 '24 20:04 snowystinger

@snowystinger With recent changes, focus is getting lost to the document.body when the top toast, the last item in the list gets removed and other toasts remain.

majornista avatar May 09 '24 13:05 majornista

@snowystinger With recent changes, focus is getting lost to the document.body when the top toast, the last item in the list gets removed and other toasts remain.

thanks for the identification and fix, I've added a test case to cover the behavior

snowystinger avatar May 10 '24 02:05 snowystinger

Yeah, we should update the hooks docs, followup https://github.com/orgs/adobe/projects/19/views/4?pane=issue&itemId=65286699 Starting branch here: https://github.com/adobe/react-spectrum/pull/6468

snowystinger avatar May 30 '24 05:05 snowystinger

## API Changes

unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any', access: 'private' } unknown top level export { type: 'any', access: 'private' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'identifier', name: 'Column' } unknown top level export { type: 'identifier', name: 'Column' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown type { type: 'link' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' } unknown top level export { type: 'any' }

@react-aria/toast

ToastAria

 ToastAria {
   closeButtonProps: AriaButtonProps
+  contentProps: DOMAttributes
   descriptionProps: DOMAttributes
   titleProps: DOMAttributes
   toastProps: DOMAttributes
 }

it changed:

  • useToast

rspbot avatar May 30 '24 05:05 rspbot