feat: multiple media selection on Drive conversations - WPB-24046#4613
feat: multiple media selection on Drive conversations - WPB-24046#4613
Conversation
…e uploaded asset after editing (wip)
…rom picker, handle media edition, fix issue on tap.
Test Results4 552 tests 4 525 ✅ 7m 40s ⏱️ Results for commit 35d830e. ♻️ This comment has been updated with latest results. Summary: workflow run #25305822495 |
…m/wireapp/wire-ios into feat/drive-multiple-media-selection
johnxnguyen
left a comment
There was a problem hiding this comment.
Looks good, left a couple questions.
| guard error == nil, let url else { return } | ||
| self.uploadFiles(at: [url]) |
There was a problem hiding this comment.
question: does the temp directory need to be cleanup here too?
There was a problem hiding this comment.
I extracted the legacy code into a separated reusable function here however you might be right.. I'll check it
| } | ||
| if useWireDrive(), sourceType != .camera { | ||
| // Allows multiple media selection on Wire drive conversations. | ||
| // Non-drive conversations use the (legacy) `UIImagePickerController` API. |
There was a problem hiding this comment.
question: would it be possible to use PHPicker on other conversations? I know it might be out of scope, but just wonder how big would be the change? maybe on a separate PR?
There was a problem hiding this comment.
yes it would be possible but only for photos: PHPickerViewController doesn't handle camera.
The UIImagePickerController handles both.
We'll always end up with two different APIs to use however it might make more sense to use the PHPickerViewController for photos (all conversations) and continue to use UIImagePickerController (or another API) only for camera.
I don't think this would be too difficult to change (separated task / PR).
|
|
||
| let draft = WireDriveDraft( | ||
| nodeID: UUID(), | ||
| nodeID: nodeID ?? UUID(), |
There was a problem hiding this comment.
If we need an UUID to create a WireDriveDraft, why is it not mandatory on the invoke function?
Maybe there is a reason for it but I would prefer to avoid nullability and avoid assigning this UUID in different places (default value on SendableImage & ConversationInputBarViewController if provided by draft object).
We could remove the default value on SendableImage and if draft.nodeId is null just use UUID()
There was a problem hiding this comment.
this is optional because sometimes the draft doesn't exist and we create it from scratch, and sometimes it does and we want to update it. I agree the naming is confusing here, I will find something better.
There was a problem hiding this comment.
done, the naming is a bit more explicit and gives more context on why it can be optional.
OlivellaO
left a comment
There was a problem hiding this comment.
Approved with question
…ed drafts uploads (native picker) adjust send button in edition screen
WilhelmOks
left a comment
There was a problem hiding this comment.
LGTM. Added a few comments.
…m/wireapp/wire-ios into feat/drive-multiple-media-selection
Test Results – WireMessagingAll302 tests 302 ✅ 1m 3s ⏱️ Results for commit 690ac06. ♻️ This comment has been updated with latest results. |
Test Results – Wire-iOS0 tests 0 ✅ 0s ⏱️ Results for commit 690ac06. ♻️ This comment has been updated with latest results. |
|
@netbe @johnxnguyen @WilhelmOks @OlivellaO FYI, I made some improvements / fixes following the PT, these are visible in this single commit: 700d393
Feel free to review it if you want. |
|
Test Results – WireUIAll161 tests 160 ✅ 1m 14s ⏱️ Results for commit 690ac06. |
Test Results – WireDataModel2 377 tests 2 377 ✅ 3m 49s ⏱️ Results for commit 690ac06. |



Issue
Currently user has to select each image from the gallery (custom and native one) one by one and approve it in full screen view.
This PR introduces changes to allow the user to frictionlessly upload multiple media at once.
Overview
PHPickerViewControlleris introduced to allow multiple media selection (previouslyUIImagePickerControllerwas used)Testing
Wire drive conversations
Non-Wire drive conversations (non regression test)
Checklist
[WPB-XXX].UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: