|
1 Widget Change History |
|
2 ===================== |
|
3 |
|
4 3.10.3 |
|
5 ------ |
|
6 |
|
7 * No changes. |
|
8 |
|
9 3.10.2 |
|
10 ------ |
|
11 |
|
12 * Fixed contentBox remaining in Y.Node _instances cache, when |
|
13 widget hasn't been rendered, and `widget.destroy(true)` [deep destroy] |
|
14 is used. |
|
15 |
|
16 3.10.1 |
|
17 ------ |
|
18 |
|
19 * No changes. |
|
20 |
|
21 3.10.0 |
|
22 ------ |
|
23 |
|
24 * Added custom prefix support to widget.getSkinName, |
|
25 derived https://github.com/yui/yui3/pull/327 |
|
26 |
|
27 3.9.1 |
|
28 ----- |
|
29 |
|
30 * No changes. |
|
31 |
|
32 3.9.0 |
|
33 ----- |
|
34 |
|
35 * No changes. |
|
36 |
|
37 3.8.1 |
|
38 ----- |
|
39 |
|
40 * No changes. |
|
41 |
|
42 3.8.0 |
|
43 ----- |
|
44 |
|
45 * No changes. |
|
46 |
|
47 3.7.3 |
|
48 ----- |
|
49 |
|
50 * No changes. |
|
51 |
|
52 3.7.2 |
|
53 ----- |
|
54 |
|
55 * No changes. |
|
56 |
|
57 3.7.1 |
|
58 ----- |
|
59 |
|
60 * No changes. |
|
61 |
|
62 3.7.0 |
|
63 ----- |
|
64 |
|
65 * Fixed regression in `Widget.getByNode()`, introduced in 3.5.0, where the |
|
66 Widget would not be found if the user changed the id of the boundingBox node, |
|
67 after the widget was rendered. |
|
68 |
|
69 We go back to using the Node's guid for caching instead of the DOM node id. |
|
70 |
|
71 The change was originally made to lay the groundwork for string based rendering, |
|
72 where a boundingBox node reference would not be present during initialization. |
|
73 |
|
74 This can still be achieved post-render by populating the instance map, after a |
|
75 Node reference has been established/added to the DOM (when we get there). |
|
76 |
|
77 3.6.0 |
|
78 ----- |
|
79 |
|
80 * Widget no longer runs html parser against the default `contentBox` created |
|
81 from `CONTENT_TEMPLATE`, so that html parser implementations don't need to |
|
82 check for `null` results for missing nodes. |
|
83 |
|
84 3.5.1 |
|
85 ----- |
|
86 |
|
87 * Cleaned up logic to detach document focus listener after last Widget is destroyed. |
|
88 The count was off by one, leaving one Widget in memory. |
|
89 |
|
90 3.5.0 |
|
91 ----- |
|
92 |
|
93 * Refactored some of the box stamping code, to avoid Node references |
|
94 until render. Changed caching mechanism for Y.Widget.getByNode to use node.get("id") |
|
95 |
|
96 * Patched after listeners in Widget with a if (e.target === this), so that homogenous |
|
97 bubbles don't end up changing state at both the source and the target. Broader |
|
98 fix needs to go into Event/EventTarget |
|
99 |
|
100 * Optimized focus handler registration, by only registering a single document focus |
|
101 listener and using Widget.getByNode to ship out handling to the specific widget |
|
102 instance. |
|
103 |
|
104 * Widget will now default to an empty object config, if one isn't passed in, |
|
105 so that HTML_PARSER can work with a static ATTRS srcNode definition. |
|
106 |
|
107 It's not possible to address this just at the HTML_PARSER level, since the config |
|
108 object gets used by reference, so we need to make sure everything is updating the |
|
109 config object which is passed to Base's initialization chain. |
|
110 |
|
111 3.4.1 |
|
112 ----- |
|
113 |
|
114 * No changes. |
|
115 |
|
116 3.4.0 |
|
117 ----- |
|
118 |
|
119 * Added workaround in destructor for single box widgets (contentBox === boundingBox) |
|
120 Also extracted DOM removal into separate method, which can be overridden |
|
121 if custom widgets don't want rendered DOM removed. |
|
122 |
|
123 * Fixed UI_EVENTS js exception when dealing with nested widgets rendered |
|
124 by different Y instances. |
|
125 |
|
126 * Fixed UI_EVENTS invoking nested widget listeners more than once (also |
|
127 fixed regression to Parent-Child as a result of this change). |
|
128 |
|
129 * Added support for destroy(true) to Widget, which will remove and |
|
130 destroy all child nodes (not just the boundingBox and contentBox) |
|
131 contained within the Widget's boundingBox in order to help control |
|
132 Node cache size over long-running applications. |
|
133 |
|
134 destroy() will maintain its current behavior due to the potentially |
|
135 high run-time cost of destroying all child nodes. |
|
136 |
|
137 Widget developers still need to continue with the best practice of |
|
138 destroying explicit node references they create, in their destructors |
|
139 to support the destroy() case. |
|
140 |
|
141 3.3.0 |
|
142 ----- |
|
143 |
|
144 * HTML_PARSER now return null instead of an empty node list, if no nodes |
|
145 are found, when using the [selector] syntax, so that the default value |
|
146 will be applied for the attribute. |
|
147 |
|
148 * UI_EVENTS support and skin util methods (only getSkinName currently) |
|
149 broken out of widget-base into separate submodules, widget-uievents and |
|
150 widget-skin. |
|
151 |
|
152 * widget-base-ie broken out as conditional module. |
|
153 |
|
154 * Fixed widget-locale support. Needed lazyAdd:false, for strings attribute |
|
155 |
|
156 * Changed widget UI_EVENTS type parsing, to use EventTarget.parseType and |
|
157 removed after() override, since everything ends up going through on() |
|
158 eventually. |
|
159 |
|
160 3.2.0 |
|
161 ----- |
|
162 |
|
163 * Minimized widget dependencies from the complete node, base rollups, |
|
164 to only the node and base submodules widget actually uses |
|
165 |
|
166 * Fixed issue in UI_EVENTS handling, where removing the last listener for |
|
167 a ui event, didn't clear out the _delegates hash even though the handler |
|
168 was detached (for example, in tabview, if you remove all tabs, and then |
|
169 add a new tab, clicking on the new tab didn't work.) |
|
170 |
|
171 3.1.1 |
|
172 ----- |
|
173 |
|
174 * Fixed ticket #2528758 : using widget's DOM event facade ends with error during destroy |
|
175 * Fixed ticket #2528760 : _applyParsedConfig merges arrays, instead of letting user config win |
|
176 * "init, render and destroy listeners now called synchronously, if event already fired (see Event README)" |
|
177 |
|
178 3.1.0 |
|
179 ----- |
|
180 |
|
181 * "render" event now published with the defaultTargetOnly set to true. |
|
182 |
|
183 * Added support for MyWidget.CSS_PREFIX static property |
|
184 to let developers define their own CSS PREFIX instead of |
|
185 yui-<MyWidget.NAME>. |
|
186 |
|
187 * Changed default value for the tabIndex attribute to null, meaning by default |
|
188 a Widget's bounding box will not be a focusable element. |
|
189 |
|
190 * Widget now has built-in support for Progressive Enhancement. |
|
191 |
|
192 1. The document element (HTML) is now stamped with a class name |
|
193 (yui-js-enabled) indicating that JS is enabled allowing for the |
|
194 creation of JS-aware Widget CSS style rules for Progressive Enhancement. |
|
195 |
|
196 2. Widget has support for a class name representing the "loading" |
|
197 state that can be used in combination with the "yui-js-enabled" class name |
|
198 to create style rules for widgets that are in the process of loading. |
|
199 There is support for use of both a generic Widget and type-specific |
|
200 Widget class name by default (for example: "yui-widget-loading" and |
|
201 "yui-tabview-loading"). |
|
202 |
|
203 3. Widget's renderer will remove the "loading" class names from the |
|
204 bounding box allowing the fully rendered and functional widget to be |
|
205 revealed. |
|
206 |
|
207 Developer Usage / Requirements |
|
208 |
|
209 Developers can take advantage of the system by following two steps: |
|
210 |
|
211 1. Simply stamping the bounding box of their widgets with the |
|
212 corresponding "loading" state class name. The idea being that the markup |
|
213 for this widget is already on the page, and the JS components required |
|
214 to transform/bring the widget to life are in the process of loading. |
|
215 |
|
216 2. Providing the definition of the loading style for the widget(s). |
|
217 |
|
218 * Removed parentNode.inDoc() check from render, to allow implementations |
|
219 to render to parentNodes which are document fragments. If rendering to |
|
220 a document fragment, the implementation is responsible for adding the |
|
221 document fragment to the document during the render lifecycle phase. |
|
222 |
|
223 * Split widget module into the following sub-modules |
|
224 |
|
225 1. widget-base : Core lifecycle and API support. |
|
226 2. widget-htmlparser : HTML parser support. |
|
227 |
|
228 The "widget" module, is a roll up of the widget-base and widget-htmlparser |
|
229 submodules. |
|
230 |
|
231 The widget-locale is a standalone module, which contains the deprecated |
|
232 Internationalization support and has been replaced by the Y.Intl language |
|
233 pack support, to allow strings to be defined separately from code. |
|
234 |
|
235 * Removed moveStyles support for 3.1. Can be re-added if required, but |
|
236 currently does not seem to be in use. |
|
237 |
|
238 * Made render event fireOnce (along with init and destroy in Base) |
|
239 |
|
240 * Widget will now fire user-generated events like DOM elements do (e.g. |
|
241 'click', 'mouseover'). Like all other Widget events, these events are |
|
242 prefixed with the Widget name (e.g. 'menuitem:click') and the default |
|
243 context of the event listener will be the Widget that fired the event. |
|
244 |
|
245 The goals/purpose of the Widget UI events are: |
|
246 |
|
247 1. Provide developers with the ability to listen for UI events as though the |
|
248 Widget is an atomic element, as opposed to DOM events that will bubble up |
|
249 through all of the elements that compose a Widget's UI. |
|
250 |
|
251 2. These are events that many Widget instances are going to want to publish |
|
252 and fire, so Widget does this by default to ensure that these events are |
|
253 fired in a performant, consistent way across Widget implementations. |
|
254 |
|
255 Additional info: |
|
256 |
|
257 1. Widget developers don't have to explicitly publish a given UI event in |
|
258 order for Widget consumers to listen for them. By default UI events are |
|
259 only published and fired if someone is listening for them. |
|
260 |
|
261 2. Widget developers can choose to publish a given UI event in order to |
|
262 explicitly control some aspect of the event. The most likely use case |
|
263 is the desire to provide the default implementation/handler for a given |
|
264 event. For example: a developer might want to publish a click event |
|
265 for a Menu Widget with the goal of providing the default click |
|
266 implementation/function (what gets canceled if a listener calls |
|
267 the preventDefault() method.) |
|
268 |
|
269 3. The set of user-generated events published by widget is defined by the |
|
270 UI_EVENTS prototype property. Widget developers can use this property |
|
271 to pair down or extend the number of events that are published and |
|
272 fired automatically. |
|
273 |
|
274 4. For performance, these events are only created when someone is |
|
275 listening, and the actual firing of these events is facilitated by a |
|
276 single, delegated DOM event listener. |
|
277 |
|
278 * content box now expands to fill bounding box. CSS is used for browsers |
|
279 which support box-sizing:border-box. Expansion is handled programmatically |
|
280 for others (currently IE6 & IE7). Maybe some edge cases which need |
|
281 resolution. |
|
282 |
|
283 * Added an "id" attribute. |
|
284 |
|
285 * Added support for auto-rendering of widgets at the end of construction, |
|
286 using the "render" attribute. |
|
287 |
|
288 * Added support for single-box widgets (contentBox and boundingBox can |
|
289 point to same node). |
|
290 |
|
291 Widget developers can set CONTENT_TEMPLATE to null if they have a |
|
292 widget which doesn't need dual-box support. |
|
293 |
|
294 * Added _bindAttrUI and _syncAttrUI sugar methods, to bind after listeners |
|
295 and sync methods, by attribute name. |
|
296 |
|
297 * The widget's bounding box is now removed from the DOM and destroyed |
|
298 when the widget it destroyed. |
|
299 |
|
300 * Added "srcNode" attribute, which acts as the root for HTML_PARSER. |
|
301 |
|
302 This allows widgets to support progressive enhancement, without having |
|
303 to put the burden on the user to create and point to bounding boxes, |
|
304 or content boxes. |
|
305 |
|
306 * Added protected _getSrcNode and _applyParsedConfig methods to allow for |
|
307 HTML_PARSER customization, by allowing Widget developers to customize |
|
308 the node passed into _parseNode on the input side, and the final merged |
|
309 configuration on the output side of the srcNode parsing process. |
|
310 |
|
311 The default Widget _getSrcNode implementation uses "srcNode" if set, |
|
312 otherwise falls back to "contentBox", for 3.0.0 compatibility. |
|
313 |
|
314 The default Widget _applyParsedConfig implementation aggregates the user |
|
315 configuration literal, with the configuration output from parsed node, |
|
316 with the user configuration taking precedence. |
|
317 |
|
318 NOTE: All HTML_PARSER related changes are backward compatible. |
|
319 |
|
320 Existing Widget implementations should still work. However HTML_PARSER |
|
321 implementations based on contentBox being the root node should be |
|
322 modified to work off of srcNode before the 3.1.0 release. |
|
323 |
|
324 3.0.0 |
|
325 ----- |
|
326 |
|
327 * No Changes |
|
328 |
|
329 3.0.0 beta 1 |
|
330 ------------ |
|
331 |
|
332 * PluginHost moved down to Base. |
|
333 |
|
334 * Render event args added to event facade instead of being passed |
|
335 across separately (e.parentNode). |
|
336 |
|
337 * "hasFocus" attribute renamed to "focused" |
|
338 |
|
339 * "focused" attribute is read only |
|
340 |
|
341 * "focused" attribute is set via: |
|
342 1. user interaction |
|
343 2. the "focus" and "blur" methods |
|
344 |
|
345 * Only one DOM focus event handler is used now (two for WebKit) and it is |
|
346 bound to the widget's ownerDocument. This allows modal widgets to maintain |
|
347 a reference to the element in the document that previously had focus and |
|
348 to be able to restore that focus when the modal widget is hidden. |
|
349 |
|
350 * "tabIndex" attribute was updated |
|
351 1. accepts a number or null |
|
352 2. more documentation |
|
353 |
|
354 3.0.0PR2 - Initial release |
|
355 -------------------------- |
|
356 |