Fix issue with popovers not working in embedded app modals when put inside of a details component
Enable popover display state to be updated based on the parent's resize event.
https://github.com/user-attachments/assets/7702a0bc-88ef-4e01-8043-1239562c609c
WHY are these changes introduced?
Fixes https://github.com/Shopify/polaris/pull/12445#issuecomment-2275760015
WHAT is this pull request doing?
Attach the resize observer to the parent element of the activator when available instead of the activator itself.
How to 🎩
🖥 Local development instructions 🗒 General tophatting guidelines 📄 Changelog guidelines
🎩 checklist
- [ ] Tested a snapshot
- [ ] Tested on mobile
- [ ] Tested on multiple browsers
- [ ] Tested for accessibility
- [ ] Updated the component's
README.mdwith documentation changes - [ ] Tophatted documentation changes in the style guide
/snapit
🫰✨ Thanks @vividviolet! Your snapshot has been published to npm.
Test the snapshot by updating your package.json with the newly published version:
"@shopify/polaris": "0.0.0-snapshot-20240810023129"
Thanks for working on that :). However it does not seem to work if the popover is nested in a div inside the details.
Hi! We noticed there hasn’t been activity on this PR in a while. After 30 days, it will close automatically.
If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.