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

[change] deprecate getParentElement in favor of local element.

Open diasbruno opened this issue 8 years ago • 9 comments

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 div provided 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.

diasbruno avatar Jun 25 '17 03:06 diasbruno

Coverage Status

Coverage decreased (-0.03%) to 84.923% when pulling efb09544650bb2337b12ab94d36b89779c990f4b on diasbruno:feature/deprecate-get-parent-element into f5d95e2cbcee1d3316952e15a4f2df3272ef9a81 on reactjs:master.

coveralls avatar Jun 25 '17 05:06 coveralls

Coverage Status

Coverage decreased (-0.03%) to 84.923% when pulling efb09544650bb2337b12ab94d36b89779c990f4b on diasbruno:feature/deprecate-get-parent-element into f5d95e2cbcee1d3316952e15a4f2df3272ef9a81 on reactjs:master.

coveralls avatar Jun 25 '17 05:06 coveralls

Coverage Status

Coverage decreased (-0.05%) to 85.511% when pulling 376c4e60d4ba3af3eceae0a3fc4c3c6d51ae993a on diasbruno:feature/deprecate-get-parent-element into 6f73764f853b095539c067cea45b7957d7a642aa on reactjs:master.

coveralls avatar Jun 27 '17 16:06 coveralls

Coverage Status

Coverage decreased (-0.05%) to 85.511% when pulling 376c4e60d4ba3af3eceae0a3fc4c3c6d51ae993a on diasbruno:feature/deprecate-get-parent-element into 6f73764f853b095539c067cea45b7957d7a642aa on reactjs:master.

coveralls avatar Jun 27 '17 16:06 coveralls

Coverage Status

Coverage increased (+0.08%) to 85.794% when pulling c5b148df6edcd7747c2d8085e8c39b855d0f9da9 on diasbruno:feature/deprecate-get-parent-element into b67ad54db13a0a4a55f2e8781db8af7e548498d0 on reactjs:master.

coveralls avatar Jun 29 '17 00:06 coveralls

Coverage Status

Coverage increased (+0.08%) to 85.794% when pulling c5b148df6edcd7747c2d8085e8c39b855d0f9da9 on diasbruno:feature/deprecate-get-parent-element into b67ad54db13a0a4a55f2e8781db8af7e548498d0 on reactjs:master.

coveralls avatar Jun 29 '17 00:06 coveralls

Hi! Any plan to get this merged in the short term?

adrianq avatar Aug 17 '17 14:08 adrianq

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.

diasbruno avatar Aug 17 '17 14:08 diasbruno

If you have some time you can review this PR. :)

diasbruno avatar Aug 17 '17 14:08 diasbruno