Skip to content
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

Parity between Flutter and Web custom attachments #2013

Closed
1 task done
AustralianSpy opened this issue May 16, 2023 · 8 comments
Closed
1 task done

Parity between Flutter and Web custom attachments #2013

AustralianSpy opened this issue May 16, 2023 · 8 comments
Labels
enhancement New feature or request feature New capability

Comments

@AustralianSpy
Copy link

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

  • I agree to follow this project's Code of Conduct
@AustralianSpy AustralianSpy added the enhancement New feature or request label May 16, 2023
@xsahil03x
Copy link

Hey @AustralianSpy, can you share a small reproducible project where we can verify the issue and test the changes directly?

@AustralianSpy
Copy link
Author

@xsahil03x The project in question is incredibly large, so I've broken out the components I've altered so you can get a better sense of what I've attempted. https://github.com/AustralianSpy/stream-web-customization-example

@xsahil03x
Copy link

Hey @AustralianSpy, I think this should be an issue for StreamChatReact instead. Let me know so I can transfer this to that repo.

@AustralianSpy
Copy link
Author

@xsahil03x Whoops, you're absolutely right, please do!

@xsahil03x xsahil03x transferred this issue from GetStream/stream-chat-flutter May 17, 2023
@xsahil03x
Copy link

cc: @MartinCupela

@MartinCupela MartinCupela added the feature New capability label May 17, 2023
@MartinCupela
Copy link
Contributor

@AustralianSpy thank you for bringing this up. We will let our product team to take a look into how this request fits in our future plans.

@AustralianSpy
Copy link
Author

@MartinCupela Thank you!

@MartinCupela
Copy link
Contributor

Possibility add custom attachments has been added with stream-chat-react@11.18.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature New capability
Projects
None yet
Development

No branches or pull requests

3 participants