We are happy to announce the release of YUI 3.11.0! You can find it now on the Yahoo! CDN, via npm, or download it directly. The YUI Library website has also been updated to reflect the changes in this release.
There have been lots of changes across the board in this release , many of which are listed below.
Continuing the theme of performance improvements begun in YUI 3.10.0, there have been more changes to Attribute and Base. The previous blog post discussing this change can provide more details, but there have been more updates and fixes since 3.11.0pr1, most significantly this pull request (#917) which deals with an order of operations issue introduced with (#629).
Essentially this has to do with creating new objects with Base() and BaseCore() and how ATTRS are handled. In this release Base now adds up all ATTRS up the class hierarchy at once instead of a class at a time which helps in instantiation times, and Base
init and Attribute changes bypass the Event sub-system if there are no potential listeners (a speed and performance boost).
There is a new constructor flow ( as detailed in #917), Flow “3″:
Manual chained, B Constructor -> A Constructor, kicks off:
What this means to you is that you may run into backwards compatibility issues if you depended on:
There were some older extensions ( WidgetPositionAlign, WidgetButtons, etc.) that depended on the old behavior but after updating them to use
initializer that cleared up the issues. So, if you have an older extension or otherwise depend on the old behavior of the constructor chain, you will need to update your code before migrating to this version.
We are pleased to announce a new component, Paginator. It is released with a few examples and full test coverage. It’s built to be lightweight and flexible and can be used on the server or client side. Since there are so many unique styles and use cases to paginators, the Paginator view has been stripped out and can be implemented in any fashion you like. Take a look at the examples to get a head start.
Hot on the heels of Paginator is the much anticipated DataTable Paginator. DataTable Paginator mixes directly into DataTable and is ready to go with a few settings defined as it has its own Model, View, and Templates. Everything is decoupled enough however to take in a new Model, View and/or Template and render something completely different.
This release also features a large number of fixes and updates across the board once again. The change history rollup contains a comprehensive list of all the noteworthy changes in this release.
Several folks have contributed fixes to Calendar this time around. Jeroen Versteeg (@drjayvee) has been working to clean up lang with removing unused components,
short_weekdays strings, and replacing
weekday strings with datatype/date-format. Arnaud Didry (@ArnaudD) added a fix that disables nodes correctly after setting
maximumDate. And Gábor Kovács (@gkovacs76) added Hungarian language support to Calendar (as well as other components, see below) . Go YUI community!
Ezequiel Rodriguez (@ziggyism) fixed an issue in
Y.Selector where it could return an incorrect number of elements in browsers that don’t support
querySelectorAll(). Jeroen fixed an Opera related issue where
Y.Selector failed to include selected
<option> elements when the
:checked pseduo-selector was used.
Ryan also added an
isNodeOnscreen() method in ScrollInfo that returns
true if the given node is within the visible bounds of the viewport,
false otherwise. He improved the performance of
getOnscreenNodes(). He also fixed a bug that caused
getOnscreenNodes() to return incorrect information when used on a scrollable node rather than the body.
Ryan was on a roll with changes for this release:
Tree#traverseNode()methods now throw or log informative error messages when given a destroyed node instead of failing cryptically (or succeeding when they shouldn’t).
Tree.Node#depth(), which returns the depth of the node, starting at 0 for the root node.
Tree.Sortable#sort(), which sorts the children of every node in a sortable tree.
Tree.Node#isRoot()method now returns
falseon destroyed nodes instead of causing an exception.
Tree.Sortable.Node#sort()methods now accept a
deepoption. If set to
true, the entire hierarchy will be sorted (children, children’s children, etc.).
thisobject will be the tree instance. When it lives on a node, its
thisobject will be the node. When specified as an anonymous function in an options object, its
thisobject will be the global object.
YUI Core had quite a number of updates, all around making it faster and more compliant with modern browsers. Ezequiel Rodriguez improved the performance of
Y.Array.dedupe() in ES5-compliant browsers as well as brought
Y.Lang.trimRight() into compliance with ES5 (plus tests to ensure native implementations are used only if they work properly). Ryan updated
Y.UA to correctly identify IE 11 as well as Opera 15+.
There were fixes in AsyncQueue, Calendar (thanks Arnaud Didry), Color, DataTable, updates to Handlebars, IO, JSONP, Node, Plugin, and Promise. Hungarian language support was added to AutoComplete, Console, and Date (thank you Gábor Kovács). Ryan also fixed a minor issue in the Rich Text Editor component. You can find a complete list of changes for this release on GitHub as well as the change history rollup. We had a total of 570 commits by 18 authors since YUI 3.10.3.
Our testing efforts have been constantly expanding. As a result we are discovering issues that may have existed in previous versions but we are now better able to discover them.
Widget.StdModin IE6. Jeroen also fixed an issue where
fillHeightdidn’t work correctly when a section’s content was set after rendering. Fixing this exposed an issue in IE6 with
contentBoxwhere the height gets incorrectly set after the
bodyContentChangeevent is fired. If you have code that depends on
Widget.StdModin IE6, take note of this issue.
We run over 10K tests for every environment, which now includes around 1700 functional tests! And over the course of a single day this adds up to a minimum of over 120K tests run across our Target Environments. We believe having a strong CI is critical for maintaining the high standard of quality for our codebase. If you run into any issues with this release, please file an issue.