-
Notifications
You must be signed in to change notification settings - Fork 309
Add images from compose box #56
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
Comments
As Alex points out in discussion: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20http.20.60Client.60/near/1545511 > Looks like doing so will allow connection reuse, which is a great > performance boost, particularly with HTTP/2. So that seems good. This will also help with file uploads (zulip#56, zulip#57, and zulip#61) because http.Client has a `send` method -- https://pub.dev/documentation/http/latest/http/Client/send.html -- that we can use for requests we want more control over (in particular, a file-upload request), and a counterpart toplevel convenience function like `http.send` isn't offered. See doc: https://pub.dev/documentation/http/latest/http/Client-class.html
As Alex points out in discussion: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20http.20.60Client.60/near/1545511 > Looks like doing so will allow connection reuse, which is a great > performance boost, particularly with HTTP/2. So that seems good. This will also help with file uploads (zulip#56, zulip#57, and zulip#61) because http.Client has a `send` method -- https://pub.dev/documentation/http/latest/http/Client/send.html -- that we can use for requests we want more control over (in particular, a file-upload request), and a counterpart toplevel convenience function like `http.send` isn't offered. See doc: https://pub.dev/documentation/http/latest/http/Client-class.html
As Alex points out in discussion: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20http.20.60Client.60/near/1545511 > Looks like doing so will allow connection reuse, which is a great > performance boost, particularly with HTTP/2. So that seems good. This will also help with file uploads (zulip#56, zulip#57, and zulip#61) because http.Client has a `send` method -- https://pub.dev/documentation/http/latest/http/Client/send.html -- that we can use for requests we want more control over (in particular, a file-upload request), and a counterpart toplevel convenience function like `http.send` isn't offered. See doc: https://pub.dev/documentation/http/latest/http/Client-class.html
Sure, good to use a first-party plugin. If we run into a problem with |
Ah, I may have already run into a problem:
|
Yeah. Looks like that's flutter/flutter#89159 and flutter/flutter#102283 . Sure, we can try |
On iOS, it looks like what we want: I can long-press on images to see them in more detail, and note the search-bar placeholder text. Will test on Android next. 🙂 |
Hmm, this doesn't look like what we'd want on Android (office device): But before giving up on |
Hmm no, I don't think this is the fancy new And if I search for "PhotoPicker" in the So yeah, maybe we'll want to do something different for Android. Hmm. |
Dang, yeah. That PhotoPicker API is available through image_picker: So that'd be an option. But pending flutter/flutter#89159, it'd lack videos unless we had two separate buttons. |
And pull out a helper from _AttachFileButton, since it also uses `file_picker` and it's convenient to reuse that code here. Fixes: zulip#56
I.e., the feature represented by a "picture" icon under the compose box, in the existing RN app.
This should present the user with an appropriate image-picker UI from the platform, where they're able to select from the images they have on the device.
After the user selects an image, they should have the opportunity to add text before sending the message. (We only fixed that pretty recently in the RN app: zulip/zulip-mobile#4540 . But it was a bad UX before that, which we shouldn't repeat.) Probably this means doing the same thing we do now (since zulip/zulip-mobile#5474) in the RN app, which is also what we do in the web app: we immediately insert a placeholder into the message text, then start the upload, and when the image is uploaded and we have a URL for it we fill in the placeholder.
For implementing the platform side of this feature:
image_picker
.The text was updated successfully, but these errors were encountered: