12
* Added workaround in destructor for single box widgets (contentBox === boundingBox)
13
Also extracted DOM removal into separate method, which can be overridden
14
if custom widgets don't want rendered DOM removed.
16
* Fixed UI_EVENTS js exception when dealing with nested widgets rendered
17
by different Y instances.
19
* Fixed UI_EVENTS invoking nested widget listeners more than once (also
20
fixed regression to Parent-Child as a result of this change).
22
* Added support for destroy(true) to Widget, which will remove and
23
destroy all child nodes (not just the boundingBox and contentBox)
24
contained within the Widget's boundingBox in order to help control
25
Node cache size over long-running applications.
27
destroy() will maintain its current behavior due to the potentially
28
high run-time cost of destroying all child nodes.
30
Widget developers still need to continue with the best practice of
31
destroying explicit node references they create, in their destructors
32
to support the destroy() case.
37
* HTML_PARSER now return null instead of an empty node list, if no nodes
38
are found, when using the [selector] syntax, so that the default value
39
will be applied for the attribute.
41
* UI_EVENTS support and skin util methods (only getSkinName currently)
42
broken out of widget-base into separate submodules, widget-uievents and
45
* widget-base-ie broken out as conditional module.
47
* Fixed widget-locale support. Needed lazyAdd:false, for strings attribute
49
* Changed widget UI_EVENTS type parsing, to use EventTarget.parseType and
50
removed after() override, since everything ends up going through on()
56
* Minimized widget dependencies from the complete node, base rollups,
57
to only the node and base submodules widget actually uses
59
* Fixed issue in UI_EVENTS handling, where removing the last listener for
60
a ui event, didn't clear out the _delegates hash even though the handler
61
was detached (for example, in tabview, if you remove all tabs, and then
62
add a new tab, clicking on the new tab didn't work.)
67
* Fixed ticket #2528758 : using widget's DOM event facade ends with error during destroy
68
* Fixed ticket #2528760 : _applyParsedConfig merges arrays, instead of letting user config win
69
* "init, render and destroy listeners now called synchronously, if event already fired (see Event README)"
74
* "render" event now published with the defaultTargetOnly set to true.
76
* Added support for MyWidget.CSS_PREFIX static property
77
to let developers define their own CSS PREFIX instead of
80
* Changed default value for the tabIndex attribute to null, meaning by default
81
a Widget's bounding box will not be a focusable element.
83
* Widget now has built-in support for Progressive Enhancement.
85
1. The document element (HTML) is now stamped with a class name
86
(yui-js-enabled) indicating that JS is enabled allowing for the
87
creation of JS-aware Widget CSS style rules for Progressive Enhancement.
89
2. Widget has support for a class name representing the "loading"
90
state that can be used in combination with the "yui-js-enabled" class name
91
to create style rules for widgets that are in the process of loading.
92
There is support for use of both a generic Widget and type-specific
93
Widget class name by default (for example: "yui-widget-loading" and
94
"yui-tabview-loading").
96
3. Widget's renderer will remove the "loading" class names from the
97
bounding box allowing the fully rendered and functional widget to be
100
Developer Usage / Requirements
102
Developers can take advantage of the system by following two steps:
104
1. Simply stamping the bounding box of their widgets with the
105
corresponding "loading" state class name. The idea being that the markup
106
for this widget is already on the page, and the JS components required
107
to transform/bring the widget to life are in the process of loading.
109
2. Providing the definition of the loading style for the widget(s).
111
* Removed parentNode.inDoc() check from render, to allow implementations
112
to render to parentNodes which are document fragments. If rendering to
113
a document fragment, the implementation is responsible for adding the
114
document fragment to the document during the render lifecycle phase.
116
* Split widget module into the following sub-modules
118
1. widget-base : Core lifecycle and API support.
119
2. widget-htmlparser : HTML parser support.
121
The "widget" module, is a roll up of the widget-base and widget-htmlparser
124
The widget-locale is a standalone module, which contains the deprecated
125
Internationalization support and has been replaced by the Y.Intl language
126
pack support, to allow strings to be defined separately from code.
128
* Removed moveStyles support for 3.1. Can be re-added if required, but
129
currently does not seem to be in use.
131
* Made render event fireOnce (along with init and destroy in Base)
133
* Widget will now fire user-generated events like DOM elements do (e.g.
134
'click', 'mouseover'). Like all other Widget events, these events are
135
prefixed with the Widget name (e.g. 'menuitem:click') and the default
136
context of the event listener will be the Widget that fired the event.
138
The goals/purpose of the Widget UI events are:
140
1. Provide developers with the ability to listen for UI events as though the
141
Widget is an atomic element, as opposed to DOM events that will bubble up
142
through all of the elements that compose a Widget's UI.
144
2. These are events that many Widget instances are going to want to publish
145
and fire, so Widget does this by default to ensure that these events are
146
fired in a performant, consistent way across Widget implementations.
150
1. Widget developers don't have to explicitly publish a given UI event in
151
order for Widget consumers to listen for them. By default UI events are
152
only published and fired if someone is listening for them.
154
2. Widget developers can choose to publish a given UI event in order to
155
explicitly control some aspect of the event. The most likely use case
156
is the desire to provide the default implementation/handler for a given
157
event. For example: a developer might want to publish a click event
158
for a Menu Widget with the goal of providing the default click
159
implementation/function (what gets canceled if a listener calls
160
the preventDefault() method.)
162
3. The set of user-generated events published by widget is defined by the
163
UI_EVENTS prototype property. Widget developers can use this property
164
to pair down or extend the number of events that are published and
167
4. For performance, these events are only created when someone is
168
listening, and the actual firing of these events is facilitated by a
169
single, delegated DOM event listener.
171
* content box now expands to fill bounding box. CSS is used for browsers
172
which support box-sizing:border-box. Expansion is handled programmatically
173
for others (currently IE6 & IE7). Maybe some edge cases which need
176
* Added an "id" attribute.
178
* Added support for auto-rendering of widgets at the end of construction,
179
using the "render" attribute.
181
* Added support for single-box widgets (contentBox and boundingBox can
184
Widget developers can set CONTENT_TEMPLATE to null if they have a
185
widget which doesn't need dual-box support.
187
* Added _bindAttrUI and _syncAttrUI sugar methods, to bind after listeners
188
and sync methods, by attribute name.
190
* The widget's bounding box is now removed from the DOM and destroyed
191
when the widget it destroyed.
193
* Added "srcNode" attribute, which acts as the root for HTML_PARSER.
195
This allows widgets to support progressive enhancement, without having
196
to put the burden on the user to create and point to bounding boxes,
199
* Added protected _getSrcNode and _applyParsedConfig methods to allow for
200
HTML_PARSER customization, by allowing Widget developers to customize
201
the node passed into _parseNode on the input side, and the final merged
202
configuration on the output side of the srcNode parsing process.
204
The default Widget _getSrcNode implementation uses "srcNode" if set,
205
otherwise falls back to "contentBox", for 3.0.0 compatibility.
207
The default Widget _applyParsedConfig implementation aggregates the user
208
configuration literal, with the configuration output from parsed node,
209
with the user configuration taking precedence.
211
NOTE: All HTML_PARSER related changes are backward compatible.
213
Existing Widget implementations should still work. However HTML_PARSER
214
implementations based on contentBox being the root node should be
215
modified to work off of srcNode before the 3.1.0 release.
225
* PluginHost moved down to Base.
227
* Render event args added to event facade instead of being passed
228
across separately (e.parentNode).
230
* "hasFocus" attribute renamed to "focused"
232
* "focused" attribute is read only
234
* "focused" attribute is set via:
236
2. the "focus" and "blur" methods
238
* Only one DOM focus event handler is used now (two for WebKit) and it is
239
bound to the widget's ownerDocument. This allows modal widgets to maintain
240
a reference to the element in the document that previously had focus and
241
to be able to restore that focus when the modal widget is hidden.
243
* "tabIndex" attribute was updated
244
1. accepts a number or null
245
2. more documentation
247
3.0.0PR2 - Initial release
248
--------------------------