Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The following is a curated list of changes in the Enact limestone module, newest

### Changed

- `limestone/Scroller` focus area to be separated from the vertical and horizontal scrollbars when `focusableScrollbar` is `"byEnter"`
- `limestone/Button` styling to match the latest GUI
- `limestone/Card` styling to match the latest GUI
- `limestone/Checkbox` styling to match the latest GUI
Expand Down
15 changes: 15 additions & 0 deletions Scroller/Scroller.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@
opacity: 0;
}

&.hasVerticalScrollbar::before {
right: var(--scroll-scrollbar-size);
}

&.hasHorizontalScrollbar::before {
bottom: var(--scroll-scrollbar-size);
}

.enact-locale-rtl({
&.hasVerticalScrollbar::before {
right: 0;
left: var(--scroll-scrollbar-size);
}
});

.focus({
:global(.spotlight-input-key)& {
&::before {
Expand Down
8 changes: 8 additions & 0 deletions Scroller/useThemeScroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,14 @@ const useThemeScroller = (props, scrollContentProps, contentId, isHorizontalScro
const {calculatePositionOnFocus, focusOnNode, setContainerDisabled} = useSpottable(scrollContentProps, {scrollContainerRef, scrollContentHandle, scrollContentRef});
const {setNavigableFilter, ...focusableBodyProps} = (props.focusableScrollbar === 'byEnter') ? getFocusableBodyProps(scrollContainerRef, contentId, isScrollbarVisible) : {};

if (focusableBodyProps.className) {
focusableBodyProps.className = classNames(
focusableBodyProps.className,
isVerticalScrollbarVisible && css.hasVerticalScrollbar,
isHorizontalScrollbarVisible && css.hasHorizontalScrollbar
);
}

useLayoutEffect(() => {
// Initial filter setting
if (setNavigableFilter) {
Expand Down
6 changes: 6 additions & 0 deletions tests/screenshot/apps/components/Scroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ const ScrollerTests = [
...withConfig({focus: true}, [
<Scroller focusableScrollbar style={{height: '300px', width: '300px'}}><div style={{height: '600px', width: '600px'}}>Focused Two-way scroller</div></Scroller>,
<Scroller focusableScrollbar scrollbarTrackCss={css} style={{height: '300px', width: '300px'}}><div style={{height: '600px', width: '600px'}}>Focused Customized scrollbarTrack Style</div></Scroller>
]),

...withConfig({focus: true}, [
<Scroller focusableScrollbar="byEnter" style={{height: '300px', width: '300px'}}><div style={{height: '600px', width: '600px'}}>Focused Body (byEnter) Two-way scroller</div></Scroller>,
<Scroller focusableScrollbar="byEnter" verticalScrollbar="visible" style={{height: '300px', width: '300px'}}><div style={{height: '600px'}}>Focused Body (byEnter) Vertical scroller</div></Scroller>,
<Scroller focusableScrollbar="byEnter" horizontalScrollbar="visible" verticalScrollbar="hidden" style={{height: '300px', width: '300px'}}><div style={{height: '600px', width: '600px'}}>Focused Body (byEnter) Horizontal scroller</div></Scroller>
])
];
export default ScrollerTests;
Loading