react-modal
react-modal copied to clipboard
[change] deprecate getParentElement in favor of local element.
To keep things simple, each Modal can be placed on any level of the react's tree and it will do a proper clean up when it's time to unmount the component. Also, it make things simple enough to deal with overlapped modal.
It will use a local element, created by <Modal /> which will still be visible by
getting node property.
Changes proposed:
- Use a
divprovided by the instance of <Modal /> to setup things. - Each
<Modal />can perform its own clean up.
Upgrade Path (for changed or removed APIs):
- Remove
getParentElement.
Acceptance Checklist:
- [x] All commits have been squashed to one.
- [x] The commit message follows the guidelines in
CONTRIBUTING.md. - [x] Documentation (README.md) and examples have been updated as needed.
- [x] If this is a code change, a spec testing the functionality has been added.
- [x] If the commit message has [changed] or [removed], there is an upgrade path above.
Coverage decreased (-0.03%) to 84.923% when pulling efb09544650bb2337b12ab94d36b89779c990f4b on diasbruno:feature/deprecate-get-parent-element into f5d95e2cbcee1d3316952e15a4f2df3272ef9a81 on reactjs:master.
Coverage decreased (-0.03%) to 84.923% when pulling efb09544650bb2337b12ab94d36b89779c990f4b on diasbruno:feature/deprecate-get-parent-element into f5d95e2cbcee1d3316952e15a4f2df3272ef9a81 on reactjs:master.
Coverage decreased (-0.05%) to 85.511% when pulling 376c4e60d4ba3af3eceae0a3fc4c3c6d51ae993a on diasbruno:feature/deprecate-get-parent-element into 6f73764f853b095539c067cea45b7957d7a642aa on reactjs:master.
Coverage decreased (-0.05%) to 85.511% when pulling 376c4e60d4ba3af3eceae0a3fc4c3c6d51ae993a on diasbruno:feature/deprecate-get-parent-element into 6f73764f853b095539c067cea45b7957d7a642aa on reactjs:master.
Coverage increased (+0.08%) to 85.794% when pulling c5b148df6edcd7747c2d8085e8c39b855d0f9da9 on diasbruno:feature/deprecate-get-parent-element into b67ad54db13a0a4a55f2e8781db8af7e548498d0 on reactjs:master.
Coverage increased (+0.08%) to 85.794% when pulling c5b148df6edcd7747c2d8085e8c39b855d0f9da9 on diasbruno:feature/deprecate-get-parent-element into b67ad54db13a0a4a55f2e8781db8af7e548498d0 on reactjs:master.
Hi! Any plan to get this merged in the short term?
Hi @adrianq, I don't know, I believe it still needs some tests and It's also a breaking change, so I'm not sure.
If you have some time you can review this PR. :)