-
Notifications
You must be signed in to change notification settings - Fork 273
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
[5422] AttachmentsPickerSystemTabFactory configuration and bug fixes #5430
Conversation
…ix the buttons getting cropped. Fix permission message shown below the buttons.
…e all items are visible.
…bugfixes # Conflicts: # CHANGELOG.md
…bugfixes # Conflicts: # CHANGELOG.md
...t/android/compose/ui/messages/attachments/factory/AttachmentsPickerMediaCaptureTabFactory.kt
Outdated
Show resolved
Hide resolved
...am/chat/android/compose/ui/messages/attachments/factory/AttachmentsPickerSystemTabFactory.kt
Show resolved
Hide resolved
@VelikovPetar could you please add the ticket number to the PR title like |
…bugfixes # Conflicts: # CHANGELOG.md
…gfixes' into fix/system-attachments-picker-bugfixes
I added the missing info, I think its more clear now 🙂 |
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.
LGTM
🎯 Goal
Fixes couple of UI bugs in the new
AttachmentsPickerSystemTabFactory
and makes its content configurable.Resolves: #5422
🛠 Implementation details
AttachmentsPickerSystemTabFactory
configurable: It now accepts a list of the following flags, instructing which types of attachment pickers it supports:filesAllowed
- if the file attachments picker is allowedmediaAllowed
- if the photo attachment picker is allowedcaptureImageAllowed
- if the photo capture option is allowedcaptureVideoAllowed
- if the video capture option is allowedpollAllowed
- if the poll option is allowedThe
AttachmentsPickerTabFactories#defaultFactoriesWithoutStoragePermissions
is also extended with the same options, similar to the already existingAttachmentsPickerTabFactories#defaultFactories
CAMERA
permission, even when using theAttachmentsPickerSystemTabFactory
: If theCAMERA
permission is declared in the app manifest and is not granted, we still must request the permission, before staring the camera capture. (if theCAMERA
permission is not declared in the Manifest, or is declared and granted, it works properly)🎨 UI Changes
Add relevant videos
xml_permission_before.mp4
xml_permission_after.mp4
compose_permission_before.mp4
compose_permission_after.updated.mp4
🧪 Testing
Permissions bug:
useDefaultSystemMediaPicker
)CAMERA
permission is declared in the Manifest, but is not grantedPatch for permissions bug testing
Button scrollability:
useDefaultSystemMediaPicker
)☑️Contributor Checklist
General
develop
branchCode & documentation
☑️Reviewer Checklist
🎉 GIF
Please provide a suitable gif that describes your work on this pull request