←back to thread

Less Htmx Is More

(unplannedobsolescence.com)
169 points fanf2 | 3 comments | | HN request time: 0.718s | source
Show context
seanwilson ◴[] No.43620127[source]
Anyone replace some HTMX usage with the View Transition API that's now in Chrome and Safari? https://developer.chrome.com/docs/web-platform/view-transiti...

This looks appealing where it makes sense (page transitions, table sorting/pagination) and if Firefox gets around to adding it.

replies(2): >>43620372 #>>43620523 #
1. _heimdall ◴[] No.43620523[source]
I really want to like the transitions API but I've been frustrated by it multiple times.

It feels like they wanted to build page animations similar to what Windows Phone had 15 years ago. That would be great, Windows Phone transition were surprisingly nice.

It just doesn't work on the web though, its an after thought. Animations on windows phone only worked because it was designed into the UI library and rendering engine from the beginning.

replies(1): >>43621811 #
2. seanwilson ◴[] No.43621811[source]
Can you go into more detail about what's frustrating? You can customize the animations, right?
replies(1): >>43624634 #
3. _heimdall ◴[] No.43624634[source]
Yeah you can customize them a bit.

What I've always wanted to be able to do though is restyle the actual DOM element as it animates from one part of the screen to another. Unless this changed pretty recently, my understanding is that the browser is basically grabbing a screenshot of the DOM element before it navigates and animates the snapshot itself across the screen.

I've also run into random issues related to having to tag the element targets. I don't remember all the details now so I can't give a great example, but especially when using libraries like HTMX I was having issues trying to make sure the right elements were tagged to animate correctly.

Conditional animations can be done, though its a little odd to wrangle and you can end up with code mixed between HTML, JS, and CSS to work with it.