Open
Conversation
Owner
Pramod-sj
commented
Mar 21, 2026
- Adds Crossword games
This commit introduces a dedicated crossword game module (`:games:crossword`) and updates the main application to launch `CrosswordActivity` upon completion of the splash screen. Key changes include: * **New Module `:games:crossword`**: Implemented a complete crossword game using Jetpack Compose, featuring a zoomable grid, dynamic clue navigation, a custom responsive keyboard, and state persistence via `SavedStateHandle`. * **Crossword Game Logic**: Added `CrosswordMapGenerator` for grid processing and `CrosswordViewModel` to manage game state, scoring (tiers: Excellent, Good, Fair, Learning), and reveal features (letter, word, puzzle). * **UI Components**: Introduced `DynamicCrosswordGrid`, `ClueBanner`, `GridKeyboard`, and a `PuzzleCompleteDialog` with confetti effects via Lottie. * **Splash Screen Update**: Modified `SplashScreenActivity` to navigate to `CrosswordActivity` instead of the home page when the background image is cached. * **Repository & DI**: Added `CrosswordRepository` with dummy implementation for weekly puzzles and configured Hilt dependency injection for the new module. * **Code Quality**: Applied general reformatting and cleanup across existing networking classes (`WordNetworkServiceImpl`, `IPNetworkServiceImpl`, etc.) to improve code consistency.
…s, and integration into the main application.
Key changes include:
* **Validation Features**: Introduced "Check" functionality allowing users to verify individual letters, words, or the entire puzzle. Added a `CHECKED` state to `CellState` with visual indicators (green text for correct, strikethrough/red for incorrect).
* **UI/UX Improvements**:
* Refined `LightColorScheme` and `DarkColorScheme` to adhere strictly to Material 3 standards, including improved elevation containers and better contrast for focused cells.
* Added a `CrosswordFeatureCard` Compose component and integrated it into `activity_home.xml` and `RecapWordsActivity` to provide a dedicated entry point for the game.
* Enhanced `ZoomableBox` with smoother spring animations for camera panning and fixed auto-panning behavior when user touch is detected.
* Improved `CrosswordCellView` with input "pop" animations and optimized state reads for better performance.
* **Logic & Navigation**:
* Updated `CrosswordViewModel` to handle check logic, prevent overwriting revealed letters, and emit snackbar messages for "board full but incorrect" scenarios.
* Modified `SplashScreenActivity` to navigate to the home page by default instead of directly to the crossword game.
* Refined top app bar with a new dropdown menu for check options and a back navigation icon.
* **Maintenance**: Added `@Keep` annotations to network data models for ProGuard/R8 compatibility and simplified the `AndroidManifest.xml` for the crossword module.
This commit introduces a new `:router` module to handle decoupled navigation between feature modules using a URI-based routing system. It also updates the crossword game to support specific puzzle IDs and deep-linking to word details.
Key changes include:
* **New `:router` Module**: Created a centralized routing system using `AppRouter` and `FeatureRouter` interfaces. Defined `CoreRoute` and `CorePath` to manage application-wide navigation via schemes and hosts.
* **Crossword Module Updates**:
* Updated `CrosswordActivity` and `CrosswordViewModel` to accept and fetch specific puzzles via `crosswordId`.
* Integrated `AppRouter` to allow navigating from a crossword clue to the corresponding `WordDetailedActivity`.
* Refactored several crossword classes (UI components, networking, and repository) to `internal` visibility.
* Modified `CrossWordApiService` and `CrosswordRepository` to support fetching puzzles by ID instead of just a generic weekly puzzle.
* **Feature Routers**: Implemented `WordFeatureRouter` (in `:app`) and `GamesFeatureRouter` (in `:games:crossword`) to handle their respective URI paths using Hilt multi-bindings.
* **Activity Enhancements**: Added `newIntent` factory methods to `HomeActivity`, `WordListActivity`, `WordDetailedActivity`, `FavoriteWordsActivity`, and `RecapWordsActivity` for consistent Intent creation.
* **DI & Build**: Configured Hilt modules for routing and updated `build.gradle` files to include the new `:router` dependency across the app and crossword modules.
This commit adds a new `:games:core` module to centralize shared game logic, data models, and UI components. It also migrates the crossword feature card into a generic, data-driven `GameFeatureCards` component. Key changes include: * **New Module `:games:core`**: Created a core module to handle game-related infrastructure, including networking, repository logic, and shared themes. * **Dynamic Feature Cards**: Replaced the static `CrosswordFeatureCard` with `GameFeatureCards`, which dynamically renders feature cards (e.g., Crossword, Quiz) based on a JSON configuration (`feature_card.json`). * **Feature Repository & ViewModel**: Added `FeatureRepository` to fetch game features from assets (with Retrofit stubs for future API integration) and `FeatureCardViewModel` to manage the UI state using Kotlin Flows. * **Theming**: Introduced `CrosswordTheme` within the core module, providing Material3 light/dark color schemes tailored for the game features. * **UI Integration**: Updated `HomeActivity` and `RecapWordsActivity` to use the new `GameFeatureCards` component and the centralized `AppRouter` for navigation. * **Dependency Updates**: Added `hilt-navigation-compose` to the version catalog and configured the necessary Hilt, Compose, and Retrofit dependencies for the new module.
…improve networking infrastructure.
…o `:games:feature-card`
This commit restructures the games infrastructure by replacing the `:games:core` module with a more specialized `:games:feature-card` module and introducing a new `:games:results` module for persistent game state management using Room.
Key changes include:
* **New `:games:results` Module**: Created a dedicated module to manage game outcomes. It includes a Room database (`GameResultDatabase`), DAOs, and a repository to store and retrieve `GameResultEntity` (scores, completion time, and game-specific JSON data).
* **Refactored `:games:feature-card`**: Renamed and migrated logic from `:games:core` to `:games:feature-card`. Updated `FeatureCardRepository` to enrich UI state by combining live API data with local results from the new results module.
* **Crossword Persistence**:
* Updated `CrosswordViewModel` to support restoring game state (user answers and revealed cells) from the local database.
* Integrated `saveCrosswordResult` into the crossword flow to persist scores and progress upon completion.
* Modified `CrosswordRepository` and its implementation to fetch both network puzzle data and corresponding local results.
* **Splash Screen Optimization**: Refactored `SplashScreenViewModel` to use Coroutines for a cleaner splash sequence. It now pre-fetches live features and enforces a minimum display duration before navigating to the home page.
* **UI Updates**:
* Enhanced `FeatureCard` UI to display a "You scored: X" badge with a trophy icon for completed games.
* Added null-safety checks to `ClueBanner` and `CrosswordMapGenerator` to handle partial API responses gracefully.
* **Dependency & DI Management**: Configured Hilt modules (`ResultsModule`, `FeatureCardDataModule`) and updated the version catalog and `build.gradle` files across the project to support the new modular structure.
…prove crossword timer logic
…ames:feature-card` This commit introduces a robust system for managing feature cards and "nudges" with support for persistence-based dismissal logic, screen-specific filtering, and custom Compose animations
This commit updates the `dummy_puzzle.json` with a new set of crossword data and configures the `DummyRepositoryImpl` for dependency injection.
This commit updates the styling and layout of warning and update cards in `activity_home.xml` for better visual consistency and usability.
This commit updates the `change_logs.json` asset to include the release notes for version 3.3.0 (versionCode 202603210), highlighting the addition of the Crossword game.
…onfiguration This commit introduces necessary ProGuard/R8 consumer rules to prevent obfuscation of data models in the games modules and ensures the release build type uses the debug signing configuration.
Key changes include: * **Data Model Update**: Changed the `@SerializedName` for `overlineText` in the `CardContent` data class from `headerTitle` to `overlineText` to align with the updated JSON schema. * **Code Cleanup**: Refactored the `Text` component in `GameFeatureCards.kt` to use the local `overlineText` variable within the `let` block instead of a redundant safe call.
…o games/crossword # Conflicts: # app/build.gradle # app/src/main/assets/change_logs.json # app/src/main/java/com/pramod/dailyword/framework/ui/splash_screen/SplashScreenActivity.kt
This commit adds comprehensive KDoc documentation to the `:router` module to improve code maintainability and clarify the URI-based navigation architecture. Key changes include: * **`FeatureRouter` Documentation**: Added detailed interface documentation explaining its role in the modular architecture, implementation requirements, and usage examples for feature modules. * **`AppRouter` Documentation**: Added class-level documentation describing its responsibility as a centralized coordinator, its role in decoupling modules, and practical usage examples for Activities and ViewModels. * **Code Cleanup**: Removed unused imports (`Log`, `Toast`, `Inject`, `Singleton`) from `FeatureRouter.kt` and refined comments within `AppRouter.kt`.
…me-rules` modules
This commit refactors the network layer into a centralized core module and introduces a modular system for managing and displaying game rules across different game types. It also updates the crossword module to utilize these new components, including a first-time player onboarding flow.
Key changes include:
* **New Core Modules**:
* **`:core:network`**: Centralized Retrofit configuration, API result handling (`ApiResult`, `Resource`), and common interceptors. Introduced `@NetworkCoreInstance` qualifier for Hilt DI.
* **`:core:preferences` & `:core:shared-preference-impl`**: Created an abstraction for user preferences (`RulesPreference`) with a SharedPreferences-based implementation to track game-specific metadata like "first-time player" status.
* **New Module `:games:common:game-rules`**:
* Implemented a reusable UI and data layer for game instructions.
* Added `GameScaffold`, a high-level wrapper that integrates a top bar, snackbar host, and an automatic `GameInstructionsBottomSheet` for new players.
* Added `GameRulesRepository` and `GameRulesApiService` to fetch instructions dynamically from the backend.
* **Crossword Module Refactoring**:
* Migrated `CrosswordScreen` to use `GameScaffold`, simplifying top bar and bottom bar management.
* Integrated `CrosswordViewModel` with `RulesPreference` and `GameRulesRepository` to trigger the instructions bottom sheet on the first launch.
* Refactored `NetworkModule` to use the centralized `Retrofit` instance from `:core:network`.
* Updated the UI to include a persistent timer pill and refined dropdown menus for "Check" and "Reveal" actions using Material 3 outlined icons.
* **Dependency & Infrastructure**:
* Renamed `GameEndpointProvider` to `EndpointProvider` and moved it to the core network module.
* Updated `build.gradle` files across `:app`, `:games:crossword`, and `:features:feature-card` to reflect the new modular dependency structure.
* Registered new modules in `settings.gradle`.
|
Important Review skippedToo many files! This PR contains 170 files, which is 20 over the limit of 150. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (170)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.