Skip to content

Commit 30dfa95

Browse files
authored
Merge pull request #36 from michalsn/prepare-release
Prepare release 1.2.0
2 parents c03b86b + 984a735 commit 30dfa95

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
55

6+
## [1.2.0](https://github.com/michalsn/codeigniter-htmx/compare/v1.1.0...v1.2.0) - 2023-06-06
7+
8+
### Enhancements
9+
- Add support for displaying the Debug Toolbar after `htmx` request.
10+
11+
### Changed
12+
- The added JavaScript is now placed in the `head` tag.
13+
614
## [1.1.0](https://github.com/michalsn/codeigniter-htmx/compare/v1.0.0...v1.1.0) - 2023-01-10
715

816
### Enhancements

docs/debug_toolbar.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
# Debug Toolbar
22

3-
Although the Debug Toolbar rendering is disabled for HTMX requests, you can still access the toolbar
4-
for a given request by checking the URL in the `debugbar-link` response header.
3+
As long as you **don't use** the [head-support](https://htmx.org/extensions/head-support/) extension,
4+
the Debug Toolbar should work out of the box. It will be updated after every request, so please remember
5+
it will only display the latest information. If you want to see what happened in earlier request,
6+
use the `History` tab in the Toolbar.
57

6-
### Other options
7-
8-
Alternatively, if you're rendering content only inside the `body` tag, you can use the snippet below.
9-
10-
```js
11-
htmx.on('htmx:afterRequest', function (ev) {
12-
let debugBarTime = ev.detail.xhr.getResponseHeader("debugbar-time");
13-
if (debugBarTime !== null) {
14-
loadDoc(debugBarTime);
15-
}
16-
});
17-
```
18-
19-
It will cause the Debug Toolbar, rendered by the "regular" request, to be automatically
20-
replaced which information from the current HTMX request.
8+
If you're using the `head-support` extension then the Debug Toolbar rendering will not work for `htmx` requests.
9+
You can still access the toolbar for a given request by checking the URL in the `debugbar-link` response header.

0 commit comments

Comments
 (0)