ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

make chat lines stand out more #1023

Closed ctm closed 2 years ago

ctm commented 2 years ago

Do something to make chat lines stand out more when they're interspersed with dealer messages.

ts4z: ❯deadhead: is it possible to get an character stuck to the front of the chat, something like this message, so that chat messages in game stand out more?

ctm commented 2 years ago

Initially, just make player chat be 827cf5, which is the value PokerStars uses at least with my defaults. That may be bad for some color blind people and perhaps it's even bad for ts4z. If it's bad for him, I'll do something else, but if it works for him, I'll leave the something else for later.

ctm commented 2 years ago

Ugh. I do something stupid where although there's a separate Chat LogLine variant and Line variant, we use Line when a chat isn't an action and doesn't contain a link. This is due to historical layering where chat messages and dealer messages get turned into Strings before being turned into LogLines.

The "proper" solution is to hoist the code that creates LogLines up higher and never even store the Strings, then we don't have to re-parse Strings to look for Actions. OTOH, I need to get some documentation to my bank soon, so I think I need to put this aside.

I'm leaving the easy tag because there's a super ugly hack I can do to get this functionality ASAP, but if I can do the refactor in less than a few hours, I will do that rather than build yet another hack on the current poor architecture.

ctm commented 2 years ago

Turns out, there was an acceptable fix that wasn't a hack on a hack. However, right now there's no easy way for the chat code to know whether it's in the lobby or at a table, so using a prefix like would cause that prefix to appear in the lobby, too, which is a bit ugly. However, with CSS I can alter table-only chat lines and change things like their color, so that's what I've done.

As I mention above, changing color only is bad for color-blind people, but this is a temporary fix put in quickly due to ts4z's request, so if he's OK with it, that's what we'll do for now and I can get back to my bank.

ctm commented 2 years ago

Oops. I suck. Turns out it's easy to insert a prefix using CSS. It's just that I don't know CSS and I didn't think to do a web search before dismissing it. So, I added the prefix and am deploying now.