Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

feat(interimElement): properly handle multiple interims. #9053

Merged
merged 5 commits into from
Sep 21, 2016

Conversation

devversion
Copy link
Member

@devversion devversion commented Jul 16, 2016

  • Adds support for multiple interim elements (like dialog)
  • When single interim (default) is enabled, then interims should hide properly (as in toasts).

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.

See https://material.angularjs.org/HEAD/demo/toast

@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.

@devversion devversion added the needs: review This PR is waiting on review from the team label Jul 16, 2016
@ThomasBurleson ThomasBurleson added needs: manual testing This issue or PR needs to have some manual testing and verification done needs: unit tests This PR needs unit tests to cover the changes being proposed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Aug 22, 2016

// 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) {
Copy link
Member

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?

Copy link
Member Author

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.

@EladBezalel
Copy link
Member

Overall lgtm

@ThomasBurleson
Copy link
Contributor

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.
@devversion devversion force-pushed the feat/multiple-interims branch from a693cdb to dd959a8 Compare September 1, 2016 21:29
@devversion devversion removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs needs: unit tests This PR needs unit tests to cover the changes being proposed labels Sep 1, 2016

// 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);
Copy link
Member

@EladBezalel EladBezalel Sep 2, 2016

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)

@topherfangio
Copy link
Contributor

Ping @ErinCoughlan for review.

@devversion
Copy link
Member Author

@ErinCoughlan @topherfangio - Ping again for review, want to push that PR a bit.

Copy link
Contributor

@topherfangio topherfangio left a 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.

@devversion devversion removed the needs: manual testing This issue or PR needs to have some manual testing and verification done label Sep 15, 2016
@ThomasBurleson ThomasBurleson added needs: presubmit and removed needs: review This PR is waiting on review from the team labels Sep 15, 2016
@ThomasBurleson ThomasBurleson added this to the 1.1.2 milestone Sep 15, 2016
@jelbourn jelbourn merged commit 421fed4 into angular:master Sep 21, 2016
@devversion devversion deleted the feat/multiple-interims branch September 21, 2016 13:03
Frank3K pushed a commit to Frank3K/material that referenced this pull request Oct 8, 2016
* 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
@Liz4v
Copy link

Liz4v commented Aug 4, 2017

Just adding a link to Keep support to "skipHide" with a deprecation warning #10438.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

interimElement: finish animation of previous element
7 participants