enact
enact copied to clipboard
PLAT-97349: Support VirtualList to have Scroller as an item
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
Scrollable
s to setdata-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
Codecov Report
Merging #2663 (9477ce5) into develop (16e8f48) will decrease coverage by
0.10%
. The diff coverage is8.19%
.
@@ 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.