Skip to content

Some fixes to the HTMX module #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 10, 2025
Merged

Some fixes to the HTMX module #41

merged 4 commits into from
Apr 10, 2025

Conversation

gerdint
Copy link
Contributor

@gerdint gerdint commented Apr 10, 2025

I'm not converting page and ui to macros in the interest of speed, but the previous versions didn't handle correctly the case when you pass an opts-map to the functions (since the spliced content is passed as a single parameter to html5 macros).
If you could apply a macro I would have gone for that, but don't know of any other obvious way to accomplish this.

Also, in the case of current Hiccup2 the html function returns a compiled representation, not a string. I don't think the former is a valid Ring response body type.

Re the last commit, I think 'ui' is too generic a name. 'Pagelet' actually seems to be an established term for these kind of partial pages (and it's sounds much cuter).

gerdint added 4 commits April 10, 2025 16:39
Hyperscript is not used on the page and Hyperscript as such is only one of many different scripting options used with HTMX (and arguably the least popular I think). Vanilla js or Alpine.js would be better defaults if scripting is needed I think.
@yogthos yogthos merged commit 6905ad5 into kit-clj:master Apr 10, 2025
@gerdint gerdint deleted the htmx-fix branch April 10, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants