jhonnold / node-tlcv

Tom's Live Chess Viewer for CCRL Broadcasts on the web!
https://ccrl.live
MIT License
23 stars 8 forks source link

PV boards #49

Closed tsoj closed 1 year ago

tsoj commented 1 year ago

I tried adding PV preview boards. It currently looks like this: node-tlcv_with_pv_boards_2

However, on small screens it looks bad. I haven't found a good way to automatically scale the PV boards. Generally, this is my first attempt doing the javascript and css stuff. I assume some of this code is a bit bad, so I appreciate any feedback.

EDIT: I think I have found a solution for small screens, where we always leave enough space for the info box, even if we have to not show the PV board at all. However, I'm not sure if there is a better solution than to have some hardcoded pixel margins there.

jhonnold commented 1 year ago

I have not been ignoring this, I've been in the mountains for the last 5 days. I'll take a look at this.

tsoj commented 1 year ago

I think I solved the issues. I put the pvFen into the Player/SerializedPlayer, as that made the most sense to me, even though it kind of depends on the game.

jhonnold commented 1 year ago

I like where this is at, apart from the styling and really awkward JS adjustment of styling info-cards + pv boards. I'm thinking it's possible to just lock the pv-board at 155x155 or something along those lines and work from there.

I'm going to try and merge this without the UI in place yet, and will see if I can adjust the PV board styling more.