Conversation
…fine project structure This commit introduces post-selection MIME type validation for Android and iOS, improves the gallery selection logic, and performs a significant internal refactor to improve visibility modifiers and documentation. **Breaking Changes:** - Removed `directCameraLaunch`, `dialogTitle`, `takePhotoText`, `selectFromGalleryText`, `cancelText`, and `customPickerDialog` from `ImagePickerConfig`. The library now leans towards native platform behaviors or more granular configuration. - Removed `onPhotosSelected` from `ImagePickerConfig`; use `GalleryPickerLauncher` for multiple selection flows. - `GalleryConfig` is no longer a property of `CameraCaptureConfig`. **New Features:** - Added `mimeTypeMismatchMessage` to `GalleryPickerLauncher` and `ImagePickerConfig` to provide custom error messages when selected files don't match allowed types. - Added localized string `mime_type_mismatch_error` for English, Spanish, French, and Korean. - Improved iOS `PHPicker` and `UIImagePickerController` handling to support swipe-to-dismiss detection via `UIAdaptivePresentationControllerDelegate`. - Added thread-safe caching for `PhotoResult` extensions on iOS using `NSLock`. **Fixes & Improvements:** - **Android:** Implemented post-selection URI filtering to ensure MIME types match allowed values, as the native picker doesn't always respect subtype filters (e.g., `image/webp`). - **iOS:** Added logic to verify the actual file extension/MIME type of selected items in `ImageProcessingQueue` and `GalleryDelegate`. - **Refactor:** Changed dozens of internal classes and utilities to `internal` visibility to clean up the public API surface. - **JVM:** Updated `ImagePickerLauncher` to limit selection to a single image by default to align with the `onPhotoCaptured` contract. - **Documentation:** Added comprehensive KDoc comments to public configuration classes like `ImagePickerConfig`, `CameraCaptureConfig`, and `GalleryPickerLauncher`. **Other Changes:** - Incremented project version to `1.0.33`. - Updated Detekt configuration to be less restrictive on documentation end-of-sentence formats. - Removed unused `showImagePickerDialog` and related logic on iOS.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
…fine project structure
This commit introduces post-selection MIME type validation for Android and iOS, improves the gallery selection logic, and performs a significant internal refactor to improve visibility modifiers and documentation.
Breaking Changes:
directCameraLaunch,dialogTitle,takePhotoText,selectFromGalleryText,cancelText, andcustomPickerDialogfromImagePickerConfig. The library now leans towards native platform behaviors or more granular configuration.onPhotosSelectedfromImagePickerConfig; useGalleryPickerLauncherfor multiple selection flows.GalleryConfigis no longer a property ofCameraCaptureConfig.New Features:
mimeTypeMismatchMessagetoGalleryPickerLauncherandImagePickerConfigto provide custom error messages when selected files don't match allowed types.mime_type_mismatch_errorfor English, Spanish, French, and Korean.PHPickerandUIImagePickerControllerhandling to support swipe-to-dismiss detection viaUIAdaptivePresentationControllerDelegate.PhotoResultextensions on iOS usingNSLock.Fixes & Improvements:
image/webp).ImageProcessingQueueandGalleryDelegate.internalvisibility to clean up the public API surface.ImagePickerLauncherto limit selection to a single image by default to align with theonPhotoCapturedcontract.ImagePickerConfig,CameraCaptureConfig, andGalleryPickerLauncher.Other Changes:
1.0.33.showImagePickerDialogand related logic on iOS.