Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ripple): Call layout on each activation #2567

Merged
merged 2 commits into from
Apr 16, 2018

Conversation

kfranqueiro
Copy link
Contributor

Call layoutInternal_ from within animateActivation_ so that layout doesn't need to be called on bounded ripples when the page resizes or the surface becomes visible.

Unbounded ripples still need to run layout logic in init and on resize, because they dynamically determine positioning/size for the hover/focus shade as well as the press ripple (whereas bounded ripples only dynamically determine positioning/size for the press ripple, which can be done upon activation).

This also enables us to remove code that invokes ripple layout logic in a few components that use bounded ripples, which I'll send separate PRs for.

Fixes #2207.

Kenneth G. Franqueiro added 2 commits April 16, 2018 11:07
@codecov-io
Copy link

codecov-io commented Apr 16, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2567      +/-   ##
==========================================
+ Coverage   98.76%   98.76%   +<.01%     
==========================================
  Files          98       98              
  Lines        4195     4198       +3     
  Branches      533      535       +2     
==========================================
+ Hits         4143     4146       +3     
  Misses         52       52
Impacted Files Coverage Δ
packages/mdc-ripple/foundation.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 1331fd7...0e341f4. Read the comment docs.

Copy link
Contributor

@williamernest williamernest left a comment

Choose a reason for hiding this comment

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

LGTM

@kfranqueiro kfranqueiro merged commit c6076e1 into master Apr 16, 2018
@kfranqueiro kfranqueiro deleted the feat/ripple-layout-on-activate branch April 24, 2018 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants