-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(interimElement): properly handle multiple interims. #9053
Conversation
|
||
// Note: This function might be called when the element already has been removed, | ||
// in which case we won't find any matches. | ||
if (filtered.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't filtered.length
is enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be. I will change it tomorrow.
Overall lgtm |
Dangerous changes. Must be manually validated (aka user testing) and needs more unit tests. |
* Adds support for multiple interim elements (like dialog) * When single interim (default) is enabled, then interims should hide properly (as in toasts). Fixes angular#8624. References angular#8630.
a693cdb
to
dd959a8
Compare
|
||
// This hide()s only the current interim element before showing the next, new one | ||
// NOTE: this is not reversible (e.g. interim elements are not stackable) | ||
var hideAction = options.multiple ? $q.when(true) : $q.all(showPromises); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use $q.resolve()
instead of $q.when(true)
Ping @ErinCoughlan for review. |
@ErinCoughlan @topherfangio - Ping again for review, want to push that PR a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual testing of the interim elements looks good to me.
* feat(interimElement): properly handle multiple interims. * Adds support for multiple interim elements (like dialog) * When single interim (default) is enabled, then interims should hide properly (as in toasts). Fixes angular#8624. References angular#8630. * When hiding wait for currenlty opening interims * Address EladBezalel's feedback * Wait for interim element for cancel as well * Address EladBezalel's feedback
Just adding a link to Keep support to "skipHide" with a deprecation warning #10438. |
When opening interim elements, by rapidly clicking on the open button as an example, the toasts / interims will overlap. But those shouldn't overlap. This is against the specs.
@ThomasBurleson Nothing really changed for the components. It just fixed the issue with overlapping and opens the door of having multiple interims (this was just included into that fix)
Fixes #8624. References #9166 References #8630.