enactjs / sandstone

The set of components for an Enact-based application targeting smart TVs
Apache License 2.0
22 stars 3 forks source link

WRR-6050: Fixed `IconItem` to restart marquee after done editing in `Scroller` with `editable` prop #1726

Closed MikyungKim closed 1 month ago

MikyungKim commented 1 month ago

Checklist

Issue Resolved / Feature Added

When there is long label inside IconItem in editable Scroller, after done editing the marquee stops and it will never start again.

Resolution

When completing edit, the DOM changes its order and it makes the marquee stops. I guess it's from engine but unfortunately, I coundn't find the specific logic or part. As far as I investigate, JS code has nothing to do with stopping maruee. To resolve this issue, I chose to let Marquee to invalidate its metrics to restart safely with invalidateProps of MarqueeDecorator. I've added order as invalidateProps and pass it to Marquee through IconItem in JSX so that let Marquee know when the editing is done. For the case where the editing ended without DOM change, I changed Spotlight.focus call added from https://github.com/enactjs/sandstone/pull/1550/files#diff-22d263c3907b8e109699fc727d876991ef576e0c70458dd2e6d59e014f7e426cR573-R574 conditionally to prevent stopping marquee.

Additional Considerations

Currently there is no sample to test the problem. So you should change qa-sampler/IconItem.js to have label based on the change I made.

Links

WRR-6050

Comments

Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com)

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.82%. Comparing base (620fe98) to head (26a4b3b). Report is 1 commits behind head on release/2.9.x.develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/2.9.x.develop #1726 +/- ## ========================================================= - Coverage 81.57% 80.82% -0.76% ========================================================= Files 148 148 Lines 6681 6685 +4 Branches 1990 1990 ========================================================= - Hits 5450 5403 -47 - Misses 938 973 +35 - Partials 293 309 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MikyungKim commented 1 month ago

We will revisit the dropped coverage issue later.