htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Extensions documentation could make need for hx-ext clearer

Open ChrisJefferson opened this issue 1 year ago • 3 comments

Via google I landed on the manual page for 'response-targets', which did exactly what I want.

For a while I couldn't get it to work, because I'd never used an extension before, and didn't carefully every bit, so I didn't understand how important hx-ext was.

How about, under "install" in each extension, after the "Install" line, adding a line that says something like:

All extensions must be [enabled](@/extensions/_index.md) using [hx-ext](@/attributes/hx-ext.md) before that can be used.

Just to point people towards this important thing they must read (I'm linking to both extensions, and ht-ext, as those are I think the two most useful pages?)

I'm happy to make a PR, just wanted to check what people thought before I bothered going through all the extension pages.

ChrisJefferson avatar Apr 09 '24 06:04 ChrisJefferson

It would be great if response-targets was part of the main htmx library. It's the only way to error handle HTTP requests, which I think should be done with every request. But anyway, I forgot I need that hx-ext tag attribute as well.

glossd avatar Oct 18 '24 12:10 glossd

Forgot to answer back then @ChrisJefferson , but sure feel free to open a documentation improvement PR!

Telroshan avatar Oct 19 '24 07:10 Telroshan

@ChrisJefferson and @glossd, I have created a PR significantly elaborating the instructions of setting up HTMX extensions. Based on your inputs, I have made the importance of enabling the extensions with the hx-ext tag more visible and repeated it multiple times.

The PR: https://github.com/bigskysoftware/htmx/pull/3078

Skjermbilde 2024-12-19 kl  22 02 53 image

Similar communication is used in the dedicate pages of the core extensions.

I hope you like it and we can close this issue after the PR is merged.

marisst avatar Dec 19 '24 21:12 marisst