Skip to content

Attach files from compose box, with file picker #57

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

Closed
gnprice opened this issue Apr 7, 2023 · 0 comments · Fixed by #63
Closed

Attach files from compose box, with file picker #57

gnprice opened this issue Apr 7, 2023 · 0 comments · Fixed by #63
Assignees
Labels
a-compose Compose box, autocomplete, attaching files/images

Comments

@gnprice
Copy link
Member

gnprice commented Apr 7, 2023

This Zulip feature: https://zulip.com/help/share-and-upload-files

Not to be confused with an image picker, #56. This feature can be represented by a "paperclip" icon, rather than "picture". The resulting UI allows selecting from a wider range of files, and has a different set of affordances less focused on images.

After the user selects a file, they should have the opportunity to add text before sending the message. (We got that right in the RN app longer ago than for images: zulip/zulip-mobile#4590.) Like for the image picker, this probably means doing the same thing as in the RN app and the web app: we immediately insert a placeholder into the message text, then start the upload, and when the file is uploaded and we have a URL for it we fill in the placeholder.

For handling the platform side of this from Flutter:

chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 13, 2023
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
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 13, 2023
Toward zulip#57, "Attach files from compose box, with file picker".
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 13, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 14, 2023
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
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 14, 2023
Toward zulip#57, "Attach files from compose box, with file picker".
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 14, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 17, 2023
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
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 17, 2023
Toward zulip#57, "Attach files from compose box, with file picker".
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 17, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 19, 2023
So far we've used this code for the generic upload-file UI (zulip#57).
Soon we'll use it for media-library uploads (zulip#56) and camera uploads
(zulip#61).
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 22, 2023
So far we've used this code for the generic upload-file UI (zulip#57).
Soon we'll use it for media-library uploads (zulip#56) and camera uploads
(zulip#61).
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue Apr 28, 2023
So far we've used this code for the generic upload-file UI (zulip#57).
Soon we'll use it for media-library uploads (zulip#56) and camera uploads
(zulip#61).
@gnprice gnprice added the a-compose Compose box, autocomplete, attaching files/images label May 27, 2023
@gnprice gnprice moved this to Done in Flutter app Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-compose Compose box, autocomplete, attaching files/images
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants