Skip to content

Commit

Permalink
Merge branch 'develop' into feature/WRR-4833
Browse files Browse the repository at this point in the history
  • Loading branch information
juwonjeong committed Dec 5, 2024
2 parents 56bf2b2 + 3e51a0b commit efe5ac9
Show file tree
Hide file tree
Showing 28 changed files with 772 additions and 1,898 deletions.
50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ The following is a curated list of changes in the Enact sandstone module, newest

## [unreleased]

### Fixed

- `sandstone/Pageviews` `pageIndicatorPosition` prop to provide a way to determine where to place the page indicator
- `sandstone/Scroller` to focus properly when the spottable node is bigger than the size of viewport by voice control

## [3.0.0-alpha.3] - 2024-12-02

### Added

- `sandstone/Icon` supported icon list, adding new icons `ai`, `alert01`, and `alert02`
- `sandstone/PageViews` prop `autoFocus` to set whether focus element automatically or not
- `sandstone/Pageviews` `pageIndicatorPosition` prop to provide a way to determine where to place the page indicator
- `sandstone/PageViews.Page` and `sandstone/QuickGuidePanels.Panel` prop `aria-label`
- `sandstone/QuickGuidePanels` props `closeButtonAriaLabel` and `onClose`

Expand All @@ -23,6 +29,48 @@ The following is a curated list of changes in the Enact sandstone module, newest
- `sandstone/Scroller` with `editable` prop to move an item via 5-way keys properly in pointer mode
- `sandstone/Slider` to not show console error when dragging with touch

## [2.9.5] - 2024-11-19

### Added

- `sandstone/Icon` supported icon list, adding new icons `ai`, `alert01`, and `alert02`

### Fixed

- `sandstone/ContextualPopupDecorator` to update popup position properly when the screen orientation change
- `sandstone/Input` keypad layout when `type` prop is `number` or `passwordnumber` and the screen is in portrait mode or `popupType` prop is `overlay` and in large text mode
- `sandstone/Slider` to not show console error when dragging with touch

## [2.7.19] - 2024-11-15

### Fixed

- `sandstone/ContextualPopupDecorator` to update popup position properly when the screen orientation change
- `sandstone/Input` keypad layout when `type` prop is `number` or `passwordnumber` and the screen is in portrait mode or `popupType` prop is `overlay` and in large text mode

## [2.9.4] - 2024-10-29

### Fixed

- `sandstone/IconItem` to restart marquee after done editing in `sandstone/Scroller` with `editable` prop
- `sandstone/PageViews` and `sandstone/QuickGuidePanels` dot page indicators to be aligned center
- `sandstone/Scroller` to focus content area properly on supported platforms when `focusableScrollbar` prop is `byEnter`
- `sandstone/Scroller` with `editable` prop to move an item via 5-way keys properly in pointer mode

## [2.9.3] - 2024-10-15

### Added

- `sandstone/MediaControls` props `jumpBackwardAriaLabel` and `jumpForwardAriaLabel` to override aria-label of jumpButtons
- `sandstone/PageViews` prop `autoFocus` to set whether focus element automatically or not

### Fixed

- `sandstone/PageViews` to not clip the shadow of navigation buttons when `fullContents` prop is `true`
- `sandstone/Scroller` to focus the topmost element after scroll by voice control
- `sandstone/Scroller` to read out properly when `sandstone/Panels` has `sandstone/Scroller` with `focusableScrollbar`
- `sandstone/VideoPlayer` to show only the mini feedback when pressing play/pause key

## [3.0.0-alpha.2] - 2024-10-08

### Added
Expand Down
62 changes: 25 additions & 37 deletions TimePicker/TimePickerBase.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import kind from '@enact/core/kind';
import {Component, Fragment} from 'react';
import {Fragment, useEffect, useState} from 'react';
import PropTypes from 'prop-types';

