Skip to content

Comments

feat: add variant support to board editor#2673

Open
tom-anders wants to merge 1 commit intolichess-org:mainfrom
tom-anders:boardEditorVariants
Open

feat: add variant support to board editor#2673
tom-anders wants to merge 1 commit intolichess-org:mainfrom
tom-anders:boardEditorVariants

Conversation

@tom-anders
Copy link
Collaborator

@tom-anders tom-anders commented Feb 22, 2026

variant_editor.webm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 through BoardEditorScreen, 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 VariantAppBarTitle widget 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

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.

1 participant