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(Transition): schedule changes only on status change #4060

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Sep 8, 2020

Fixes #4059.


See the linked issue for more details. The check that we previously had was false positive on each component's render that may cause unexpected race conditions. It also wrongly cleared a setTimeout() timer which caused desynchronization issues between CSS and JS.

}

updateStatus = (prevState) => {
if (this.state.status !== this.state.nextStatus && this.state.nextStatus) {
Copy link
Member Author

@layershifter layershifter Sep 8, 2020

Choose a reason for hiding this comment

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

The previous check does not have sense as we should trigger a timer on status change

@github-actions
Copy link

github-actions bot commented Sep 8, 2020

size-limit report

Path Size
bundle-size/dist/Button.size.js 66.39 KB (0%)
bundle-size/dist/Icon.size.js 30.58 KB (0%)
bundle-size/dist/Image.size.js 61.63 KB (0%)
bundle-size/dist/Modal.size.js 76.65 KB (0%)
bundle-size/dist/Portal.size.js 47.78 KB (0%)

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2020

Codecov Report

Merging #4060 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4060   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files         183      183           
  Lines        3280     3280           
=======================================
  Hits         3275     3275           
  Misses          5        5           
Impacted Files Coverage Δ
src/modules/Transition/Transition.js 100.00% <100.00%> (ø)

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 859146f...a0967a1. Read the comment docs.

@layershifter
Copy link
Member Author

Released in semantic-ui-react@1.3.0 🚢

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

Successfully merging this pull request may close these issues.

Transition: rerender of a component resets setTimeout()
2 participants