implement puzzle navigation#2975
Conversation
| onLongPressCancel: _onPressEnd, | ||
| onLongPressUp: _onPressEnd, | ||
| child: widget.child, | ||
| return MergeSemantics( |
There was a problem hiding this comment.
Needed to pass the accessibility test. Merges the semantics of the children.
There was a problem hiding this comment.
Pull request overview
Adds in-game move history navigation for puzzles (previous/next) and updates UI/controller logic to support safe navigation during play.
Changes:
- Enable Previous/Next navigation controls in puzzle bottom bar during play.
- Adjust board interactivity and hint/solution availability when the user is navigating history.
- Add a widget test covering back/forward navigation during puzzle play.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| test/view/puzzle/puzzle_screen_test.dart | Adds a widget test validating back/forward history navigation during play. |
| lib/src/widgets/buttons.dart | Wraps RepeatButton with semantics merge (and affects gesture behavior). |
| lib/src/view/puzzle/puzzle_screen.dart | Exposes Previous/Next buttons outside view mode and disables actions while “in history”. |
| lib/src/model/puzzle/puzzle_controller.dart | Updates move application/rewind logic and relaxes canGoNext/canGoBack for play-mode navigation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The feature I fought hard not to include... but admitely I lost the battle 😅 Thanks for the implementation, will review asap. |
|
UI feedback: we should not mix buttons with and without labels in the bottom bar. So please remove the labels (but be sure to include semantics and tooltips). |
Veloce, Your logic def makes sense to either all have labels or have no labels... Any chance to encourage you in the reverse direction then? For comparison, studies already have labels for back and next. I don't think the two buttons that were there previously are always immediately known what they do. |
|
From what I see in the video, when too many buttons labels are truncated. Even more true in verbose languages, so it is easier with not labels. |
Screen_recording_20260415_132410.webmI removed the labels and changed the icons because the combination of i and ? was not understandable. We could also use different icons than the ones I choose now: Hint: ? or lightbulb Solution: Key, Eye or flag Maybe we should also change the view solution icon in studies to the same we choose in Puzzles. |
|
I don't hate the light bulb but I definitely don't like the flag since it's already associate with resigning Perhaps keep question mark for hint and lightbulb for solution? Or if we want to keep lightbulb for hint I would use either an eye or a target/bullseye for solution |
|
I like the lightbulb and the flag. Flag makes sense cause in a way if you want to see the solution it is like resigning, isn't it? |
|
That was my logic too. |
|
Adjusted the icon for learn from mistakes and studies now. |
closes: #2428
Implements the puzzle navigation feature, that has been requested a lot in the forums.
I tried to make the code as robust as possible against race conditions ( which could happen f.ex. if the user makes a wrong correct move and then immediately rewinds)
Video:
Screen_recording_20260413_211127.mp4
Implements a test aswell