|
1 App Framework Change History |
|
2 ============================ |
|
3 |
|
4 3.10.3 |
|
5 ------ |
|
6 |
|
7 * No changes. |
|
8 |
|
9 3.10.2 |
|
10 ------ |
|
11 |
|
12 ### Router |
|
13 |
|
14 * Router now properly dispatches when using hash-based URLs and calling |
|
15 `replace()` without arguments; before it would throw an error. [#739] |
|
16 |
|
17 |
|
18 3.10.1 |
|
19 ------ |
|
20 |
|
21 * No changes. |
|
22 |
|
23 |
|
24 3.10.0 |
|
25 ------ |
|
26 |
|
27 ### Model |
|
28 |
|
29 * Fixed: The `options` object passed to Model's `setAttrs()` method was being |
|
30 modified. Now a shallow copy of this object is now created so that the |
|
31 `_transaction` property is added to the copy and not the passed-in object. |
|
32 [#598] |
|
33 |
|
34 |
|
35 3.9.1 |
|
36 ----- |
|
37 |
|
38 ### LazyModelList |
|
39 |
|
40 * Fixed: Changing an attribute on a revived model did not update the |
|
41 corresponding property on the original object. [#528] [Ryan Grove] |
|
42 |
|
43 * Fixed: Revived models didn't have the same `clientId` as the original object. |
|
44 [#530] [Ryan Grove] |
|
45 |
|
46 ### Router |
|
47 |
|
48 * Added a more helpful error when a named route callback function doesn't exist. |
|
49 [#513] [Ryan Grove] |
|
50 |
|
51 |
|
52 3.9.0 |
|
53 ----- |
|
54 |
|
55 ### App |
|
56 |
|
57 * Applied the same changes from CSS Grids to App Transitions to support changes |
|
58 in how Chrome 25 renders `word-spacing`. |
|
59 |
|
60 |
|
61 3.8.1 |
|
62 ----- |
|
63 |
|
64 * No changes. |
|
65 |
|
66 |
|
67 3.8.0 |
|
68 ----- |
|
69 |
|
70 ### Router |
|
71 |
|
72 * Decode URL-encoded path matches for Router's `req.params`. [Ticket #2532941] |
|
73 |
|
74 |
|
75 3.7.3 |
|
76 ----- |
|
77 |
|
78 ### App |
|
79 |
|
80 * Add support for App Transitions in browsers which support native CSS3 |
|
81 transitions without using vendor prefixes. This change means IE10 and Opera |
|
82 get view transitions. |
|
83 |
|
84 |
|
85 3.7.2 |
|
86 ----- |
|
87 |
|
88 * No changes. |
|
89 |
|
90 |
|
91 3.7.1 |
|
92 ----- |
|
93 |
|
94 * No changes. |
|
95 |
|
96 |
|
97 3.7.0 |
|
98 ----- |
|
99 |
|
100 ### App |
|
101 |
|
102 * Added App.Content, an App extension that provides pjax-style content fetching |
|
103 and handling, making it seamless to use a mixture of server and client |
|
104 rendered views. |
|
105 |
|
106 ### Model |
|
107 |
|
108 * Added custom response parsing to ModelSync.REST to make it easy for developers |
|
109 to gain access to the full `Y.io()` response object. Developers using |
|
110 ModelSync.REST can either assign the `parseIOResponse` property to `false` to |
|
111 gain access to the full `Y.io()` response object in their `parse()` method, |
|
112 or provide a custom implementation of the `parseIOResponse()` method. |
|
113 |
|
114 * ModelSync.REST's `serialize()` method now receives the `action` which the |
|
115 `sync()` method was invoked with. [Ticket #2532625] |
|
116 |
|
117 ### ModelList |
|
118 |
|
119 * You may now add models to a ModelList at instantiation time by providing an |
|
120 Object, array of Objects, Model instance, array of Model instances, or another |
|
121 ModelList instance in the `items` property of the config object passed to |
|
122 ModelList's constructor. This change also applies to LazyModelList. |
|
123 |
|
124 ### Router |
|
125 |
|
126 * Added support for route-based middleware to Router. The `route()` method now |
|
127 accepts an arbitrary number of callbacks enabling more reuse of routing code. |
|
128 For people familiar with Express.js' route middleware, this behaves the same. |
|
129 [Ticket #2532620] |
|
130 |
|
131 ### View |
|
132 |
|
133 * Log a warning when a handler function is not present when a view's `events` |
|
134 are being attached. [Ticket #2532326] [Jay Shirley, Jeff Pihach] |
|
135 |
|
136 |
|
137 3.6.0 |
|
138 ----- |
|
139 |
|
140 ### App |
|
141 |
|
142 * Added static property: `Y.App.serverRouting`, which serves as the default |
|
143 value for the `serverRouting` attribute of all apps. [Ticket #2532319] |
|
144 |
|
145 * Fixed issue with non-collapsing white space between views while transitioning. |
|
146 White space is now fully collapsed and prevents views from jumping after a |
|
147 cross-fade transition. [Ticket #2532298] |
|
148 |
|
149 * Organized all CSS classes `Y.App` uses under a static `CLASS_NAMES` property. |
|
150 |
|
151 * Moved `transitioning` CSS classname under `Y.App.CLASS_NAMES`. |
|
152 |
|
153 ### Model |
|
154 |
|
155 * Added ModelSync.REST, an extension which provides a RESTful XHR `sync()` |
|
156 implementation that can be mixed into a Model or ModelList subclass. |
|
157 |
|
158 ### ModelList |
|
159 |
|
160 * Added LazyModelList, a subclass of ModelList that manages a list of plain |
|
161 objects rather than a list of Model instances. This can be more efficient when |
|
162 working with large numbers of items. [Ryan Grove] |
|
163 |
|
164 * The `add()` method now accepts an `index` option, which can be used to insert |
|
165 the specified model(s) at a specific index in the list. [Greg Hinch] |
|
166 |
|
167 * The `each()` and `some()` methods now iterate over a copy of the list, so it's |
|
168 safe to remove a model during iteration. [Ticket #2531910] |
|
169 |
|
170 * The `remove()` method now optionally accepts the index of a model to remove |
|
171 (or an array of indices). You no longer need to specify the actual model |
|
172 instance(s), although that's still supported as well. |
|
173 |
|
174 * The `filter()` method now returns an instance of the subclass rather than |
|
175 ModelList itself when called with `options.asList` set to `true` on a subclass |
|
176 of ModelList. [Ryan Grove] |
|
177 |
|
178 * Fixed an issue where a list that received bubbled events from a model would |
|
179 assume the model was in the list if its `id` changed, even if the model |
|
180 actually wasn't in the list and was merely bubbling events to the list. |
|
181 [Ticket #2532240] |
|
182 |
|
183 ### Router |
|
184 |
|
185 * [!] Changed how hash-based paths interact with the URL's real path. The |
|
186 path-like hash fragments are now treated as a continuation of the URL's path |
|
187 when the router has been configured with a `root`. [Ticket #2532318] |
|
188 |
|
189 * Fixed issue when multiple routers are on the page and one router is destroyed |
|
190 the remaining routers would stop dispatching. [Ticket #2532317] |
|
191 |
|
192 * Fixed a multi-router issue where creating a router instance after a previous |
|
193 router's `save()`/`replace()` method was called would cause in infinite |
|
194 History replace loop. [Ticket #2532340] |
|
195 |
|
196 * The `req` object passed to routes now has a `pendingRoutes` property that |
|
197 indicates the number of matching routes after the current route in the |
|
198 dispatch chain. [Steven Olmsted] |
|
199 |
|
200 * Added a static `Y.Router.dispatch()` method which provides a mechanism to |
|
201 cause all active router instances to dispatch to their route handlers without |
|
202 needing to change the URL or fire the `history:change` or `hashchange` event. |
|
203 |
|
204 |
|
205 3.5.1 |
|
206 ----- |
|
207 |
|
208 ### App |
|
209 |
|
210 * Added `render` and `update` options to the `showView()` method. |
|
211 [PR #100 Pat Cavit] |
|
212 |
|
213 ### Router |
|
214 |
|
215 * Added a `removeQuery()` function that accepts a URL and returns it without a |
|
216 query string (if it had one). [Pat Cavit] |
|
217 |
|
218 * Fixed `hasRoute()` failing to match routes with query params. [Pat Cavit] |
|
219 |
|
220 * Fixed bad route regex generation if a placeholder was the last thing in the |
|
221 route. [Pat Cavit] |
|
222 |
|
223 * Fixed generated route regexes matching hash/query params when they shouldn't |
|
224 have. [Pat Cavit] |
|
225 |
|
226 |
|
227 3.5.0 |
|
228 ----- |
|
229 |
|
230 ### App |
|
231 |
|
232 * Initial release. |
|
233 |
|
234 ### Model |
|
235 |
|
236 * [!] The `validate()` method is now asynchronous, and is expected to call a |
|
237 callback function on success or failure. Old-style synchronous `validate()` |
|
238 methods will still work, but are deprecated. [Ticket #2531218] |
|
239 |
|
240 * Model now supports ad-hoc attributes, which means it's no longer necessary to |
|
241 subclass `Y.Model` and declare attributes ahead of time. The following is now |
|
242 perfectly valid, and will result in a model instance with "foo" and "bar" |
|
243 attributes: |
|
244 |
|
245 var model = new Y.Model({foo: 'foo', bar: 'bar'}); |
|
246 |
|
247 * `load()` now fires a `load` event after the operation completes successfully, |
|
248 or an `error` event on failure. The `load()` callback (if provided) will still |
|
249 be called in both cases. [Ticket #2531207] |
|
250 |
|
251 * `save()` now fires a `save` event after the operation completes successfully, |
|
252 or an `error` event on failure. The `save()` callback (if provided) will still |
|
253 be called in both cases. [Ticket #2531207] |
|
254 |
|
255 * Options passed to `set()` and `setAttrs()` are now correctly merged into the |
|
256 event facade of the `change` event. [Ticket #2531492] |
|
257 |
|
258 * Model's `destroy` event is now fully preventable (previously it was possible |
|
259 for the model to be deleted even if the `destroy` event was prevented by a |
|
260 subscriber in the `on` phase). |
|
261 |
|
262 ### ModelList |
|
263 |
|
264 * ModelList's `model` property is now set to `Y.Model` by default. Since |
|
265 `Y.Model` now supports ad-hoc attributes, this makes it much easier to create |
|
266 and populate a ModelList without doing any subclassing: |
|
267 |
|
268 var list = new Y.ModelList(); |
|
269 |
|
270 list.add([ |
|
271 {foo: 'bar'}, |
|
272 {baz: 'quux'} |
|
273 ]); |
|
274 |
|
275 * Added a `filter()` method that returns a filtered array of models or, |
|
276 optionally, a new ModelList containing the filtered models. [Ticket #2531250] |
|
277 |
|
278 * Added a `create` event that fires when a model is created/updated via the |
|
279 `create()` method, but before that model has actually been saved and added to |
|
280 the list (and before the `add` method has fired). [Ticket #2531400] |
|
281 |
|
282 * Added a `load` event that fires when models are loaded. [Ticket #2531399] |
|
283 |
|
284 * Models' `id` attributes (if set) are now used to enforce uniqueness. If you |
|
285 attempt to add a model to the list that has the same id as another model in |
|
286 the list, an `error` event will be fired and the model will not be added. |
|
287 [Ticket #2531409] |
|
288 |
|
289 * The `add()`, `remove()` and `reset()` methods now accept other ModelList |
|
290 instances in addition to models and arrays of models. For example, passing a |
|
291 ModelList to `add()` will add all the models in that list to this list as |
|
292 well. [Ticket #2531408] |
|
293 |
|
294 * ModelList now allows you to add models to the list even if they were |
|
295 instantiated in another window or another YUI sandbox. [Ticket #2531543] |
|
296 |
|
297 * ModelList subclasses can now override the protected `_compare()` method to |
|
298 customize the low-level comparison logic used for sorting. This makes it easy |
|
299 to do things like descending sort, multi-field sorting, etc. See the API docs |
|
300 for details. |
|
301 |
|
302 * The `reset()` method now allows the caller-provided options object to override |
|
303 the `src` property that's passed on the event facade of the `reset` event. |
|
304 [Ticket #2531888] |
|
305 |
|
306 ### Router (formerly Controller) |
|
307 |
|
308 * [!] The `Controller` class and `controller` module have been renamed to |
|
309 `Router` and `router` respectively. The old names are deprecated, but have |
|
310 been retained as aliases for backwards compatibility. They will be removed |
|
311 in a future version of YUI. |
|
312 |
|
313 * [!] The `html5`, `root`, and `routes` properties are now attributes, and |
|
314 `routes` may be set both during and after init. Code that refers to the old |
|
315 properties, like `myController.root` and `myController.root = '/foo'`, must be |
|
316 updated to use the attribute syntax instead: `myRouter.get('root')` and |
|
317 `myRouter.set('root', '/foo')`. |
|
318 |
|
319 * [!] The signature for route handlers has changed. Route handlers now receive |
|
320 three arguments: `req`, `res`, and `next`. To preserve backcompat, `res` is a |
|
321 function that, when executed, calls `next()`. This behavior is deprecated and |
|
322 will be removed in a future version of YUI, so please update your route |
|
323 handlers to expect `next` as the third param. |
|
324 |
|
325 * `"*"` can now be used to create a wildcard route that will match any path |
|
326 (previously it was necessary to use a regex to do this). Additionally, paths |
|
327 which contain a `"*"` (e.g., `"/users/*"`) act as a wildcard matching |
|
328 everything after it. |
|
329 |
|
330 * The `hasRoute()` method now accepts full URLs as well as paths. |
|
331 |
|
332 * The hashes used when `html5` is `false` are now root-less; the router's `root` |
|
333 is removed from the hash before it is set on the URL. |
|
334 |
|
335 * When multiple Router instances exist on a page, calling `save()` in one will |
|
336 now cause matching routes to be dispatched in all routers, rather than only |
|
337 the router that was the source of the change. |
|
338 |
|
339 * Added `url` and `src` properties to the request object that's passed to route |
|
340 handlers. |
|
341 |
|
342 * Made the `html5` config attribute writable. This allows you to force a router |
|
343 to use (`true`) or not use (`false`) HTML5 history. Please don't set it to |
|
344 `false` unless you understand the consequences. |
|
345 |
|
346 * Added a workaround for a nasty iOS 5 bug that destroys stored references to |
|
347 `window.location` when the page is restored from the page cache. We already |
|
348 had a workaround in place since this issue is present in desktop Safari as |
|
349 well, but the old workaround no longer does the trick in iOS 5. |
|
350 [Ticket #2531608] |
|
351 |
|
352 ### View |
|
353 |
|
354 * [!] The `container`, `model`, and `modelList` properties are now attributes. |
|
355 Code that refers to the old properties, like `myView.model` and |
|
356 `myView.model = model`, must be updated to use the attribute syntax instead: |
|
357 `myView.get('model')` and `myView.set('model', model)`. |
|
358 |
|
359 * [!] The `container` attribute now treats string values as CSS selectors. |
|
360 Previously, it assumed string values represented raw HTML. To get the same |
|
361 functionality as the old behavior, pass your HTML string through |
|
362 `Y.Node.create()` before passing it to `container`. |
|
363 |
|
364 * [!] Destroying a view no longer also destroys the view's container node by |
|
365 default. To destroy a view's container node when destroying the view, pass |
|
366 `{remove: true}` to the view's `destroy()` method. [Ticket #2531689] |
|
367 |
|
368 * View now supports ad-hoc attributes, which means it's no longer necessary to |
|
369 subclass `Y.View` and declare attributes ahead of time. The following is now |
|
370 perfectly valid, and will result in a view instance with "foo" and "bar" |
|
371 attributes: |
|
372 |
|
373 var view = new Y.View({foo: 'foo', bar: 'bar'}); |
|
374 |
|
375 * Added a `containerTemplate` property that contains an HTML template used to |
|
376 create a container node when one isn't specified. Defaults to "<div/>". |
|
377 |
|
378 * When no `container` node is specified at instantiation time, the container |
|
379 won't be created until it's needed. `create()` is now only used to create a |
|
380 default container; it's never called when a custom container node is |
|
381 specified. |
|
382 |
|
383 * Added a View extension, `Y.View.NodeMap`, that can be mixed into a `View` |
|
384 subclass to provide a static `getByNode()` method that returns the nearest |
|
385 View instance associated with a given Node (similar to `Widget.getByNode()`). |
|
386 |
|
387 |
|
388 3.4.1 |
|
389 ----- |
|
390 |
|
391 ### Controller |
|
392 |
|
393 * Added a workaround for an iOS 4 bug that causes the previous URL to be |
|
394 displayed in the location bar after calling `save()` or `replace()` with a |
|
395 new URL. |
|
396 |
|
397 * Fixed a bug that caused the controller to get stuck in a "dispatching" state |
|
398 if `save()` was called with no routes defined. |
|
399 |
|
400 ### Model |
|
401 |
|
402 * The `validate()` method is now only called when `save()` is called, rather |
|
403 than on every attribute change. If validation fails, the save operation will |
|
404 be aborted. |
|
405 |
|
406 |
|
407 3.4.0 |
|
408 ----- |
|
409 |
|
410 * Initial release. |