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

fix: tab indicator sliding animation broken #273

Merged
merged 5 commits into from
Sep 24, 2018

Conversation

moog16
Copy link

@moog16 moog16 commented Sep 23, 2018

After the update to MDC Web 0.39.x, the tab indicator's default sliding animation stopped working. The cause was from removing the requestAnimationFrame from MDC Web code. Since the React component's classes were originally managed by setState, which is async, this didn't give the browser enough time to apply the classes. This ultimately broke the animation.

This fix is to use the DOM's classList, which is synchronous. This requires us to use a forceUpdate, which is not used in our codebase. But since this animation requires synchronous class management, we need to forceUpdate after adding/removing classes.

@codecov-io
Copy link

codecov-io commented Sep 23, 2018

Codecov Report

Merging #273 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
- Coverage   97.21%   97.21%   -0.01%     
==========================================
  Files          33       33              
  Lines        1258     1257       -1     
  Branches      120      122       +2     
==========================================
- Hits         1223     1222       -1     
  Misses         35       35
Impacted Files Coverage Δ
packages/tab-indicator/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 7863450...b36093c. Read the comment docs.

@moog16 moog16 merged commit c436f58 into master Sep 24, 2018
@moog16 moog16 deleted the fix/tab-indicator-no-sliding branch September 24, 2018 19:25
@moog16 moog16 mentioned this pull request Sep 25, 2018
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