Skip to content

Persian Date bottom sheet#3

Merged
AmirMousavi-Dev merged 3 commits into
masterfrom
develop
May 20, 2026
Merged

Persian Date bottom sheet#3
AmirMousavi-Dev merged 3 commits into
masterfrom
develop

Conversation

@AmirMousavi-Dev

Copy link
Copy Markdown
Owner

No description provided.

Amir Mousavi and others added 3 commits May 20, 2026 19:15
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`.
@AmirMousavi-Dev
AmirMousavi-Dev merged commit e9b81c4 into master May 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant