enact icon indicating copy to clipboard operation
enact copied to clipboard

PLAT-97349: Support VirtualList to have Scroller as an item

Open 0x64 opened this issue 5 years ago • 2 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

When Scroller elements are items of VirtualList element, spotlight navigation by 5-way key does not work properly.

Resolution

  • Fixed native scrollable components (that catch scroll event to update its contents) to check which scrollable area is actually scrolled in nested cases.
  • Fixed lists to get data-index attribute value from a node inside of an item on keypress.
  • Fixed Scrollables to set data-index attribute value to its most outer node to be handled properly when it is an item of a list.
  • Added a prop for a container configuration to Scroller to support 'last-focused' rule.

Additional Considerations

A list moves spotlight simply to the next item, and the spotlight moves the first child of a scroller if the item is a scroller. Because a scroller's container is a spotlight container, this is expected behavior.

Links

PLAT-97349

Comments

0x64 avatar Dec 27 '19 05:12 0x64

Codecov Report

Merging #2663 (9477ce5) into develop (16e8f48) will decrease coverage by 0.10%. The diff coverage is 8.19%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2663      +/-   ##
===========================================
- Coverage    47.00%   46.89%   -0.11%     
===========================================
  Files          263      263              
  Lines        11584    11611      +27     
  Branches      2771     2776       +5     
===========================================
  Hits          5445     5445              
- Misses        4557     4579      +22     
- Partials      1582     1587       +5     
Impacted Files Coverage Δ
packages/moonstone/Scrollable/Scrollable.js 27.91% <ø> (ø)
packages/moonstone/Scrollable/ScrollableNative.js 5.32% <ø> (ø)
packages/ui/Scrollable/ScrollableNative.js 1.80% <0.00%> (-0.01%) :arrow_down:
packages/moonstone/VirtualList/VirtualListBase.js 29.44% <2.94%> (-2.31%) :arrow_down:
packages/ui/Scrollable/Scrollable.js 55.13% <14.28%> (-0.24%) :arrow_down:
packages/spotlight/src/container.js 87.19% <50.00%> (ø)
packages/moonstone/Scroller/Scroller.js 30.64% <100.00%> (+0.56%) :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 16e8f48...9477ce5. Read the comment docs.

codecov[bot] avatar Jan 06 '20 07:01 codecov[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 28 '21 08:10 CLAassistant