News for hackers. Stuff that matters.
Re:Htmx is part of the GitHub Accelerator by tommica on Wednesday August 16, 2023 @04:11PM (#37153028)
Stupid question, why doesn't htmx parse the response html and extract from that the relevant data out needs to fulfill the configuration? Feels a bit cumbersome to return the exact part of the response on server side, like the next page of the table, if it was requested with htmx, else return the full page.

This way htmx would be even easier to implement in any front-end.

Or maybe I am just crazy.

Edit: or is it this? https://htmx.org/docs/#selecting-content-to-swap

Re:Htmx is part of the GitHub Accelerator by spapas82 on Wednesday August 16, 2023 @04:15PM (#37153093)
This is how unpoly works (it receives the whole response and patches the page with the correct part of that response).
Re:Htmx is part of the GitHub Accelerator by tommica on Wednesday August 16, 2023 @04:25PM (#37153267)
Oh that's cool!
Re:Htmx is part of the GitHub Accelerator by Lukas_Skywalker on Wednesday August 16, 2023 @05:50PM (#37154368)
Rails does this with Turbo Frames [1]. When clicking a link that is contained in a <turbo-frame> element, the frame is automatically replaced if the response contains a frame with the same ID.

1: https://turbo.hotwired.dev/handbook/frames

Re:Htmx is part of the GitHub Accelerator by mst on Thursday August 17, 2023 @11:18AM (#37163031)
It is that, yes.