YUI 3.15.0 Released

By YUI TeamFebruary 26, 2014

We are happy to announce the release of YUI 3.15.0! You can find this release on the Yahoo CDN, through npm, and downloadable via a .zip archive. The YUI Library website has also been updated to reflect the changes in this release.

What's New In This Release

If there was one person who has had the biggest impact on this release, it would be Juan Dopazo. He has been doing quite a bit of work around adding support for ES6 modules in YUI. He updated the underlying implementation of Y.soon in the Timers module, and also contributed a huge amount of work to the Promise module. In addition he did a good amount clean-up work behind the scenes on the inline docs across the library. Beyond this, there were changes and updates across a wide variety of modules, and a huge effort went into bringing down the number of test failures from our website examples.

App Framework Updates

In the App Framework ModelSync.local was refactored to use a different and more readable storage system. Note that this system is backwards-incompatible with the old storage system but the API remains the same so you don't need to change application code unless you want to maintain the data that is already present in localstorage today. In addition, there was a fix to history-hash-ie to prevent it loading for non-IE browsers (#1613).

Attribute Fixes

In Attribute, a issue was fixed where reset() would fail when resetting an attribute called 'length'.

Calendar Changes

Two issues were fixed in the Calendar module. The first changes the behavior of Calendar to use visibility:inherit instead of visibility:visible for compatibility with overlays (thanks @jafl). The second fixes an issue where the Calendar cell of the next month appears to be selectable (see #1559 for details, and thanks to @shunner for the fix).

Charts Updates

The Charts module received two updates as well. In a single series histogram the _maxSize property was not updated (#1480). The labelFormat attribute was added to CategoryAxisBase and CategoryAxis.

Date Updates

There were some changes to Date that landed in the tree between releases that caused a number of test failures. Those changes were reverted until the tests can be updated to fix the failures (see details here, here and here).

Drag and Drop Fixes

In Drag and Drop, a bug where drop:hit didn't fire was fixed (thanks @hacklschorsch ). When starting a gesturemove event, the default page action is prevented and fixes an issue where browsers were selecting the text when dragging (thanks @andrewnicols).

DOM Fixes

In DOM we have two fixes thanks to @okuryu. The first fixes an issue where if you set an input value to null resulted in a node.value ==="null" in IE9. The second fixes an issue in setStyle() where you could not set an opacity to 1.

Event Infrastructure and Event Simulate Changes

If there was one bug you might have seen and really wished was fixed, it was probably one in Event where you would see an event.returnValue is deprecated warning in Chrome. A big thanks to @zhiyelee for fixing this! Also, @andrewnicols reduced categories of certain noisy log events in the event module and added categories for those that were missing some (#1605). Lastly, support was added for W3C Pointer events in the tap event. This fixed an issue were the type of pointer event objects was changed from MSPointerDown to pointerdown to comply with their proposed W3C standard.

In Event Simulate, whitelisted W3C Pointer events were added.

Graphics Updates

Graphics received two updates. The first parses an rgba value into a color string and opacity value for vml fill and stroke. The second addressed an issue with path chaining in the canvas implementation of graphics.

IO Fix

There was an issue in io-upload-iframe fixed by @andrewnicols where the code would attempt to reset attributes of a form element that no longer existed on the page (#1465 ).

Loader Performance Improvements

Since Loader is fundamental to YUI, any updates here often have a broad impact on the library. Ezequiel optimized the calculate method to now use a topological sort (a variation of a depth first search) to generate a valid dependency order. If you find any issues with this new behavior, please file an issue (you must be logged in).

Promise Updates and Deprecations

The next version of YUI introduces several changes to align them better to the emerging EcmaScript 6 standard.

There are new static methods for creating promises: Promise.resolve and Promise.reject. These are factory counterparts for the functions available to the promise initialization function. A typical use case is rejecting early when a function that returns a promise gets a wrong input:

There are new static methods for combining promises: Promise.all and Promise.race. Promise.all is similar to Y.batch but it takes an array, which makes it easier to keep a list of promises and pass it to Promise.all(arrayOfPromises).

The resolve function now handles promises as values. If a promise for the value ‘foo’ is passed to resolve, the new promise will be fulfilled with foo as soon as the first one is fulfilled.

This is also true for the static Promise.resolve.

The method promise.getStatus() is deprecated to align with the new EcmaScript standard for promises. Internally, the use of a Resolver object will also be removed in the future to match the API in Chrome and Firefox.

YUI Test Addition

In YUI Test a new method was added test.next(fn) which returns a callback that automatically resumes asynchronous tests.

Timers Changes

Another relatively big change in this release is the importing of asap.js as the underlying implementation of Y.soon. Tasks scheduled during the flushing of the queue are pushed to the end of the queue instead of being scheduled for a new tick.

Widget Modality Fix

A bug was fixed in Widget Modality where the widget would focus before it was actually rendered and caused a jump in the window position (thanks @andrewnicols).

YUI Core Changes

In YUI Core, a method called Y.require() was added for importing ES6 modules. It's similar to Y.use() but it follows the following signature.

Also in YUI Core @andrewnicols set the default logLevel to info if missing or not a real category (#1610). Contributor @adinardi fixed UA detection in recent versions of the Amazon Silk browser (#1576). And finally, the value of this was fixed inside ES6 definitions.

Additional Information

There were a total of 449 commits by 19 contributors for this release. You can find details about the changes in this release by checking out the Change History Rollup. For every commit made to our source, there are over 9,000 tests run against our target environments. If you discover an issue, please file it in GitHub (you'll need to sign in first). If you would like to contribute tests, documentation, code fixes, or new features, please check out our Contributing to YUI Wiki entry.