Unpoly 3.2.0 released #498
triskweline
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Addressing an important caching issue
Unpoly 3.2.0 no longer cache responses with an empty body (fixes #497). In particular responses with
304 Not Modifiedare no longer cached when using conditional requests.As this issue could cause errors when rendering, we recommend all Unpoly 3 users to upgrade.
Using the server response that closed an overlay
When an overlay closes in reaction to a server response, no content from that response is rendered.
Sometimes you do need to access the discarded response, e.g. to render its content in another layer.
For this you can now access response via the
{ response }property of theup:layer:acceptedandup:layer:dismissedevents.For example, the link link opens an overlay with a form to create a new company (
/companies/new).After successful creation the form redirects to the list of companies (
/companies). In that casewe can use the HTML from the response and render it into the parent layer:
The
{ response }property is available whenever a server response causes an overlay to close:Rendering
up.ResponseobjectsIf you have manually fetched content from the server, you can now pass an
up.Responseobject as a{ response }option to render its contents:The various ways to provide HTML to rendering functions are now summarized on a new documentation page.
Other changes
You can now use
[up-href]without also setting[up-follow]or[up-target](fixes up-href in table row (tr) not working #489).Date inputs are again validated on
changeinstead ofblur.In Unpoly 3.0 this defaulted to
blurbecause desktop date pickers emit achangeevent whenever the user changes a date component (day, month, year). Unfortunately this change caused issues with mobile date pickers as well as JavaScript date pickers (resolves up-validate on input[type=date] with flatpicker not working since 3.x #488, reverts [up-validate] on input[type=date] should run callback on blur event, not change event #336).If you prefer validating on
blur, you can restore the behavior of Unpoly 3.0 by configuringup.form.config.watchChangeEvents.Rendering functions now have a better error message when referring to detached elements or when referring to non-existing layers.
The results of
up.Response#fragmentsare no longer cached to preserve memory.Beta Was this translation helpful? Give feedback.
All reactions