lila icon indicating copy to clipboard operation
lila copied to clipboard

Coordinate Trainer: option for coordinates on every square

Open BSmick6 opened this issue 9 months ago • 17 comments

white normal: white

black normal: black

white all squares: white all squares

black all squares: black all squares

BSmick6 avatar May 04 '24 16:05 BSmick6

first attempt, but there still seems to be an issue with i18n flow Screenshot 2024-05-04 at 12 02 08 PM

BSmick6 avatar May 04 '24 16:05 BSmick6

I realize now I mistakenly tried to update a node modules file

BSmick6 avatar May 04 '24 16:05 BSmick6

Glad to see someone take this on. I'll just link it to the issue with: fixes https://github.com/lichess-org/lila/issues/15212

brollin avatar May 06 '24 07:05 brollin

first attempt, but there still seems to be an issue with i18n flow Screenshot 2024-05-04 at 12 02 08 PM

run ./lila compile to rebuild the i18n data

ornicar avatar May 06 '24 08:05 ornicar

your move

ornicar avatar May 06 '24 08:05 ornicar

@ornicar @brollin what UI work remains for this change? I noticed that #15189 is a seperate issue. Is that intentional? As is, this feature doesn't seem to work for me locally, but idk if that's just because of my env:

https://github.com/lichess-org/lila/assets/14306627/9948d6dc-610e-46ed-95f9-5e529634363e

BSmick6 avatar May 06 '24 14:05 BSmick6

Yep it is a different issue intentionally because both need to be implemented separately.

How are your CSS skills? Based on your video, it seems like there is some styling issue to be debugged. Could be an issue with your implementation or with chessground. That's the thing to look into next I'd say. Still your move! :D

brollin avatar May 07 '24 03:05 brollin

Yep it is a different issue intentionally because both need to be implemented separately.

How are your CSS skills? Based on your video, it seems like there is some styling issue to be debugged. Could be an issue with your implementation or with chessground. That's the thing to look into next I'd say. Still your move! :D

I'm familiar with CSS so I can investigate whether it's an issue in Lila at least.

BSmick6 avatar May 07 '24 13:05 BSmick6

i also ran into the same issue when trying to do this. looks like the translateXs or something are not getting applied properly. I tried on Gitpod

cmgchess avatar May 07 '24 13:05 cmgchess

obviously, it isn't a long term solution but I hacked together some CSS code to at least position the coordinates correctly. this is what it looks like: Screenshot 2024-05-07 at 11 02 34 AM for some reason the "black" class isn't being applied. looks like it should be in chessground (link), so idk if I can properly solve that issue on my end, but I'm working on a cleaner solution to the positional fix

BSmick6 avatar May 07 '24 15:05 BSmick6

After digging through more chessground code, I've concluded that a styling fix exclusive to this repo will require hard coding, mostly due to the lack of a parent element for the coords elements. (Also, the class names are misleading because the coordinates are grouped by file, not rank.)

I can open a PR with helpful changes in the chessground repo (here), but I'm not sure what the procedure is there. @brollin lmk what you think. your move 😊

BSmick6 avatar May 07 '24 15:05 BSmick6

Nice investigation, yeah it's a brand new feature so not surprising that there's a kink to work out. Opening a chessground PR would be great. The procedure with that repo isn't any different from this one or most GitHub repos really. Alternatively if you aren't feeling confident you could just open an issue over there to report the problem.

brollin avatar May 07 '24 23:05 brollin

Working on it right now but I'm trying to get the css right before I commit anything to chessground. It's been a struggle so I might just open a draft PR and call it a day soon edit: https://github.com/lichess-org/chessground/pull/303

BSmick6 avatar May 08 '24 22:05 BSmick6

the latest change actually fixes everything except the rank colors from white's perspective: Screenshot 2024-05-08 at 7 35 03 PM

BSmick6 avatar May 08 '24 23:05 BSmick6

Yes it seems that we manually add chessground CSS to lila, perhaps because we want to be very deliberate. It looks like chessground works fine so you can close your PR over there.

brollin avatar May 09 '24 00:05 brollin

@brollin @ornicar just a reminder that this PR is ready for review

BSmick6 avatar May 14 '24 19:05 BSmick6

Thanks for these contributions @BSmick6! ornicar will eventually have a look and may adjust things. He is usually juggling about 13 tasks simultaneously, so there might be a small wait.

brollin avatar May 15 '24 09:05 brollin

great stuff, thanks!

Next: as a global website setting.

ornicar avatar Jun 11 '24 08:06 ornicar