Skip to content

Conversation

@tom-anders
Copy link
Collaborator

Fixes #770

Is it worth adding a unit test for this? Or do we rely on chessground behaving correctly here?

<string name="puzzleStormSubtitle" comment="Shown as a description for the 'Puzzle Storm' mode">Solve as many puzzles as possible in 3 minutes.</string>
<string name="greeting" comment="A greeting that is shown on the app's home page, e.g. 'Hello, GM Magnus'. %s is substituted with the user's name">Hello, %s</string>
<string name="greetingWithoutName" comment="Greeing that is shown on the app's home page when the user is not logged in.">Hello</string>
<string name="prefMagnifyDraggedPiece" comment="Title of a setting the settings screen. When enabled, the piece being dragged around the board will be magnified.">Magnify dragged piece</string>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: Since the setting already exists in the old app and is well known, I thought it would be okay to already add a translation.

@tom-anders tom-anders force-pushed the magnificationSetting branch from 1fdd8d7 to bb3d296 Compare July 28, 2024 09:51
@tom-anders
Copy link
Collaborator Author

Demo:

magnify.webm

showLastMove: boardPrefs.boardHighlights,
enableCoordinates: boardPrefs.coordinates,
animationDuration: boardPrefs.pieceAnimationDuration,
dragFeedbackSize: boardPrefs.magnifyDraggedPiece ? 2.0 : 1.0,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: This logic is already duplicated (here and in the normal game screen), and once we have the board editor, we'll duplicate it again. Would it make sense to add a method to BoardPreferences that converts BoardPreferences to chessground.ChessBoardSettings and/or chessground.ChessBoardEditorSettings ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, added BoardPrefs.toBoardSettings()

(also rebased to fix conflicts)

@tom-anders tom-anders force-pushed the magnificationSetting branch from bb3d296 to 2b9336b Compare July 30, 2024 20:29
@tom-anders tom-anders force-pushed the magnificationSetting branch from 2b9336b to b04b8a1 Compare July 30, 2024 21:24
Copy link
Contributor

@veloce veloce left a comment

Choose a reason for hiding this comment

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

Thanks!

@veloce veloce merged commit d63e8f9 into lichess-org:main Aug 3, 2024
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.

Opt-out Piece magnification

2 participants