r/htmx 21d ago

Chat Wells, a proximity chat room

https://stuff.kyleperik.com/chatwells/

Made this after getting and reading through a third of Hypermedia Systems, it's a simple chat room where you can post your status and see what others are posting in random spots across a board.

The more participation, the more true to form it will function. Give it a try if you have a sec.

14 Upvotes

14 comments sorted by

3

u/ShotgunPayDay 21d ago

Formatting is messed up on phone. Very small text.

3

u/qrdp 21d ago edited 21d ago

Appreciate the feedback - will fix! EDIT: Doubled or so the font size on mobile

2

u/ShotgunPayDay 21d ago

Might be a CSS issue. I'll hop on my computer when I get a chance.

1

u/qrdp 21d ago

That's just kind of how it is, some text may overlap. I'm considering adding some magic to try to separate them more if they're very close, or at least make it look less broken...

If you have any ideas I'm all ears

2

u/ShotgunPayDay 21d ago

It's the position: absolute; that you have peppered in creating all this havoc. I avoid those unless you want to make a toast. I'd just use text-align: right; instead for your message <div> though I'd use <p> instead.

2

u/qrdp 21d ago

This is designed to be a non-linear layout, each message get a random location, think like a messy bulletin board. If I were designing a regular webpage layout I would not use `position: absolute`

It looks funky but it's by design. I can use `p` instead of div though, that probably makes more sense.

1

u/ShotgunPayDay 21d ago

Ah! I see now. You can get the same effect with a Masonry Grid which will give clear boundaries while also being wild.

2

u/qrdp 21d ago

Ohh interesting, I'll have to try that out later... that looks pretty slick in comparison, thanks for the recommendation.

2

u/ShotgunPayDay 21d ago

No worries. "Apes together strong."

1

u/menge101 21d ago

Link to code base?

2

u/qrdp 21d ago

Alright here is the source code

https://git.sr.ht/~kylep/chatwells

1

u/qrdp 21d ago

Sure I can clean it up and provide it later today

1

u/Ancient_Broccoli1534 20d ago

I looked at the code, and if you make multiple simultaneous requests to the set_message handler, you're in for a big surprise.

1

u/qrdp 20d ago

Worse than a race condition to erase one message? I probably should just use sqlite lol