Closed juwonjeong closed 4 months ago
Attention: Patch coverage is 61.53846%
with 5 lines
in your changes missing coverage. Please review.
Project coverage is 82.45%. Comparing base (
1e444a8
) to head (bbb71ff
).
Files | Patch % | Lines |
---|---|---|
packages/ui/Marquee/useMarqueeController.js | 57.14% | 2 Missing and 1 partial :warning: |
packages/ui/Marquee/MarqueeDecorator.js | 66.66% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Since the patch is implemented in cancelJob which is called with setTimeout, I cannot add unit test of it.
Let's add 'restart' function to MarqueeDecorator.js that simply calls 'restartAnimation' for consistent API sets. Looks great except this.
It's fixed :)
Checked codecov results and it looks okay.
Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
Checklist
Issue Resolved / Feature Added
When
Resolution
MarqueeDecorator.componentDidUpdate()
called when content changed. As children is changed,this.invalidateMetrics()
,this.cancelAnimation()
are called andforceRestartMarquee
variable set to true incomponentDidUpdate
function,this.tryStartingAnimation()
function is called becauseforceRestartMarquee
is true. However, IntryStartingAnimation()
, it returns without callingstartAnimation()
function becuasethis.timerState
is 1(=TimerState.START_PENDING).this.timerState
is set to 1 inMarqueeDecorator.start()
function which is called beforecomponentDidUpdate
.So I added
retryStartingAnimation
flag inMarqueeDecorator.cancelAnimation()
to check whether we need to restartAnimation after cancelJob completes.Additional Considerations
In additional, I think handleComplete in useMarqueeController needs to be fixed too. When
Links
WRQ-24303
Comments