Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinate Trainer: option for coordinates on every square #15221

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

BSmick6
Copy link
Contributor

@BSmick6 BSmick6 commented May 4, 2024

white normal:
white

black normal:
black

white all squares:
white all squares

black all squares:
black all squares

@BSmick6
Copy link
Contributor Author

BSmick6 commented May 4, 2024

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

@BSmick6
Copy link
Contributor Author

BSmick6 commented May 4, 2024

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

@benediktwerner benediktwerner marked this pull request as draft May 5, 2024 02:04
@brollin
Copy link
Collaborator

brollin commented May 6, 2024

Glad to see someone take this on. I'll just link it to the issue with: fixes #15212

* master: (29 commits)
  move app rate limiters to web
  Revert necessary import for pipe
  ensure all rate limiters are configured
  move ctrl limiters to web - WIP
  scala tweaks
  report donation stats every 24h
  New Crowdin updates (lichess-org#15226)
  chessground redrawAll
  scss tweaks
  put is3d in board change event
  prettier
  Don't refetch same css, cached or no
  brightness/opacity on last move & check squares, but no hue rotate
  disable social links on kid profiles
  Update uap-scala to 0.17.0
  Update play-json to 3.0.3
  Update play-ahc-ws-standalone, ... to 2.2.7
  Hide kid teams on profile
  comm restrictions no longer shield against comm reports
  remove duplicated css property
  ...
@ornicar
Copy link
Collaborator

ornicar commented May 6, 2024

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 added a commit to lichess-org/chessground that referenced this pull request May 6, 2024
@ornicar
Copy link
Collaborator

ornicar commented May 6, 2024

your move

@BSmick6
Copy link
Contributor Author

BSmick6 commented May 6, 2024

@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:

Screen.Recording.2024-05-06.at.10.38.39.AM.mov

@brollin
Copy link
Collaborator

brollin commented May 7, 2024

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

@BSmick6
Copy link
Contributor Author

BSmick6 commented May 7, 2024

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.

@cmgchess
Copy link
Contributor

cmgchess commented May 7, 2024

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

@BSmick6
Copy link
Contributor Author

BSmick6 commented May 7, 2024

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
Copy link
Contributor Author

BSmick6 commented May 7, 2024

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 😊

@brollin
Copy link
Collaborator

brollin commented May 7, 2024

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.

@BSmick6
Copy link
Contributor Author

BSmick6 commented May 8, 2024

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: lichess-org/chessground#303

@BSmick6
Copy link
Contributor Author

BSmick6 commented May 8, 2024

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

pnpm-lock.yaml Show resolved Hide resolved
pnpm-lock.yaml Show resolved Hide resolved
@brollin
Copy link
Collaborator

brollin commented May 9, 2024

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.

@BSmick6 BSmick6 marked this pull request as ready for review May 9, 2024 14:27
@BSmick6 BSmick6 marked this pull request as draft May 9, 2024 14:27
@BSmick6 BSmick6 marked this pull request as ready for review May 9, 2024 14:37
Copy link
Contributor Author

@BSmick6 BSmick6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to improve/clean up the CSS code by removing unnecessary selectors and nesting others. Any and all feedback is appreciated. I plan on updating respective CSS code in the chessground repo (PR) once we've settled on the changes here.

@@ -212,3 +212,53 @@ html.transp body:not(.simple-board) cg-board {
//filter: hue-rotate(calc(var(---board-hue) * 3.6deg));
}
}

coords.squares {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love the .squares class name. Squares are referenced very often in chess. For example, chessground already uses a <square> element. I anticipate conflicts one day, but for now, we can just specify the <coords> element to mitigate that risk.

@BSmick6
Copy link
Contributor Author

BSmick6 commented May 14, 2024

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

@brollin
Copy link
Collaborator

brollin commented May 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants