Persian Date bottom sheet#3
Merged
Merged
Conversation
Introduces a new BottomSheet-based date picker with a wheel selection interface, providing a modern alternative to the traditional dialog-based calendar view.
Key changes:
- **New UI Components**:
- Added `PersianDatePickerBottomSheet`, which uses `ModalBottomSheet` to host the picker.
- Implemented `WheelDatePicker`, featuring three infinite-scrolling wheels for Year, Month, and Day selection with snapping behavior.
- Added logic to `WheelDatePicker` to dynamically adjust available days based on Jalali leap years and month lengths.
- **Refactoring**:
- Relocated `PersianDatePickerDialog` to the `com.amirmousavi_dev.date_picker.ui.dialog` package for better architectural organization.
- Updated `ConfirmationButtons` to improve the layout of the "Today", "Cancel", and "Confirm" actions.
- **Sample App & Documentation**:
- Updated the sample `MainActivity` to demonstrate the new BottomSheet implementation.
- Updated `README.md` to include instructions for both Dialog and BottomSheet styles.
- Incremented library version to `1.3.0`.
Establishes a comprehensive unit testing suite using JUnit 5 and introduces a CI pipeline for automated building and testing.
Key changes:
- **Unit Tests**: Added extensive test coverage for:
- `PersianDate`: Validates leap year calculations, month lengths, date transitions, and Gregorian conversions.
- **State Management**: Added tests for `DatePickerState` and `PersianDatePickerState` to verify UI logic and visibility handling.
- **Utilities**: Added tests for `FormatDigits` (Persian digit conversion) and `UiText`.
- **CI/CD**: Introduced `.github/workflows/android-ci.yml` to automate JDK 17 setup, unit testing, and debug builds for both the library and sample app on push or pull requests.
- **Testing Infrastructure**:
- Updated `build.gradle.kts` to support JUnit 5 (`useJUnitPlatform`) and configured `isReturnDefaultValues` for unit tests.
- Added `junit-jupiter` dependency and updated the version catalog in `libs.versions.toml`.
bottom sheet date picker
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.
No description provided.