Skip to content

Commit

Permalink
2.2.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
JayCanuck committed Oct 15, 2018
2 parents 8cc3150 + b5ada3e commit 395010b
Show file tree
Hide file tree
Showing 24 changed files with 295 additions and 230 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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

## [2.2.2] - 2018-10-15

### Fixed

- `core/util.Job` to cancel existing scheduled `idle()` jobs before scheduling another
- `moonstone/Scroller` stuttering when page up/down key is pressed
- `ui/Scroller` slowed scrolling behavior when repeatedly requesting a scroll to the same position

## [2.2.1] - 2018-10-09

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "2.8.0",
"version": "2.2.1",
"version": "2.2.2",
"command": {
"bootstrap": {
"npmClientArgs": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enact",
"version": "2.2.1",
"version": "2.2.2",
"description": "Monorepo for all Enact front end libraries.",
"private": true,
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [2.2.2] - 2018-10-15

### Fixed

- `core/util.Job` to cancel existing scheduled `idle()` jobs before scheduling another

## [2.2.1] - 2018-10-09

No significant changes.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enact/core",
"version": "2.2.1",
"version": "2.2.2",
"description": "Enact is an open source JavaScript framework containing everything you need to create a fast, scalable mobile or web application.",
"main": "index.js",
"scripts": {
Expand Down
15 changes: 7 additions & 8 deletions packages/core/util/Job.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,13 @@ class Job {
* @public
*/
idleUntil = (timeout, ...args) => {
if (typeof window !== 'undefined') {
if (window.requestIdleCallback) {
this.type = 'idle';
this.id = window.requestIdleCallback(() => this.run(args), {timeout});
} else {
// If requestIdleCallback is not supported just run the function immediately
this.fn(...args);
}
if (typeof window !== 'undefined' && window.requestIdleCallback) {
this.stop();
this.type = 'idle';
this.id = window.requestIdleCallback(() => this.run(args), {timeout});
} else {
// since we can't request an idle callback, just pass to startAfter()
this.startAfter(timeout, ...args);
}
}

Expand Down
31 changes: 31 additions & 0 deletions packages/core/util/tests/Job-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,24 @@ describe('Job', function () {
});

describe('#idle', function () {
// polyfill for PhantomJS to verify expected idle behavior as much as possible
const windowRequest = window.requestIdleCallback;
const windowCancel = window.cancelIdleCallback;

before(() => {
window.requestIdleCallback = windowRequest || function (fn) {
return setTimeout(fn, 0);
};
window.cancelIdleCallback = windowCancel || function (id) {
clearTimeout(id);
};
});

after(() => {
window.requestIdleCallback = windowRequest;
window.cancelIdleCallback = windowCancel;
});

it('should start job', function (done) {
const j = new Job(done, 10);
j.idle();
Expand All @@ -99,5 +117,18 @@ describe('Job', function () {
const j = new Job(fn, 10);
j.idle(value);
});

it('should clear an existing job id before starting job', function (done) {
const fn = function (arg) {
if (arg === 'first') {
done(new Error('First job ran'));
} else {
done();
}
};
const j = new Job(fn);
j.idle('first');
j.idle('second');
});
});
});
4 changes: 4 additions & 0 deletions packages/i18n/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [2.2.2] - 2018-10-15

No significant changes.

## [2.2.1] - 2018-10-09

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@enact/i18n",
"main": "./src/index.js",
"version": "2.2.1",
"version": "2.2.2",
"description": "Internationalization support for Enact using iLib",
"scripts": {
"clean": "enact clean",
Expand Down Expand Up @@ -34,7 +34,7 @@
"extends": "enact/strict"
},
"dependencies": {
"@enact/core": "^2.2.1",
"@enact/core": "^2.2.2",
"prop-types": "^15.6.0",
"ramda": "^0.24.1",
"react": "^16.3.2",
Expand Down
6 changes: 6 additions & 0 deletions packages/moonstone/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [2.2.2] - 2018-10-15

### Fixed

- `moonstone/Scroller` stuttering when page up/down key is pressed

## [2.2.1] - 2018-10-09

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('ExpandableList', () => {
const children = ['option1', 'option2', 'option3'];

const expandableList = mount(
<ExpandableListBase title="Item">
<ExpandableListBase title="Item" open>
{children}
</ExpandableListBase>
);
Expand Down
4 changes: 4 additions & 0 deletions packages/moonstone/Scrollable/Scrollable.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,10 @@ class ScrollableBase extends Component {

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

if (isPageUp(keyCode) || isPageDown(keyCode)) {
ev.preventDefault();
}

this.animateOnFocus = true;

if (!repeat && this.hasFocus()) {
Expand Down
10 changes: 5 additions & 5 deletions packages/moonstone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enact/moonstone",
"version": "2.2.1",
"version": "2.2.2",
"description": "Large-screen/TV support library for Enact, containing a variety of UI components.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -28,10 +28,10 @@
"extends": "enact/strict"
},
"dependencies": {
"@enact/core": "^2.2.1",
"@enact/i18n": "^2.2.1",
"@enact/spotlight": "^2.2.1",
"@enact/ui": "^2.2.1",
"@enact/core": "^2.2.2",
"@enact/i18n": "^2.2.2",
"@enact/spotlight": "^2.2.2",
"@enact/ui": "^2.2.2",
"classnames": "^2.2.5",
"eases": "^1.0.8",
"invariant": "^2.2.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/sampler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [2.2.2] - 2018-10-15

No significant changes.

## [2.2.1] - 2018-10-09

No significant changes.
Expand Down
Loading

0 comments on commit 395010b

Please sign in to comment.