feat(UI): composer attachments#2514
Conversation
# Conflicts: # melos.yaml # packages/stream_chat_flutter/pubspec.yaml
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
5e48527 to
c2fd3f8
Compare
…e/composer-attachments # Conflicts: # packages/stream_chat_flutter/test/src/avatars/goldens/ci/user_avatar_0.png # packages/stream_chat_flutter/test/src/bottom_sheets/goldens/ci/edit_message_sheet_0.png
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/design-refresh #2514 +/- ##
======================================================
Coverage ? 65.12%
======================================================
Files ? 440
Lines ? 26446
Branches ? 0
======================================================
Hits ? 17224
Misses ? 9222
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| Widget build(BuildContext context) { | ||
| var buttonState = StreamMessageComposerInputTrailingState.microphone; | ||
| if (widget.props.isAudioRecordingFlowActive) { | ||
| buttonState = StreamMessageComposerInputTrailingState.voiceRecordingActive; | ||
| } | ||
|
|
||
| if (_hasText || widget.props.controller.attachments.isNotEmpty) { | ||
| buttonState = StreamMessageComposerInputTrailingState.send; | ||
| } | ||
|
|
||
| return widget.props.isAudioRecordingFlowLocked || widget.props.isAudioRecordingFlowStopped | ||
| ? const SizedBox.shrink() | ||
| : StreamBaseMessageComposerInputTrailing( | ||
| controller: widget.props.controller.textFieldController, | ||
| onSendPressed: widget.props.onSendPressed, | ||
| voiceRecordingCallback: widget.props.voiceRecordingCallback, | ||
| buttonState: buttonState, | ||
| ); |
There was a problem hiding this comment.
We can use a value listenable here and make it stateless
Submit a pull request
Linear: FLU-371
CLA
Description of the pull request
This PR has 2 big features. It adds the attachments in the
DefaultStreamMessageComposerInputHeader. The header used to be completely empty.Required PR in core: GetStream/stream-core-flutter#55
Most attachments look good, only the attachment for audio/voice has to be updated to the new UI.
It also updates the audio recorder to fit with the new composer. The audio recorder is not fully finished yet, it's still missing the waveform on the locked and stopped states.
This PR is already quite big and was focussed on showing media and file attachments.
TODO for next PRs:
StreamMessageInput,StreamMessageInputAttachmentListandStreamAudioRecorderButton.Screenshots / Videos
composer.demo.mov