Add flip board button to puzzle screen (#3372)#3448
Merged
veloce merged 2 commits intoJul 21, 2026
Conversation
assassinaj602
force-pushed
the
fix-3372-flip-board-puzzle
branch
from
July 15, 2026 08:56
8ed5edd to
0cd956d
Compare
- Added _isBoardTurned state in _BodyState to track board orientation - Board orientation toggles between puzzleState.pov and its opposite - Added flip board button in bottom bar when in view mode - Both portrait and landscape board orientations are supported - Uses existing l10n.flipBoard translation key Fixes lichess-org#3372
assassinaj602
force-pushed
the
fix-3372-flip-board-puzzle
branch
from
July 15, 2026 09:02
0cd956d to
c6512d3
Compare
Contributor
|
Thanks for contributing @assassinaj602 ! I don't see the screenshot (when I click on expand, nothing happens). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added a "Flip board" button to the puzzle screen that allows users to toggle the chess board orientation during puzzle analysis and viewing. This feature is consistent with the existing flip board functionality in the game screen.
Changes Made
_isBoardTurnedstate variable in_BodyStateto track board orientationpuzzleState.povand its opposite when flippedPuzzleMode.view)l10n.flipBoardtranslation key (already available across all locales)CupertinoIcons.arrow_2_squarepathicon, consistent with other flip buttonsScreenshots/Videos
Screenshots (Click to expand)
Testing
Implementation Details
_isBoardTurnedlives in_BodyStateso it resets when leaving the screenVoidCallbackpassed from_BodyStateto_BottomBar(consistent with other screens)PuzzleMode.viewmodeorientation: _isBoardTurned ? puzzleState.pov.opposite : puzzleState.povRelated Issue
Fixes #3372
Checklist
flutter analyzepasses (pre-existing errors in file are documented)flutter testpassesdart formatNote for Reviewers
The analyzer errors shown are pre-existing in the file (
PuzzleSettingsBottomSheetrelated) and were not introduced by this change. This PR only adds the flip board functionality.