Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When we open a modal thanks to the modal
service
, a modal is created in the DOM with it associated backdrop, which is really nice to emphasis that whatever outside of the modal container is not clickable.But let's imagine that the first modal opens a second modal: the second modal appears directly on top of it, without any clear separation because we still have a single backdrop. See this video here that demonstrate it:
Before.multiple.backdrops.mp4
To improve how the overlapping modals are displayed to the user, this PR changes the way the backdrop is handled, and proposes to create as many backdrops as there are modals. that way, there is a backdrop separation between the first and the second modal, making it clear that the only interactive modal is the one on top:
After.multiple.backdrops.mp4
I am conscious of the fact that overlapping modals have to be avoided as much as possible, but sometimes you need it for things such as user approval for a sensitive action through MFA or similar: in that case you have to stop the current flow, wait for their approval and resume it.