-
Notifications
You must be signed in to change notification settings - Fork 309
MessageComposerView show reply view #4746
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…efault reply view or not
1 task
MarinTolic
approved these changes
Mar 23, 2023
Contributor
MarinTolic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we should probably include patches which test the code by changing publicly visible parameters, the same way users would use them, like so:
Test patch
Index: stream-chat-android-ui-components-sample/src/main/kotlin/io/getstream/chat/ui/sample/feature/chat/ChatFragment.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/stream-chat-android-ui-components-sample/src/main/kotlin/io/getstream/chat/ui/sample/feature/chat/ChatFragment.kt b/stream-chat-android-ui-components-sample/src/main/kotlin/io/getstream/chat/ui/sample/feature/chat/ChatFragment.kt
--- a/stream-chat-android-ui-components-sample/src/main/kotlin/io/getstream/chat/ui/sample/feature/chat/ChatFragment.kt (revision 542d46cecb35b05dfa70580d0f9794cb371445d0)
+++ b/stream-chat-android-ui-components-sample/src/main/kotlin/io/getstream/chat/ui/sample/feature/chat/ChatFragment.kt (date 1679573748793)
@@ -44,6 +44,8 @@
import io.getstream.chat.android.core.ExperimentalStreamChatApi
import io.getstream.chat.android.core.internal.InternalStreamChatApi
import io.getstream.chat.android.livedata.utils.EventObserver
+import io.getstream.chat.android.ui.StyleTransformer
+import io.getstream.chat.android.ui.TransformStyle
import io.getstream.chat.android.ui.message.composer.viewmodel.MessageComposerViewModel
import io.getstream.chat.android.ui.message.composer.viewmodel.bindView
import io.getstream.chat.android.ui.message.input.viewmodel.bindView
@@ -84,6 +86,11 @@
container: ViewGroup?,
savedInstanceState: Bundle?,
): View {
+ TransformStyle.messageComposerStyleTransformer = StyleTransformer {
+ it.copy(
+ messageInputShowReplyView = false
+ )
+ }
_binding = FragmentChatBinding.inflate(inflater, container, false)
return binding.root
}
Index: stream-chat-android-ui-components-sample/src/main/res/layout/fragment_chat.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/stream-chat-android-ui-components-sample/src/main/res/layout/fragment_chat.xml b/stream-chat-android-ui-components-sample/src/main/res/layout/fragment_chat.xml
--- a/stream-chat-android-ui-components-sample/src/main/res/layout/fragment_chat.xml (revision 542d46cecb35b05dfa70580d0f9794cb371445d0)
+++ b/stream-chat-android-ui-components-sample/src/main/res/layout/fragment_chat.xml (date 1679573940214)
@@ -59,6 +59,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
+ app:streamUiMessageComposerShowMessageReplyView="false"
/>
<io.getstream.chat.android.ui.message.input.MessageInputView
☑️Reviewer Checklist
- UI Components sample runs & works
- Compose sample runs & works
- UI Changes correct (before & after images)
- Bugs validated (bugfixes)
- New feature tested and works
- Release notes and docs clearly describe changes
- All code we touched has new or updated KDocs
stream-chat-android-ui-components/src/main/res/values/attrs_message_composer_view.xml
Show resolved
Hide resolved
MarinTolic
pushed a commit
that referenced
this pull request
Apr 6, 2023
* Add messageInputShowReplyView to enable control whether to show the default reply view or not * Update changelog
15 tasks
kanat
added a commit
that referenced
this pull request
Apr 6, 2023
* MessageComposerView show reply view (#4746) * Add messageInputShowReplyView to enable control whether to show the default reply view or not * Update changelog * MessageComposerView show reply view (#4746) Generate an api dump --------- Co-authored-by: Tomislav Gazica <38032787+tgazica@users.noreply.github.com> Co-authored-by: Kanat Kiialbaev <kanat.kiialbaev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Goal
Enable the control to show/hide the reply view inside the default implementation of the
MessageComposerViewcenter content.🛠 Implementation details
Added
messageInputShowReplyViewtoMessageComposerViewStyle.🎨 UI Changes
🧪 Testing
Run this branch without patch and reply to a message. The replyView should be visible.
Run this branch with the patch and repeat. ReplyView should not be visible.
Test patch
☑️Contributor Checklist
General
developbranchCode & documentation
☑️Reviewer Checklist
🎉 GIF