-
-
Notifications
You must be signed in to change notification settings - Fork 310
Puzzle immersive mode and game screen improvements for small screens #1803
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
3f91642 to
767d326
Compare
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.
Pull Request Overview
This pull request introduces several improvements for small screens and enhances puzzle immersive mode as well as game screen behavior. Key changes include:
- Updating UI thresholds and renaming functions/constants to improve small screen handling and move list display implementation.
- Refactoring async state handling using new switch-case patterns and integrating Android gesture exclusion for immersive mode.
- Adjusting layout calculations and updating settings to fix the bottom UI bar bug.
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/src/widgets/board_table.dart | Updated move list display condition based on board preferences. |
| lib/src/view/settings/board_settings_screen.dart | Added a new switch tile to toggle move list display. |
| lib/src/view/puzzle/streak_screen.dart | Refactored widget state management with pop scope adjustments. |
| lib/src/view/puzzle/storm_screen.dart | Converted async handling to switch-case and updated error handling. |
| lib/src/view/puzzle/puzzle_screen.dart | Passed board keys and updated async patterns for puzzle loading. |
| lib/src/view/game/game_screen_providers.dart | Renamed function for real-time game checks. |
| lib/src/view/game/game_screen.dart | Introduced Android gesture exclusion and updated navigation bar theming. |
| lib/src/view/game/game_player.dart | Adjusted font sizes and removed unnecessary widgets for layout stability. |
| lib/src/utils/screen.dart | Renamed and updated height estimation function used across the app. |
| lib/src/model/settings/board_preferences.dart | Added toggle for move list display and updated default settings. |
| lib/src/constants.dart | Revised threshold value for small screens. |
| lib/src/app.dart | Updated the NavigationBarTheme based on the new height estimation. |
Comments suppressed due to low confidence (3)
lib/src/utils/screen.dart:5
- The updated estimateHeightMinusBoard function no longer subtracts the top and bottom padding from the MediaQuery; please confirm that this change is intentional for devices with display cutouts.
double estimateHeightMinusBoard(BuildContext context) { return size.height - boardSize - kToolbarHeight - kBottomBarHeight; }
lib/src/view/game/game_screen_providers.dart:125
- The function was renamed from shouldPreventGoingBack to isRealTimePlayableGame; please ensure that the new naming consistently reflects its behavior across the codebase.
Future<bool> isRealTimePlayableGame(Ref ref, GameFullId gameId) {
lib/src/constants.dart:63
- The threshold value has been changed from 160 to 190; please verify that this adjustment aligns with the intended UI design for small screens.
const kSmallHeightMinusBoard = 190;
lib/src/view/game/game_player.dart
Outdated
| final remaingHeight = estimateHeightMinusBoard(context); | ||
| final playerFontSize = remaingHeight <= kSmallHeightMinusBoard ? 15.0 : 16.0; |
Copilot
AI
May 25, 2025
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.
The variable name 'remaingHeight' appears to have a typo; consider renaming it to 'remainingHeight' for clarity.
| final remaingHeight = estimateHeightMinusBoard(context); | |
| final playerFontSize = remaingHeight <= kSmallHeightMinusBoard ? 15.0 : 16.0; | |
| final remainingHeight = estimateHeightMinusBoard(context); | |
| final playerFontSize = remainingHeight <= kSmallHeightMinusBoard ? 15.0 : 16.0; |
Also better detect small screens to hide the list automatically. Closes #1785
Fixes a regression introduced with 93ef0a9. Refactor GameBody and GameScreen to simplify logic.
- immersive mode on android when puzzle is not finished - on both platforms, prevent pop screen with a confirmation dialog Closes #1773
767d326 to
4906abb
Compare
Closes #1785
Closes #1783
Closes #1773
It also fixes a UI bug of the bottom bar introduced in #1781