stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

Parity between Flutter and Web custom attachments

Open AustralianSpy opened this issue 1 year ago • 7 comments

Please select which package this feature is related to

stream_chat

Which platforms would this feature impact?

Web

Is your feature request related to a problem?

The custom attachment functionality on web is not parallel with Flutter, which is causing a lot of pain for a multi-platform application.

Describe the solution that you'd like

It would be nice if more props were exposed, as in Flutter, to customize the behavior of attachments on web. In particular, trying to accommodate an attachment preview caused further issues down the line when trying to send the message, and there is no ideal way to store a custom attachment in state (so it can be altered or cleared) before it is sent.

Describe alternatives that you have considered

Custom attachments require quite a bit of back-dooring on web: an extra context provider to maintain awareness of a custom attachment being to be consumed by multiple components, abuse of Cards as a catch-all for custom attachment types, and abuse of the imageUploads functionality to allow for thumbnail previews of the attachment. While cumbersome, most of this did indeed work, but the solution began to fall apart when trying to add attachment previews as it altered the data being sent.

Additional context

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

AustralianSpy avatar May 16 '23 18:05 AustralianSpy