Changelog ========= Changes to this project will be documented in this file. This project mostly adheres to [Semantic Versioning](http://semver.org/). 0.53.2 ------ ### General - Failed requests in event handlers of CSS selectors like `form[up-target]` no longer print `Uncaught (in promise)` to the error console. You still need to catch and handle rejected promises in your own code when it calls Unpoly functions. ### Animated transitions - Fix a bug where a page transition would flicker if [revealing](/up.reveal) was animated globally by setting `up.layout.config.duration`. ### Preloading - Fix a bug where [preloading](/a-up-target) would not always be aborted when stopping to hover before [`up.proxy.config.preloadDelay`](/up.proxy.config#up.proxy.config.preloadDelay). 0.53.1 ------ ### General - Fix a bug where replacing the first element on the page (in DOM order) would shift the scroll position if animation is disabled. - Fix a bug where query params would be lost when Unpoly would fall back to a full page load. ### Optional server protocol - The optional cookie the server can send to [signal the initial request method](/up.protocol#signaling-the-initial-request-method) will now be removed as soon as Unpoly has booted. ### Animations - Fix a bug where the animation `move-from-top` would finish instantly after animating with `move-to-top`. - Fix a bug where the animation `move-from-right` would finish instantly after animating with `move-to-right`. - Fix a bug where the animation `move-from-bottom` would finish instantly after animating with `move-to-bottom`. - Fix a bug where the animation `move-from-left` would finish instantly after animating with `move-to-left`. 0.53.0 ------ ### New module: Passive updates Thi work-in-progress package [`up.radio`](/up.radio) will contain functionality to passively receive updates from the server. Currently the following functionality is implemented: - Elements with an [`[up-hungry]`](/up-hungry) attribute are [updated](/up.replace) whenever there is a matching element found in a successful response. The element is replaced even when it isn't [targeted](/a-up-target) directly. Use cases for this are unread message counters or notification flashes. Such elements often live in the layout, outside of the content area that is being replaced. - When a reserver response contains a `` or `` element, it is automatically updated in the current page. ### General - Changes when generating CSS selectors for elements: - `[aria-label]` attributes are used if no better attributes exist (like `[id]` or `[up-id]` attributes). - Attribute values with quotes are now escaped if they appear in an attribute selector. - Attribute selectors now use double quotes instead of single quotes. - When a `[name]` attribute is used, the tag name is also used. E.g. `meta[name="csrf-token"]`. - Element IDs that contain non-word characters (e.g. slashes, spaces, dots), will now generate an attribute selector like `[id="foo/bar"]`. ### Forms - You can give forms an `[up-fail-reveal]` attribute to indicate which element should be [revealed](/up.reveal) when the server responds with an error. You may use this, for example, to reveal the first validation error message: ```
...
``` - Forms with an `[up-reveal]` attribute will now only honor the attribute when the form submission was successful. - Forms with an `[up-restore-scroll]` attribute will now only honor the attribute when the form submission was successful. - Forms with an `[up-reveal="css-selector"]` attribute will no longer crash when the selector could not be found. - Fix a bug where you couldn't submit a form if it's ID contains a slash character ([#46](https://github.com/unpoly/unpoly/issues/46)). ### Links - You can give links an `[up-fail-reveal]` attribute to indicate which element should be [revealed](/up.reveal) when the server responds with an error - Links with an `[up-reveal]` attribute will now only honor the attribute when the link could be followed successfully. - Links with an `[up-restore-scroll]` attribute will now only honor the attribute when the link could be followed successfully. - Links with an `[up-reveal="css-selector"]` attribute will no longer crash when the selector could not be found. ### Animations - When [replacing](/up.replace) multiple elements, it is no longer possible to use different [transitions](/up.morph) for each element. The same transition is always applied to all elements. 0.52.0 ------ ### Browser support - No longer prints an error to console when registering a [macro](/up.macro) on an unsupported browser. ### AJAX requests - Unpoly can now detect the final URL of a redirect response without the [optional server protocol](/up.protocol). The server protocol is still needed to detect redirects on Internet Explorer 11. - When making HTTP requests Unpoly will now always merge params in the URL's query section with params from the `{ data }` option. ### Forms - [Following](/up.follow) a link now emits an [`up:link:follow`](/up:link:follow) event. The event can be prevented. ### Forms - [Submitting](/up.submit) a form through Unpoly now emits an [`up:form:submit`](/up:form:submit) event. The event can be prevented. 0.51.1 ------ ### Fragment updates - Fix a bug where Unpoly would crash when replacing a fragment with a `