Repository navigation
fix(ui): keep the keyboard open when removing the composer link preview - #3120
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Clear preview while retaining focus packages/stream_chat_flutter/lib/src/components/message_composer/message_composer_input_header.dart, packages/stream_chat_flutter/test/src/message_input/message_composer_url_enrichment_test.dart, packages/stream_chat_flutter/CHANGELOG.md |
The removal callback now clears the OG attachment without unfocusing the composer. The widget test checks that the preview is removed and the input remains focused. The changelog adds an entry about keyboard behavior. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- GetStream/stream-chat-flutter#3102: Changes the same composer input header and preview components.
Suggested reviewers: velikovpetar
Merge Risk: 
Minimal · up to acb22
-
The preview is cleared while composer focus is retained, and the change is ready to merge.
Pre-merge checks: 
4
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3120 +/- ##
==========================================
+ Coverage 80.28% 80.32% +0.03%
==========================================
Files 455 455
Lines 29614 29612 -2
==========================================
+ Hits 23775 23785 +10
+ Misses 5839 5827 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Merge note: #3119 changes the line above in the same handler. Whichever merges second keeps |
What
Removing the link preview in the message composer also unfocused the input and closed the keyboard. The other remove buttons in the composer header (edit, quoted reply, attachments) keep focus, and so do Android, iOS, React and React Native when their link preview is dismissed. The "x" now just clears the preview.
Verification
message_composer_url_enrichment_test.dart: the input keeps focus after the preview is removed (fails without the fix).🤖 Generated with Claude Code
Summary by CodeRabbit