Skip to content

Commit 5eb1d9d

Browse files
committed
3.0.0-beta.1 release
2 parents 383d6dc + 89b1d16 commit 5eb1d9d

24 files changed

+12597
-80
lines changed

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22

33
The following is a curated list of changes in the Enact project, newest changes on the top.
44

5+
## [3.0.0-beta.1] - 2019-07-15
6+
7+
### Removed
8+
9+
- `core/kind` config property `contextTypes`
10+
- `i18n/ilib` embedded copy of iLib in favour of the NPM package `ilib`
11+
- `small` prop in `moonstone/Input`, `moonstone/ToggleButton`, `moonstone/Button`, `moonstone/Icon`, `moonstone/IconButton`, and `moonstone/LabeledIcon`, replaced by `size` prop, which accepts `"small"` or `"large"`
12+
- `moonstone/Divider`, replaced by `moonstone/Heading`
13+
14+
### Added
15+
16+
- `ilib@^14.2.0` package as a peer dependency for `@enact/i18n` and `@enact/moonstone`, which apps will need to include
17+
- `moonstone/Dropdown` widths `tiny`, and `huge`
18+
- `ui/VirtualList.VirtualGridList` and `ui/VirtualList.VirtualList` support for resizing a window
19+
20+
### Fixed
21+
22+
- Moonstone Fonts to use the updated names of global fonts available in the system
23+
- `core/platform` logic for webOS detection
24+
- `moonstone/Popup` to properly handle closing in mid-transition
25+
- `moonstone/Scroller` to properly move focus out of the container
26+
- `moonstone/VirtualList` to allow keydown events to bubble up when not handled by the component
27+
- `moonstone/IncrementSlider` to support aria-label when disabled
28+
- `moonstone/LabeledItem` to not clip the bottom of descender glyphs in large text mode
29+
- `moonstone/VirtualList.VirtualGridList` and `moonstone/VirtualList.VirtualList` to focus an item properly after an update
30+
- `moonstone/Scroller`, `moonstone/VirtualList.VirtualGridList`, and `moonstone/VirtualList.VirtualList` not to scroll too far by page up/down keys
31+
- `spotlight/SpotlightContainerDecorator` to correctly forward `onFocusCapture` and `onBlurCapture` events
32+
- `ui/Icon` to support arbitrary icon name strings, like in material icons
33+
534
## [3.0.0-alpha.7] - 2019-06-24
635

736
### Changed

docs/migration/enact/migrating-to-enact-3.md

+37
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,40 @@ this guide.
1010

1111
## General Changes
1212

13+
### cli
14+
`cli` must be upgraded to version `2.4.1`.
15+
16+
### i18n
17+
Apps that use `@enact/i18n` must install `ilib` as a dependency. This includes apps that do not require `@enact/i18n` directly, but use themes or modules that do (list may or may not be complete, check module requirements):
18+
* `@enact/analytics`
19+
* `@enact/i18n` (of course!)
20+
* `@enact/moonstone`
21+
22+
#### Example
23+
```
24+
npm install ilib@^14.2.0 --save
25+
```
26+
webOS TV developers can optionally use an alias for `ilib` that will provide the webOS-specific locale data for local development. It is not required as the webOS build tools will automatically provide the correct locale data at build time. Alias support is in `npm` version `6.9.0` or greater.
27+
28+
#### Example
29+
```
30+
npm install ilib@ilib-webos-tv@^14.2.0-webostv.1 --save
31+
```
32+
33+
Import references using `@enact/i18n/ilib` must be updated to use `ilib`.
34+
35+
#### Example
36+
##### 2.x
37+
```
38+
import DateFactory from '@enact/i18n/ilib/lib/DateFactory';
39+
import ilib from '@enact/i18n/ilib/lib/ilib';
40+
```
41+
##### 3.0
42+
```
43+
import DateFactory from 'ilib/lib/DateFactory';
44+
import ilib from 'ilib/lib/ilib';
45+
```
46+
1347
### spotlight
1448
`spotlight` will now focus disabled items. You can use the `spotlightDisabled` prop on `spotlight/Spottable`
1549
and `spotlight/SpotlightContainerDecorator` instances if focus absolutely must be prevented.
@@ -19,6 +53,9 @@ Enact 3.0 no longer supports the 2019 TV platform or earlier versions.
1953

