motion icon indicating copy to clipboard operation
motion copied to clipboard

Add support for AnimatePresence when using shadow DOM

Open tehbelinda opened this issue 1 year ago • 6 comments

By default this was using document.head, but that is not always available to where it's rendered, e.g. when using the shadow DOM. In such cases, this change allows for the shadow root to be passed to the new parentDOM prop. This change is backwards compatible since we default to document.head when not specified.

Fixes https://github.com/framer/motion/issues/2508

tehbelinda avatar Oct 11 '24 22:10 tehbelinda

Hey @mattgperry, do you know what the process is to get this change merged?

dylank avatar Oct 24 '24 16:10 dylank

hi @mattgperry the pipeline is passing and I just updated the latest conflicts on the CHANGELOG, let me know if you are able to review and approve this or is there someone else I should ping? thanks!

tehbelinda avatar Nov 01 '24 16:11 tehbelinda

@kurtextrem is this something you can help with?

dylank avatar Nov 11 '24 23:11 dylank

@SaeWooKKang @mattgperry this is a blocker for me would be huge to get this merged 🙏

connormdavis avatar Nov 12 '24 00:11 connormdavis

Hey! I had a brief look, it looks good to me. I've forwarded the PR.

kurtextrem avatar Dec 02 '24 11:12 kurtextrem

Thanks for taking a look @mattgperry ! I've added the tests as requested and updated the prop to root

btw as an alternative to enabling the experimental flag to test the shadow dom in cypress, I did try upgrading cypress to 5.2.0 where the behaviour is enabled by default. The tests still passed, but I was wary of mixing the upgrading of a major version in with this in case there was something else I've missed

tehbelinda avatar Jan 08 '25 08:01 tehbelinda