-
-
Notifications
You must be signed in to change notification settings - Fork 310
only show next correct move when viewing puzzle solution #774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want this but we could improve it a little more.
We could for instance have the forward button glow or blink for a short period (3s) to visually indicate that one can go forward.
There is already an example of blinking button in game screen when a draw offer is received.
| } else { | ||
| timer.cancel(); | ||
| } | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a slight delay before jumping to next move is still desirable.
|
It doesn't blink? My bad then :) Any visual indication would be good actually, blinking is not mandatory. Perhaps a simple background color inversion for a duration of 3s would be the best? |
|
If you have the time to post a screen recording showing the feature and button visual indicator in action that would be great. Thanks! |
|
No problem. I tried both blinking and color inversion, and I think blinking works a lot better. And I set the duration to 5 seconds instead of 3 because it felt a bit too short. |
| icon, | ||
| color: highlighted ? primary : null, | ||
| ), | ||
| if (blink) ...[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there is a single child, I don't think the ...[ is necessary.
| ? primary | ||
| : Theme.of(context).iconTheme.color ?? Colors.black, | ||
| ), | ||
| ] else ...[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: unecessary ...[
|
|
||
| expect(find.byKey(const Key('h4-blackRook')), findsOneWidget); | ||
| expect(find.byKey(const Key('h8-whiteQueen')), findsNothing); | ||
| expect(find.byKey(const Key('h8-whiteQueen')), findsOneWidget); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add another check to show the "jump to next move" button is not disabled.
|
I addressed your comments. I'm a bit uncertain about the test, it might not be done in the most idiomatic way. |
|
Thanks! |
close #761
This alters the "show solution button" to only show the next move in the solution, which is in line with both the website and the old app.