hey folks, i'm the creator of htmx
this isn't much of a feature upgrade, but we took the opportunity to clean up a few things and drop IE support, which will help us slim down the library over time
hopefully it's an easy upgrade for most htmx users, upgrade guide is here:
https://htmx.org/migration-guide-htmx-1/
happy to answer any questions
Does this release have head-support built in or still requires an extension? I thought 2.0 was going to release with head support...
we went back and forth on it but ultimately concluded that it bloated the core too much so we kept it as an extension
https://htmx.org/extensions/head-support/
is returning 404.
Looks like it moved to here
https://extensions.htmx.org/
But this is weirdly hard to find on the new site as searching just opens a scoped google search.
Probably would be good to setup redirects to the new extensions site.
yes, need to improve that aspect of the docs, sorry!
no need to apologize :)
big congrats on the launch!
As long as hx-boost is in core, it would make more sense to have head support in core? It's difficult to really leverage hx-boost without being able to manage the head in responses.
yeah, i go back and forth on it a lot
could still fold it in at some point in the 2.x line!
Are there any efforts to push functionality like this into the HTML standard? It would be nice if htmx eventually became unnecessary as browsers implemented it, and the work you're doing with proving it out in the wild seems like a crucial part of that.
yes, there are, alex petros, an htmx maintainer, gave a talk at Big Sky Dev Con on the shortest path to htmx-like functionality in HTML here:
https://www.youtube.com/watch?v=inRB6ull5WQ
we are talking w/the chrome developers about these ideas, i'm cautiously optimistic
Do you also plan on talking with the Mozilla people? And with Apple? Or will this be a kind of big daddy Google knows what's best for you, ads included?
I don't have contacts in those groups, but chrome is in contact w/them and has pushed forward hypermedia-friendly features e.g. https://developer.mozilla.org/en-US/docs/Web/API/View_Transi...
i have told my chrome team contacts about bugs in other browsers (e.g. safari not properly updating completion results when datalist elements are replaced asynchronously) and they have communicated these issues to those teams and gotten them fixed
if anyone reading this from other browser teams is interested in getting in contact w/me they can email me at carson at bigsky dot software
I hope this does not become a chrome-only feature in that case
agreed, but the chrome team is in communication w/the other browser makers and often drives new standards (e.g. https://developer.mozilla.org/en-US/docs/Web/API/View_Transi...)
their latest features have started leaning into improving the hypermedia infrastructure of the web so i'm optimistic
HTML already allows a lot of HTMX functionality with just 166 bytes of JS glue code, see HTMZ: https://leanrada.com/htmz
You can make tabs, accordions, carousels, modals, popovers and even Pure HTML Out-Of-Order Streaming (PHOOOS) using only HTML & CSS: https://kodus.pl
yep, it's an interesting idea
we are planning on implementing a minimalist version of alex's ideas from "The Birth & Death of htmx" talk as a POC for people to look at too.
Have you considered replacing xhr with fetch? I believe it would allow htmx to be used in even more places. Fetch can be hijacked so returning data to the htmx framework isn't limited to the network. You could "run" a server in the browser or have a native app render HTML as well.
Perhaps, there's already a good way to hijack xhr that I'm unaware of too.
Edit: Relevant link: https://logankeenan.com/posts/client-side-server-with-rust-a...
yeah, looked at it, unfortunately fetch() and xhr have a non-intersecting set of features (in particular, upload progress for xhr) so we decided not to touch it
i may restructure the internals to allow for mocking out responses using events, it comes up, especially w/ extensions
That'd be great, and I'd love to help in any way I can! Feel free to @mention me on Github. https://github.com/logankeenan
Thanks for making htmx!
Huge congrats on the major number release. HTMX is simply wonderful. Using it for a major project as we speak!
Would love to hear more about how you’re using it
We are building an enterprise application that manages (create, update data) and interacts with (read, display, enable user to browse via linked entities) a large-scale knowledge graph. In some views we have live updates from the server with SSEs (alerts, logs, etc.). Everything is rendered server side with Go + stdlib templates, Material Design Bootstrap for CSS, and HTMX for all the in interactive bits like fetching and rendering an entity's properties panel, enabling add/edit for entity or edge properties, and so on. Search updates results with HTMX. Entity/property edits are done with HTMX "panels".
The entire experience using Go + Fiber (gofiber.io) + templates + HTMX (htmx.org) is fantastic. This approach has allowed us to create a beautiful modern application that's highly performant, interactive in all the places you'd expect, and simple code, deps, devops, etc.
Not a question, but I just wanted to say that HTMX is a joy to work. I’m using it in production to slowly replace VueJS wherever full SPA interactions aren’t needed, and it has made development so much simpler. HTMX is such a breath of fresh air from the over-engineered jenga tower that web dev has evolved into over the past decade.
Thank you!
:) great to hear
As for slimming down over time, HTMX 1.0 was 26KB minified, now version 2.0 is 48KB minified. Why has it blown up by 184%, when it dropped IE support? Why don't keep it lightweight? Compare it with e.g. Petite Vue, which is 16KB minified.
htmx 1.9.12 was 44kb:
https://bundlephobia.com/package/htmx.org@1.9.12
and 2.0.0 was 45.3:
https://bundlephobia.com/package/htmx.org@2.0.0-beta4
i think that the better web components support blew is up a little. there is a reasonable amount of fat we can cut around IE support that is still in there, planning on doing so over the next few months & slowly
17ms over emerging 4G (and hopefully cached forever after that) doesn't freak me out too much
Do the docs https://htmx.org/docs/ reflect 2.0 or 1.x?
2.x
What is your opinion on https://github.com/unpoly/unpoly as a competitor ?
unpoly is a great library that sets the standard for progressive enhancement
i often recommend it for people that want a more "batteries included" hypermedia-oriented library
As someone that has long since soured on frontend things despite having tried everything from the start - mootools, jQuery, backbone.js, SproutCore, Ember, React, Vue, etc.
I genuinely think htmx is the only one I have liked even after I built something substantial in it.
To me that is big, to be able to walk away from a significant amount of time with something and say "yeah! I want to use that again!" instead of some variant of "it's the least bad option" is both rare and cherished so thanks for all the hard work.
:) glad to hear it, definitely appeals to some people (and disgusts some other people!)
No question but I wanted to say, I was pulling my hair out trying to figure out which js framework was less of an overkill, and finding htmx was pure joy
:) that's great to hear, i hope you find it useful
Oddly specific. Why implementing "forEach" and "toArray" instead of using the functions from Array.prototype? [1] I can see `Array.from` used elsewhere on the code.
---
1: https://github.com/bigskysoftware/htmx/blob/master/src/htmx....
IE support, haven't removed some of the shims, planning on doing so over time
He's the creator, but not the CEO. That title belongs to me...and you.
so true
https://htmx.ceo
Thanks for all your hard work; htmx is a breath of fresh air and an escape from the morass of needless complexity.
My only question: how can I get a set of those sweet sweet floppy disks?
working on it, need to see if the disk guy will dropship
Thank you. htmx has me (a c++ dev) back in the web game. I can finally build entire web frontends without a single line of explicit js.
really great to hear, i love that htmx helps folks that have been knocked out of web development get back into it
I'll join the others in praise of HTMX, it's a joy adding dynamic functionality to any website now. Thank you!
:) thank you i hope you continue to find htmx useful
Your front page still says “IE11 compatible”.
Another, “I really like htmx” comment, currently using it for an internal corporate webapp, it’s great.
Thank you for building htmx!