Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Conversation

tranrate
Copy link
Contributor

@tranrate tranrate commented Apr 11, 2017

  • Refactor scss to include Animating class.
  • Modify foundation to use Animating class and transitionEnd event for opening and closing Dialog. Alter open close and destroy methods appropriately.
  • Move style="visibility:hidden" attribute into scss so that it is not required in html.

Closes #433

BREAKING CHANGE:

  • Dialogs do not require a style="visibility:hidden" attribute in html.
  • registerTransitionEndHandler, deregisterTransitionEndHandler, and isDialog methods must be implemented by the adapter

@codecov-io
Copy link

codecov-io commented Apr 11, 2017

Codecov Report

Merging #504 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #504      +/-   ##
==========================================
+ Coverage   99.91%   99.92%   +<.01%     
==========================================
  Files          59       59              
  Lines        2482     2502      +20     
  Branches      288      291       +3     
==========================================
+ Hits         2480     2500      +20     
  Misses          2        2
Impacted Files Coverage Δ
packages/mdc-dialog/constants.js 100% <ø> (ø) ⬆️
packages/mdc-dialog/foundation.js 100% <100%> (ø) ⬆️
packages/mdc-dialog/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5c6542...35c92bb. Read the comment docs.

@traviskaufman traviskaufman self-assigned this Apr 21, 2017
Copy link
Contributor

@amsheehan amsheehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks really good. A couple of quick notes, but that's it from me. Thanks for the great work!

I think the only thing remaining is to update the demo to remove the style="visibility: hidden" attribute from the dialog elements. 😛

After that, LGTM 🤙

@@ -118,6 +128,18 @@ export default class MDCDialogFoundation extends MDCFoundation {
}
}

handleTransitionEnd_(ev) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultra-nit: We usually call this evt

width: 100%;
height: 100%;
visibility: hidden;
z-index: 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

z-index is set on line 54 as well. I believe this one is extraneous.

@@ -131,7 +133,6 @@ $mdc-dialog-dark-theme-bg-color: #303030 !default;
padding: 8px;
}

// TODO: Replace with breakpoint variable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would like to keep this comment in for now. // style comments are stripped out in the compiled CSS, so this only really exists for us in dev. These will all be removed once #23 lands.

@amsheehan amsheehan self-assigned this May 10, 2017
@tranrate
Copy link
Contributor Author

Hi @amsheehan

  1. Demo updated - conflicts with Revamp Demo/Catalog Revamp Demo/Catalog #594 resolved.
  2. Foundation.js line 131 - ev changed to evt.
  3. Mdc-dialog.scss line 134 - Comment added back in.
  4. Mdc-dialog.scss line 40 - z-index left as it is, the second one is for the opaque backdrop which has to be behind the dialog box but in front of the main screen. Used a relative index for the backdrop so that only the main one needs changing if anyone needs to adjust the z-index in the future.

Martin

@traviskaufman
Copy link
Contributor

@amsheehan could we get another review here?

Also note that in the commit message body we need to change BREAKING CHANGES: to BREAKING CHANGE:

Copy link
Contributor

@amsheehan amsheehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the commit message is changed to BREAKING CHANGE: this is good to merge.

@tranrate
Copy link
Contributor Author

@amsheehan

Commit message changed.

Martin

@tranrate tranrate changed the title Fix (Dialog) Closing Animations not running #433 Fix(Dialog): Closing Animations not running #433 May 20, 2017
@tranrate tranrate changed the title Fix(Dialog): Closing Animations not running #433 Fix(dialog): Closing Animations not running #433 May 20, 2017
@tranrate tranrate changed the title Fix(dialog): Closing Animations not running #433 fix(dialog): Closing Animations not running #433 May 20, 2017
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@amsheehan amsheehan merged commit 2b03c6b into material-components:master May 22, 2017
posva pushed a commit to posva/vue-mdc that referenced this pull request Jul 11, 2017
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.

Dialog Closing Animations not running
5 participants