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

WRO-8481: Fixed MarqueeDecorator to restart animation properly with React 18 #3075

Merged
merged 2 commits into from
Jul 25, 2022

Conversation

juwonjeong
Copy link
Contributor

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

When marquee applied to item related components, marquee cannot restart animation after completes its marquee once.

When marquee completes its marquee once, restartAnimation() func in marqueeDecorator called to set animating state to be false and then called start() func. As react batchs its state, animating state is true when start() executed and it caused animation to be stopped.

Resolution

Use flushSync in marqueeDecorator to synchronously update animating state to be false.

Additional Considerations

Links

WRO-8481

Comments

…ate when restarting animation

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #3075 (c9944b8) into develop (52dc872) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head c9944b8 differs from pull request most recent head 01e7700. Consider uploading reports for the commit 01e7700 to get more accurate results

@@             Coverage Diff             @@
##           develop    #3075      +/-   ##
===========================================
- Coverage    48.10%   48.10%   -0.01%     
===========================================
  Files          171      171              
  Lines         9716     9717       +1     
  Branches      2609     2609              
===========================================
  Hits          4674     4674              
- Misses        3955     3956       +1     
  Partials      1087     1087              
Impacted Files Coverage Δ
packages/ui/Marquee/MarqueeDecorator.js 69.23% <0.00%> (-0.24%) ⬇️

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 52dc872...01e7700. Read the comment docs.

Copy link
Contributor

@jeonghee27 jeonghee27 left a comment

Choose a reason for hiding this comment

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

LGTM except for changelog

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
@MikyungKim MikyungKim changed the title WRO-8481: Fixed marqueeDecorator to synchronously update animating state when restarting animation WRO-8481: Fixed MarqueeDecorator to restart animation properly with React 18 Jul 25, 2022
Copy link
Contributor

@MikyungKim MikyungKim left a comment

Choose a reason for hiding this comment

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

LGTM

@MikyungKim MikyungKim merged commit 700d63b into develop Jul 25, 2022
@MikyungKim MikyungKim deleted the feature/WRO-8481 branch July 25, 2022 07:31
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