ephemeraHQ / xmtp-inbox-web

XMTP Inbox web chat app
https://dev.xmtp.chat
MIT License
33 stars 42 forks source link

Support attachments in Inbox Web #209

Closed yash-luna closed 1 year ago

yash-luna commented 1 year ago

Enable users to send & receive images, gifs, videos, voice notes, documents, and payments via xmtp.chat. Share reference implementation with devs along with learnings captured in tutorials and the content type repo (https://github.com/xmtp/xmtp-js-content-types)

[Copying from discussion below for visibility] Decision log: scope down attachments work to a v0.5 release to the MUST HAVE functionality that includes generic attachments (with rendering support for image files) and crypto send payments (moved to its own issue - https://github.com/xmtp-labs/xmtp-inbox-web/issues/299).

Attachments - acceptance criteria:

MUST HAVE:

SHOULD HAVE:

NICE TO HAVE:

[Moved payments criteria to a dedicated issue]

### Tasks
- [ ] https://github.com/xmtp-labs/xmtp-inbox-web/issues/259
- [ ] https://github.com/xmtp-labs/xmtp-inbox-web/issues/279
- [ ] https://github.com/xmtp-labs/hq/issues/1024
nakajima commented 1 year ago

This is waiting on some designs from @darickdang.

darickdang commented 1 year ago

@yash-luna My designs weren't actually too far from what WhatsApp has on desktop so I made additional adjustments to bring them more in line with both WhatsApp and Messages.

Here are how the content types look like within a conversation view:

Content types in conversations

When hovered, we'd expose a down arrow they could click for additional options. Here I've added some potential future features we could add to this menu:

CleanShot 2023-04-27 at 21 57 07@2x

Here are how they look extracted from the UI:

Content types

Finally, regarding previewing the content, do we want to build an image/video preview UI?

WhatsApp has a full-blown media browser and iMessage/Messages plays video inline and uses Mac/iOS native media players to handle the preview. I'm happy to design a media preview/browser but I wanted to confirm with you before doing.

yash-luna commented 1 year ago

These look great @darickdang! Couple questions:

daria-github commented 1 year ago

Thanks @darickdang & @yash-luna! We'll also need to know how we want to handle storage — do we want to host these ourselves or have users provide a token? If the token route, we'll need some designs around that.

darickdang commented 1 year ago

Hey all, in the spirit of keeping things as unblocked as possible while I hammer out some of the details @yash-luna mentioned, here are links to the Figma for the screens above:

https://www.figma.com/file/8wFBRFdiYY0kOwLapSSiHA/In_box-Web-Designs-(Working)?type=design&node-id=2341%3A16527&t=bsxlnqkoD1cse6rH-1

yash-luna commented 1 year ago

As a default, let's provide it ourselves so sharing attachments over XMTP is as easy as iMessage, Whatsapp, Messenger.

We can add token based storage as opt-in later but it shouldn't be the default because it increases friction

yash-luna commented 1 year ago

Decision log: scope down attachments work to a v0.5 release for the MUST HAVE that includes generic attachments (with rendering support for images) and crypto send payments.

Attachments - acceptance criteria:

MUST HAVE:

NICE TO HAVE:

Payments - acceptance critieria:

MUST HAVE:

SHOULD HAVE:

NICE TO HAVE:

saulmc commented 1 year ago

All attachments in the message list UI have a button to download. This button is displayed on hover. Hover is activated when pointer is anywhere in the attachment/image card in the message list UI

Stands out to me as a nice-to-have relative to the items listed above it, and could be expensive to build. Why is "right click save as" not sufficient?

nplasterer commented 1 year ago

This feels like a tracking issue for all the attachment work and I suggest we break out each attachment type into individual issues. I started this for image attachments.