feat: add variant support to board editor#2673
Open
tom-anders wants to merge 1 commit intolichess-org:mainfrom
Open
feat: add variant support to board editor#2673tom-anders wants to merge 1 commit intolichess-org:mainfrom
tom-anders wants to merge 1 commit intolichess-org:mainfrom
Conversation
20 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds variant awareness to the board editor flow (controller + UI), and reuses a shared app bar title widget for variant display across screens.
Changes:
- Introduces
BoardEditorControllerParams(variant + optional FEN) and threads it throughBoardEditorScreen, filters, navigation, and tests. - Adds variant switching UI to the board editor and updates “start position” behavior to use the selected variant’s initial position.
- Extracts a reusable
VariantAppBarTitlewidget and adopts it in Analysis and Board Editor app bars.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
lib/src/model/board_editor/board_editor_controller.dart |
Provider family now keyed by (initialVariant, initialFen); stores variant in state; adds setVariant; updates PGN generation for variant. |
lib/src/view/board_editor/board_editor_screen.dart |
Wires params through the screen; adds variant title; adds variant picker action; adjusts start position + analysis launch variant handling. |
lib/src/view/board_editor/board_editor_filters.dart |
Updates filters sheet to take controller params instead of initial FEN. |
lib/src/view/more/more_tab_screen.dart |
Updates navigation to Board Editor to pass standard variant params. |
lib/src/view/analysis/analysis_screen.dart |
Replaces the local analysis title widget with VariantAppBarTitle. |
lib/src/widgets/variant_app_bar_title.dart |
New shared widget for app bar titles with variant icon handling. |
test/view/board_editor/board_editor_screen_test.dart |
Updates tests to use params and adds coverage for variant switching loading the starting position. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
90e1a13 to
22a9ea5
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
01a8154 to
eaa6c4f
Compare
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.
variant_editor.webm