8000 Allow pasting images to the composer by nuno-vieira · Pull Request #797 · GetStream/stream-chat-swiftui · GitHub
[go: up one dir, main page]

Skip to content

Allow pasting images to the composer #797

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

Merged
merged 5 commits into from
Apr 3, 2025

Conversation

nuno-vieira
Copy link
Member
@nuno-vieira nuno-vieira commented Apr 3, 2025

🔗 Issue Links

https://linear.app/stream/issue/IOS-694/[swiftui]-allow-to-copy-and-paste-images

🎯 Goal

Allow images to be pasted into the composer text input.

🛠 Implementation

Allow paste action on InputTextView, and call a closure named onImagePasted to pass the pasted image up to the MessageComposerView, then handle the image with the imagePasted method on MessageComposerViewModel.

Original PR: #754

In order to avoid breaking changes, we added the composer view model as environment object to the ComposerTextInputView like we did with other views already.

🎨 Showcase

Screen.Recording.2025-02-12.at.16.41.13.480.mov

🧪 Manual Testing Notes

Copy an image into the clipboard and paste into message composer text input. The image should be added into the composer view the same way as choosing an image from Photo library.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@nuno-vieira nuno-vieira requested a review from a team as a code owner April 3, 2025 00:08
@Stream-SDK-Bot
Copy link
Collaborator
Stream-SDK-Bot commented Apr 3, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 8.21 MB 8.21 MB +1 KB 🟢

Copy link
sonarqubecloud bot commented Apr 3, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
7.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@nuno-vieira nuno-vieira merged commit 2ff40f2 into develop Apr 3, 2025
11 of 12 checks passed
@nuno-vieira nuno-vieira deleted the add/allow-pasting-images-to-composer branch April 3, 2025 09:47
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0