sandstone icon indicating copy to clipboard operation
sandstone copied to clipboard

WRO-478: POC for item reordering in VirtualList

Open 0x64 opened this issue 2 years ago • 3 comments

Checklist

  • [x] 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

POC for item reordering in VirtualList

Resolution

The former POC implementation of #1189 is totally refined.

  • Changed to wait for press-and-hold input to edit items' order
  • Changed to get a single object-typed editable prop rather than several individual props
  • Added a selected effect for a sample

Additional Considerations

There are so many bugs and missing behaviors.

  • Touch input is not supported yet.
  • UI could be broken when page up/down key is pressed during reordering.
  • UI could be broken or ugly when boundaries are changed.
  • It is unstable when various input devices are used simultaneously.
  • I cannot guarantee that it works great even with a single input device.
  • Performance optimization is required.

Links

WRO-478 (companion enactjs/enact#3076) WRN-17866 (#1189)

Comments

Enact-DCO-1.0-Signed-off-by: Seungcheon Baek ([email protected])

0x64 avatar Jul 26 '22 04:07 0x64

Codecov Report

Merging #1293 (b303945) into develop (904daf8) will increase coverage by 0.36%. The diff coverage is 15.38%.

@@             Coverage Diff             @@
##           develop    #1293      +/-   ##
===========================================
+ Coverage    53.74%   54.10%   +0.36%     
===========================================
  Files          137      137              
  Lines         6671     6818     +147     
  Branches      1967     2025      +58     
===========================================
+ Hits          3585     3689     +104     
- Misses        2400     2432      +32     
- Partials       686      697      +11     
Impacted Files Coverage Δ
VirtualList/VirtualList.js 73.33% <ø> (ø)
VirtualList/useThemeVirtualList.js 42.50% <ø> (ø)
VirtualList/useEvent.js 20.19% <13.15%> (-1.49%) :arrow_down:
useScroll/useScroll.js 73.33% <100.00%> (ø)
FixedPopupPanels/FixedPopupPanels.js 70.96% <0.00%> (-2.37%) :arrow_down:
PopupTabLayout/PopupTabLayout.js 48.00% <0.00%> (-0.72%) :arrow_down:
Input/Input.js 97.56% <0.00%> (+1.00%) :arrow_up:
Input/InputFieldSpotlightDecorator.js 83.87% <0.00%> (+6.02%) :arrow_up:

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 904daf8...b303945. Read the comment docs.

codecov[bot] avatar Jul 26 '22 04:07 codecov[bot]

@0x64 Would you check the Travis error?

seunghoh avatar Jul 27 '22 23:07 seunghoh

@0x64 Would you check the Travis error?

@seunghoh, Travis fails since the companion enact branch is not matched. I did not update travis.yml as I thought this branch would be simply a reference for a new feature that is not officially taken in yet. For maintainers, I will update travis.yml. :)

0x64 avatar Jul 28 '22 00:07 0x64