Skip to content

Commit

Permalink
final 1.8 release docs
Browse files Browse the repository at this point in the history
  • Loading branch information
1cg committed Jul 12, 2022
1 parent 1aafebb commit 71fe07b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Changelog

## [1.8.0] - 2022-02-2
## [1.8.0] - 2022-12-7

* **NOTE**: This release involved some changes to toughy code (e.g. history support) so please test thoroughly and let
us know if you see any issues
* Boosted forms now will automatically push URLs into history as with links. The [response URL](https://caniuse.com/mdn-api_xmlhttprequest_responseurl)
detection API support is good enough that we feel comfortable making this the default now.
* If you do not want this behavior you can add `hx-push-url='false'` to your boosted forms
Expand All @@ -26,7 +28,7 @@
* The new [`hx-select-oob`](/attributes/hx-select-oob) attribute selects one or more elements from a server response to swap in via an out of band swap
* The new [`hx-replace-url`](/attributes/hx-replace-url) attribute can be used to replace the current URL in the location
bar (very similar to `hx-push-url` but no new history entry is created). The corresponding `HX-Replace-Url` response header can be used as well.

* htmx now properly handles anchors in both boosted links, as well as in `hx-get`, etc. attributes

## [1.7.0] - 2022-02-2

Expand Down
2 changes: 1 addition & 1 deletion www/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The fastest way to get going with htmx is to load it via a CDN. You can simply a
and get going:

```html
<script src="https://unpkg.com/htmx.org@1.8.0" integrity="sha384-5E+Co5ie/XIACKwNQjPfFULJgKAUhwiDl/3mqw1VTS8Nda7gGMSfYyxkob8SVqUM" crossorigin="anonymous"></script>
<script src="https://unpkg.com/htmx.org@1.8.0" integrity="sha384-cZuAZ+ZbwkNRnrKi05G/fjBX+azI9DNOkNYysZ0I/X5ZFgsmMiBXgDZof30F5ofc" crossorigin="anonymous"></script>
```

While the CDN approach is extremely simple, you may want to consider [not using CDNs in production](https://blog.wesleyac.com/posts/why-not-javascript-cdn).
Expand Down
46 changes: 46 additions & 0 deletions www/posts/2022-07-12-htmx-1.8.0-is-released.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: layout.njk
tags: ['posts', 'announcements']
title: htmx 1.8.0 has been released!
date: 2022-07-12
---

## htmx 1.8.0 Release

I'm happy to announce the [1.8.0 release](https://unpkg.com/browse/htmx.org@1.8.0/) of htmx.

**NOTE:** This was a big release with some changes to very touchy code that is hard to test (e.g. history support) so
please test thoroughly and let us know if there are any issues.

### New Features

* The [`hx-replace-url`](https://htmx.org/attributes/hx-replace-url) attribute was introduced, allowing you to replace
the current URL in history (to complement `hx-push-url`)
* `m` is now a valid timing modifier (e.g. `hx-trigger="every 2m"`)
* `next` and `previous` are now valid extended query selector modifiers, e.g. `hx-target="next div"` will target the
next div from the current element
* The `HX-Location` response header now implements client-side redirects entirely within htmx
* The `HX-Reswap` response header allows you to change the swap behavior of htmx
* The new [`hx-select-oob`](/attributes/hx-select-oob) attribute selects one or more elements from a server response to swap in via an out of band swap
* The new [`hx-replace-url`](/attributes/hx-replace-url) attribute can be used to replace the current URL in the location
bar (very similar to `hx-push-url` but no new history entry is created). The corresponding `HX-Replace-Url` response header can be used as well.

### Improvements & Bug fixes

* Boosted forms now will automatically push URLs into history as with links. The [response URL](https://caniuse.com/mdn-api_xmlhttprequest_responseurl)
detection API support is good enough that we feel comfortable making this the default now.
* If you do not want this behavior you can add `hx-push-url='false'` to your boosted forms
* If htmx is included in a page more than once, we do not process elements multiple times
* When localStorage is not available we do not attempt to save history in it
* `hx-boost` will boost anchor tags with a `_self` target
* The `load` event now properly supports event filters
* The websocket extension has had many improvements: (A huge thank you to Denis Palashevskii, our newest committer on the project!)
* Implement proper `hx-trigger` support
* Expose trigger handling API to extensions
* Implement safe message sending with sending queue
* Fix `ws-send` attributes connecting in new elements
* Fix OOB swapping of multiple elements in response
* htmx now properly handles anchors in both boosted links, as well as in `hx-get`, etc. attributes
* Many, many documentation updates (thank you to all the contributors!)

Enjoy!

0 comments on commit 71fe07b

Please sign in to comment.