import $L from '../internal/$L';
Expand Down Expand Up @@ -27,45 +27,33 @@ const hours12 = [
* @ui
* @private
*/
class HourPicker extends Component {
static propTypes = {
hasMeridiem: PropTypes.bool,
value: PropTypes.number
};

constructor (props) {
super(props);

this.state = {
noAnimation: false,
prevValue: props.value
};
}

static getDerivedStateFromProps (props, state) {
if (state.prevValue !== props.value) {
const hours = props.hasMeridiem ? hours12 : hours24;
const HourPicker = (props) => {
const {hasMeridiem, value, ...rest} = props;
const hours = hasMeridiem ? hours12 : hours24;

return {
noAnimation: hours[state.prevValue] === hours[props.value],
prevValue: props.value
};
}

return null;
}
const [noAnimation, setNoAnimation] = useState(false);
const [prevValue, setPrevValue] = useState(value);

render () {
const {hasMeridiem, ...rest} = this.props;
const hours = hasMeridiem ? hours12 : hours24;
useEffect(() => {
if (prevValue !== value) {
const hoursArray = hasMeridiem ? hours12 : hours24;

return (
<DateComponentPicker {...rest} noAnimation={this.state.noAnimation}>
{hours}
</DateComponentPicker>
);
}
}
setNoAnimation(hoursArray[prevValue] === hoursArray[value]);
setPrevValue(value);
}
}, [hasMeridiem, prevValue, value]);

return (
<DateComponentPicker {...rest} noAnimation={noAnimation} value={value}>
{hours}
</DateComponentPicker>
);
};

HourPicker.propTypes = {
hasMeridiem: PropTypes.bool,
value: PropTypes.number
};

/**
* {@link sandstone/TimePicker.TimePickerBase} is the stateless functional time picker
Expand Down
94 changes: 47 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enact/sandstone",
"version": "3.0.0-alpha.2",
"version": "3.0.0-alpha.3",
"description": "Large-screen/TV support library for Enact, containing a variety of UI components.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -42,11 +42,11 @@
"extends": "enact-proxy/strict"
},
"dependencies": {
"@enact/core": "^5.0.0-alpha.2",
"@enact/i18n": "^5.0.0-alpha.2",
"@enact/spotlight": "^5.0.0-alpha.2",
"@enact/ui": "^5.0.0-alpha.2",
"@enact/webos": "^5.0.0-alpha.2",
"@enact/core": "^5.0.0-alpha.3",
"@enact/i18n": "^5.0.0-alpha.3",
"@enact/spotlight": "^5.0.0-alpha.3",
"@enact/ui": "^5.0.0-alpha.3",
"@enact/webos": "^5.0.0-alpha.3",
"classnames": "^2.5.1",
"invariant": "^2.2.4",
"prop-types": "^15.8.1",
Expand Down
8 changes: 4 additions & 4 deletions samples/event-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"theme": "sandstone"
},
"dependencies": {
"@enact/core": "^5.0.0-alpha.2",
"@enact/i18n": "^5.0.0-alpha.2",
"@enact/core": "^5.0.0-alpha.3",
"@enact/i18n": "^5.0.0-alpha.3",
"@enact/sandstone": "../../",
"@enact/spotlight": "^5.0.0-alpha.2",
"@enact/ui": "^5.0.0-alpha.2",
"@enact/spotlight": "^5.0.0-alpha.3",
"@enact/ui": "^5.0.0-alpha.3",
"ilib": "^14.20.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
Expand Down
8 changes: 4 additions & 4 deletions samples/perf-scroller-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"theme": "sandstone"
},
"dependencies": {
"@enact/core": "^5.0.0-alpha.2",
"@enact/i18n": "^5.0.0-alpha.2",
"@enact/core": "^5.0.0-alpha.3",
"@enact/i18n": "^5.0.0-alpha.3",
"@enact/sandstone": "../../",
"@enact/spotlight": "^5.0.0-alpha.2",
"@enact/ui": "^5.0.0-alpha.2",
"@enact/spotlight": "^5.0.0-alpha.3",
"@enact/ui": "^5.0.0-alpha.3",
"classnames": "^2.5.1",
"ilib": "^14.20.0",
"react": "^18.3.1",
Expand Down
Loading

0 comments on commit efe5ac9

Please sign in to comment.