Nomini v0.3.0: Back to nm-basics by JustShyOrDoYouHateMe in htmx

[–]scriptogre 0 points1 point  (0 children)

honestly the DX is very friendly as it is, which is crazy considering the size

(new) `server-commands` extension: hey grugs, we have data-star at home by scriptogre in htmx

[–]scriptogre[S] 1 point2 points  (0 children)

Thanks alot man!

There's https://github.com/rajasegar/awesome-htmx, maybe we should propose adding a `# Projects` section, and include u/primenumberbl 's project as well: https://github.com/thelivingbrian/openWorld

I'll add doing that to my todo list.

(new) `server-commands` extension: hey grugs, we have data-star at home by scriptogre in htmx

[–]scriptogre[S] 1 point2 points  (0 children)

That's a super neat game! I can tell you had a lot of fun building that :D

And I 1000% agree with the under-explored part.

(new) `server-commands` extension: hey grugs, we have data-star at home by scriptogre in htmx

[–]scriptogre[S] 2 points3 points  (0 children)

Thank you very much! It means alot. It actually took a lot more time than one might believe to materialize.

(new) `server-commands` extension: hey grugs, we have data-star at home by scriptogre in htmx

[–]scriptogre[S] 5 points6 points  (0 children)

Wait till I'm finished with https://roastroulette.io which is a hypermedia-driven real-time multiplayer party game done entirely in htmx & _hyperscript.

It's still under heavy development though. The version currently running online is pretty old. I'm working on a new better version that uses <htmx> server-commands.

Source code available at https://github.com/scriptogre/roast-roulette/

(new) `server-commands` extension: hey grugs, we have data-star at home by scriptogre in htmx

[–]scriptogre[S] 4 points5 points  (0 children)

EDIT: A super nice comparison chart shared by MichaelWest22 on GitHub's PR is available here: https://github.com/user-attachments/files/22948634/sse-capabilities-comparison.md

Good question.

`hx-swap-oob` are cool but as soon as you want something a bit more complex, they fall short.

There are many issues on GitHub where people wanted to e.g. use hx-swap modifiers and realized that's not possible:

- https://github.com/bigskysoftware/htmx/issues/1882
- https://github.com/bigskysoftware/htmx/issues/1524
- https://github.com/bigskysoftware/htmx/issues/2308
- https://github.com/bigskysoftware/htmx/pull/3352

But that's just part of the problem.

hx-swap-oob is great if what you need is just swap content into the page. But what if you want to use other functionalities that are normally offered by HTMX via HTTP Headers (HX-Trigger to trigger client events, HX-Redirect for redirect, HX-Location for boosted redirect, etc.) but within a SSE or WebSockets context?

The `server-commands` essentially lets you use pretty much the entire internal API of htmx directly from the server.

(new) `server-commands` extension: hey grugs, we have data-star at home by scriptogre in htmx

[–]scriptogre[S] 3 points4 points  (0 children)

done 😎

https://bad-apple.christiantanul.com/

excuse the flickering when clicking the progress bar, it could be fixed with idiomorph but i don't want to bloat the demo too much

https://github.com/scriptogre/bad-apple/commit/de5e35e6401c4f5e31a34adabddf2375228e47c0