Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Blue - v0.0.61

Compare
Choose a tag to compare
@ItsJonQ ItsJonQ released this 29 Nov 22:34
· 2997 commits to main since this release

PortalWrapper: Fix integration with Route usage

screen recording 2017-11-29 at 03 10 pm

This commit resolves the issue where Route (react-router) mounted
components built with PortalWrapper (specifically Modals) don't
correctly close when the ESCAPE key is pressed.

This is due to react-router injecting the Modals in a non-linear
order. To resolve this, I've adjusted how PortalWrapper works with
it's GlobalManager. Instead of using IDs, it will use unique
incrementing index number values. This ensures that the latest
injected component, always has the highest index value. Therefore,
when triggere a close (with the escape key), the GlobalManager will
look for the highest index value and execute the close action it.

Unit tests were enhanced, but more importantly, acceptance tests
were added to test out these interactions, especially with
route changes/ESCAPE interactions.

Note: Storybook was updated to the latest versions in this update.

Resolves: #127