2054
## moonstone
2155

56+
### General
57+
Many of the Moonstone components are affected by the change from using the `small` boolean prop to the `size` text prop. Most of them are `size="small"` by default and have larger versions when using `size="large"`.
58+
2259
### Style
2360
Various styling changes have been made to support new UI/UX designs for the webOS TV platform. In
2461
addition, some LESS variables have been changed or removed. If you were importing `moonstone/styles/*.less`

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lerna": "2.8.0",
3-
"version": "3.0.0-alpha.7",
3+
"version": "3.0.0-beta.1",
44
"command": {
55
"bootstrap": {
66
"npmClientArgs": [

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "enact",
3-
"version": "3.0.0-alpha.7",
3+
"version": "3.0.0-beta.1",
44
"description": "Monorepo for all Enact front end libraries.",
55
"private": true,
66
"scripts": {

packages/core/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following is a curated list of changes in the Enact core module, newest changes on the top.
44

5-
## [unreleased]
5+
## [3.0.0-beta.1] - 2019-07-15
66

77
### Removed
88

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@enact/core",
3-
"version": "3.0.0-alpha.7",
3+
"version": "3.0.0-beta.1",
44
"description": "Enact is an open source JavaScript framework containing everything you need to create a fast, scalable mobile or web application.",
55
"main": "index.js",
66
"scripts": {

packages/i18n/CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
The following is a curated list of changes in the Enact i18n module, newest changes on the top.
44

5-
## [unreleased]
5+
## [3.0.0-beta.1] - 2019-07-15
66

77
## Removed
88

9-
- `i18n/ilib` embedded copy of iLib in favour of the NPM package `ilib`
9+
- `i18n/ilib` embedded copy of iLib in favour of the NPM package `ilib`
1010

1111
### Added
1212

packages/i18n/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@enact/i18n",
33
"main": "./src/index.js",
4-
"version": "3.0.0-alpha.7",
4+
"version": "3.0.0-beta.1",
55
"description": "Internationalization support for Enact using iLib",
66
"scripts": {
77
"clean": "enact clean",
@@ -41,7 +41,7 @@
4141
]
4242
},
4343
"dependencies": {
44-
"@enact/core": "^3.0.0-alpha.7",
44+
"@enact/core": "^3.0.0-beta.1",
4545
"prop-types": "^15.7.2",
4646
"ramda": "^0.24.1",
4747
"react": "^16.8.0",

packages/moonstone/CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following is a curated list of changes in the Enact moonstone module, newest changes on the top.
44

5-
## [unreleased]
5+
## [3.0.0-beta.1] - 2019-07-15
66

77
### Removed
88

@@ -16,11 +16,11 @@ The following is a curated list of changes in the Enact moonstone module, newest
1616

1717
### Fixed
1818

19+
- Fonts to use the updated names of global fonts available in the system
1920
- `moonstone/Popup` to properly handle closing in mid-transition
2021
- `moonstone/Scroller` to properly move focus out of the container
2122
- `moonstone/VirtualList` to allow keydown events to bubble up when not handled by the component
2223
- `moonstone/IncrementSlider` to support aria-label when disabled
23-
- Fonts to use the updated names of global fonts available in the system
2424
- `moonstone/LabeledItem` to not clip the bottom of descender glyphs in large text mode
2525
- `moonstone/VirtualList.VirtualGridList` and `moonstone/VirtualList.VirtualList` to focus an item properly after an update
2626
- `moonstone/Scroller`, `moonstone/VirtualList.VirtualGridList`, and `moonstone/VirtualList.VirtualList` not to scroll too far by page up/down keys

packages/moonstone/MoonstoneDecorator/fontGenerator.js

+31-27
Original file line numberDiff line numberDiff line change
@@ -16,48 +16,49 @@ const fonts = {
1616
bold: 'LG Smart UI AR HE TH SemiBold"), local("LGSmartUIARHETH-SemiBold'
1717
},
1818
'am': {
19-
regular: 'LG Display_Amharic'
19+
regular: 'LG Smart UI Amharic'
2020
},
21-
// 'bn': {
22-
// regular: 'LG Display_Bengali'
23-
// },
24-
'en-JP': {
25-
regular: 'LG Display_JP'
21+
'bn': {
22+
regular: 'LG Smart UI Bengali'
23+
},
24+
'gu': {
25+
regular: 'LG Smart UI Gujarati'
2626
},
27-
// 'gu': {
28-
// regular: 'LG Display_Gujarati'
29-
// },
3027
'ja': {
31-
regular: 'LG Display_JP'
28+
regular: 'LG Smart UI JP',
29+
bold: 'LG Display_JP_Bold'
30+
},
31+
'kn': {
32+
regular: 'LG Smart UI Kannada'
33+
},
34+
'hi': {
35+
regular: 'LG Smart UI Devanagari'
3236
},
33-
// 'kn': {
34-
// regular: 'LG Display_Kannada'
35-
// },
36-
// 'ks': {
37-
// regular: 'LG Display_Devanagari'
38-
// },
3937
'or': {
40-
regular: 'LG Display_Oriya'
38+
regular: 'LG Smart UI Oriya'
39+
},
40+
'pa': {
41+
regular: 'LG Smart UI Gurmukhi'
4142
},
4243
'ml': {
43-
regular: 'LG Display_ML'
44+
regular: 'LG Smart UI Malayalam'
45+
},
46+
'ta': {
47+
regular: 'LG Smart UI Tamil'
48+
},
49+
'te': {
50+
regular: 'LG Smart UI Telugu'
4451
},
45-
// 'ta': {
46-
// regular: 'LG Display_Tamil'
47-
// },
48-
// 'te': {
49-
// regular: 'LG Display_Telugu'
50-
// },
5152
'ur': {
52-
regular: 'LG Display_Urdu',
53+
regular: 'LG Smart UI Urdu',
5354
unicodeRange:
5455
'U+600-6FF,' +
5556
'U+FE70-FEFE,' +
5657
'U+FB50-FDFF'
5758
},
5859
'zh-HK': {
59-
regular: 'LG Display GP4_HK',
60-
bold: 'LG Display GP4_HK',
60+
regular: 'LG Smart UI TC',
61+
bold: 'LG Smart UI TC',
6162
unicodeRange:
6263
'U+0-FF,' +
6364
'U+2E80-2EFF,' +
@@ -71,6 +72,9 @@ const fonts = {
7172
};
7273

7374
// Duplications and alternate locale names
75+
fonts['as'] = fonts['bn'];
76+
fonts['en-JP'] = fonts['ja'];
77+
fonts['mr'] = fonts['hi'];
7478
fonts['zh-TW'] = fonts['zh-HK'];
7579

7680
addLocalizedFont(fontName, fonts);

packages/moonstone/Panels/Arrangers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const offsetForBreadcrumbs = (node) => {
6464
*/
6565
export const ActivityArranger = {
6666
enter: (config) => {
67-
const {node, reverse, to, from} = config;
67+
const {node, reverse} = config;
6868

6969
return arrange(config, [
7070
{transform: `${offsetForBreadcrumbs(node)} translateX(100%)`, offset: 0},
@@ -75,7 +75,7 @@ export const ActivityArranger = {
7575
], animationOptions);
7676
},
7777
leave: (config) => {
78-
const {node, reverse, to, from} = config;
78+
const {node, reverse} = config;
7979

8080
return arrange(config, [
8181
{transform: offsetForBreadcrumbs(node), offset: 0},

packages/moonstone/Scrollable/Scrollable.js

+15-13
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,15 @@ class ScrollableBase extends Component {
350350
}
351351
}
352352

353+
isScrollButtonFocused () {
354+
const {horizontalScrollbarRef: h, verticalScrollbarRef: v} = this.uiRef.current;
355+
356+
return (
357+
h.current && h.current.isOneOfScrollButtonsFocused() ||
358+
v.current && v.current.isOneOfScrollButtonsFocused()
359+
);
360+
}
361+
353362
onFlick = ({direction}) => {
354363
const bounds = this.uiRef.current.getScrollBounds();
355364
const focusedItem = Spotlight.getCurrent();
@@ -373,24 +382,17 @@ class ScrollableBase extends Component {
373382
}
374383

375384
onTouchStart = () => {
376-
const
377-
focusedItem = Spotlight.getCurrent(),
378-
{horizontalScrollbarRef, verticalScrollbarRef} = this.uiRef.current,
379-
isHorizontalScrollButtonFocused = horizontalScrollbarRef.current && horizontalScrollbarRef.current.isOneOfScrollButtonsFocused(),
380-
isVerticalScrollButtonFocused = verticalScrollbarRef.current && verticalScrollbarRef.current.isOneOfScrollButtonsFocused();
385+
const focusedItem = Spotlight.getCurrent();
381386

382-
if (!Spotlight.isPaused() && focusedItem && !isHorizontalScrollButtonFocused && !isVerticalScrollButtonFocused) {
387+
if (!Spotlight.isPaused() && focusedItem && !this.isScrollButtonFocused()) {
383388
focusedItem.blur();
384389
}
385390
}
386391

387-
onWheel = ({delta, horizontalScrollbarRef, verticalScrollbarRef}) => {
388-
const
389-
focusedItem = Spotlight.getCurrent(),
390-
isHorizontalScrollButtonFocused = horizontalScrollbarRef.current && horizontalScrollbarRef.current.isOneOfScrollButtonsFocused(),
391-
isVerticalScrollButtonFocused = verticalScrollbarRef.current && verticalScrollbarRef.current.isOneOfScrollButtonsFocused();
392+
onWheel = ({delta}) => {
393+
const focusedItem = Spotlight.getCurrent();
392394

393-
if (focusedItem && !isHorizontalScrollButtonFocused && !isVerticalScrollButtonFocused) {
395+
if (focusedItem && !this.isScrollButtonFocused()) {
394396
focusedItem.blur();
395397
}
396398

@@ -578,7 +580,7 @@ class ScrollableBase extends Component {
578580

579581
forward('onKeyDown', ev, this.props);
580582

581-
if (isPageUp(keyCode) || isPageDown(keyCode)) {
583+
if ((isPageUp(keyCode) || isPageDown(keyCode)) && !this.isScrollButtonFocused()) {
582584
ev.stopPropagation();
583585
ev.preventDefault();
584586
}

packages/moonstone/Scrollable/ScrollableNative.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,16 @@ class ScrollableBaseNative extends Component {
332332
}
333333
}
334334

335+
336+
isScrollButtonFocused () {
337+
const {horizontalScrollbarRef: h, verticalScrollbarRef: v} = this.uiRef.current;
338+
339+
return (
340+
h.current && h.current.isOneOfScrollButtonsFocused() ||
341+
v.current && v.current.isOneOfScrollButtonsFocused()
342+
);
343+
}
344+
335345
onFlick = ({direction}) => {
336346
const bounds = this.uiRef.current.getScrollBounds();
337347
const focusedItem = Spotlight.getCurrent();
@@ -357,13 +367,9 @@ class ScrollableBaseNative extends Component {
357367
}
358368

359369
onTouchStart = () => {
360-
const
361-
focusedItem = Spotlight.getCurrent(),
362-
{horizontalScrollbarRef, verticalScrollbarRef} = this.uiRef.current,
363-
isHorizontalScrollButtonFocused = horizontalScrollbarRef.current && horizontalScrollbarRef.current.isOneOfScrollButtonsFocused(),
364-
isVerticalScrollButtonFocused = verticalScrollbarRef.current && verticalScrollbarRef.current.isOneOfScrollButtonsFocused();
370+
const focusedItem = Spotlight.getCurrent();
365371

366-
if (!Spotlight.isPaused() && focusedItem && !isHorizontalScrollButtonFocused && !isVerticalScrollButtonFocused) {
372+
if (!Spotlight.isPaused() && focusedItem && !this.isScrollButtonFocused()) {
367373
focusedItem.blur();
368374
}
369375
}
@@ -639,7 +645,7 @@ class ScrollableBaseNative extends Component {
639645

640646
forward('onKeyDown', ev, this.props);
641647

642-
if (isPageUp(keyCode) || isPageDown(keyCode)) {
648+
if ((isPageUp(keyCode) || isPageDown(keyCode)) && !this.isScrollButtonFocused()) {
643649
ev.stopPropagation();
644650
ev.preventDefault();
645651
}

0 commit comments

Comments
 (0)