This release candidate is currently being tested across our target environments and we’re fixing any showstopper bugs. Check out the release schedule for more details. Please take this opportunity to try out this release candidate in your own test environments and file issues if you run across anything that doesn’t work the way you expect (please indicate which version you were testing when you file the issue).
We have a full plate of changes and improvements! The main focus of this release centered around improvements to the Rich Text Editor, but there are changes across the board reflecting the amazing activity of our YUI community. You can find them listed below.
A major new feature for Editor is the ability to work in one of two modes. The traditional mode was via an iframe element on a page, and this is not changed. A second new mode allows Editor to work as an inline editor on a page using ContentEditable. Due to this, some internal changes have been made.
Y.Frame is now a plugin and it extends
Y.Plugin.Base. There is a new Plugin called ContentEditable which allows the editor to work without having to use an iframe element. If a container is not specified,
EditorBase creates and plugs an instance of Y.Frame, otherwise it uses the provided container (#1041). This is thanks to the work of Iliyan Peychev and Tony Pipkin. Check out the updated examples on the staging site for implementation details. Note if you are already using Editor, there should be no changes needed for you to make, as it is backwards compatible.
Take note that several changes in Router are not backwards compatible. These include a Router’s
root path is now enforced as its mount point. Routers with a specified
root will only consider paths as matching its route handles if that path is semantically within the Router’s
root path (#1083). The
getPath() method now returns the full current path, whereas before it returned the current path relative to the Router’s
root. This also affects
req.path which is now the full path as well. Router’s dispatching process has been changed to take
res objects instead of creating them inside the
_dispatch() method. This refactor also removed the deprecated support for calling
res() as an alias for
next(). Please take note of these changes as you may have to change the way you implement Router if you call these methods.
There were several other changes as well. Router now accepts route objects through its
route() method. These route objects are the same as those specified in a Router’s
routes attribute and what Router uses for its internal storage of its routes. If these route objects contain a regular expression as their
path or they contain a
regexp property, then they are considered fully-processed. Route objects can also contain any arbitrary metadata which will be preserved (#1067). Additional
req attributes were added:
req.router which is a reference to the Router instance, and
req.route which is a reference to the current route object whose callbacks are being dispatched. Lastly, calling the
dispatch() method will now set a
ModelSync.Local was added which is an extension that provides a
sync() implementation for
localStorage that can be mixed into Models and ModelLists (#1218). You can find an example in the YUI TodoMVC example app.
The changes made in both Button and Widget were in order to improve Y.Button. One long-standing issue was the problem of always having to wrap Button with a container element such as a div. In Widget, support was improved for having single-box widgets (where the ‘bounding box’ was equivalent to the ‘container box’) by defaulting
CONTENT_TEMPLATE is null (#1125).
In support of this, in Y.Button a
labelHTML attribute was added to
Y.ButtonCore for nested HTML label support, and now Y.Button correctly retains all node attributes upon render. In the past, the node was recreated, and any custom attributes on the node would get destroyed.
Some fixes in Calendar include resolving an issue where one couldn’t select a date when passing
minimumDate (#1030), and removal of some superfluous strings from the Hungarian calendar translations (#1054 – thanks Jeroen Versteeg ).
DataTable has had a number of updates. A highlight module was added (#1196), improvements were made to the documentation and variable naming for better code understanding (#946 – thanks Satyam),
Show All was added to language packs (#1173), a
contentUpdateevent was added to trigger after a DataTable has been updated from a
dataChange event (#1072), and an issue was fixed with objects that were recursively nested being cloned infinitely (#1008).
In Event, delegated focus and blur events now behave the same way other events do when a delegate sub from a container closer to the target calls
e.stopPropagation(). Delegate subs from containers higher in the parent axis are not notified (#1145).
removeTarget are now chainable.
In Graphics, a fix was made for an issue involving elements being orphaned after
destroy() being called (#1138).
The History module received some fixes including fixing a possible exception with
HistoryHTML5.init() in IE10 (fixed by Ariel Schiavoni), Rob Lund added a workaround for a
replaceState bug in Chrome/Webkit (#1159), and Byran Zaugg fixed an issue with
parseHash not parsing blank values in a hash string (#1116).
In Node, pull request #1169 fixed an issue with
inDoc failing if Node was not bound to a DOM node. In the Node plugin for ScrollInfo, the methods
getOnscreenNodes() were fixed to avoid returning incorrect information in certain cases.
In Paginator, a minor fix was done for a misspelling of Paginator in a NAME parameter.
Jerry Reptak fixed another issue in Uploader involving an
A new method under Y.Lang, called
Y.Lang.isRegExp() was created.
Another theme of sorts for this release was deprecation and removal. We deprecated SimpleYUI a while back, and as of this release it is removed from the codebase. We also have deprecated and removed all of the Flash files from our repository. If you are looking to compile and host your own SWFs to include in YUI, you will need to visit the yui3-swfs repo to obtain the source files. Also removed was widget-locale, as it had been already deprecated almost 3 years ago.
New deprecations include the official deprecation of PHP Loader and YUI 2in3. These projects will no longer be supported and their features may removed from YUI in the future (as in the case for YUI 2in3).
We run over 8,700 tests for every target environment with our internal CI system, so having a comprehensive set of tests for every feature is critical to maintaining our high standards for the quality in our codebase. If you are interested in contributing to YUI, consider taking on an
up-for-grabs bug, write a test, or even simply file an issue.
There were a total of 486 commits for this upcoming release by 17 contributors. You can read more about the details of this release candidate in the Change History Rollup and the GitHub Comparison to 3.12.0.