feat: align the autocomplete and link preview styles with message composer addition#328
Merged
MartinCupela merged 2 commits intomainfrom Apr 28, 2025
Merged
feat: align the autocomplete and link preview styles with message composer addition#328MartinCupela merged 2 commits intomainfrom
MartinCupela merged 2 commits intomainfrom
Conversation
…message composer changes
szuperaz
approved these changes
Apr 9, 2025
github-actions Bot
pushed a commit
that referenced
this pull request
Apr 28, 2025
# [5.9.0](v5.8.1...v5.9.0) (2025-04-28) ### Features * align the autocomplete and link preview styles with message composer addition ([#328](#328)) ([fc49748](fc49748))
|
🎉 This PR is included in version 5.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
MartinCupela
added a commit
to GetStream/stream-chat-react
that referenced
this pull request
Apr 28, 2025
### 🎯 Goal Provide a message composition API supported by reactive state layer from stream-chat. The message composition logic has been moved to stream-chat. The logic kept in stream-chat-react is related only to the browser event handling. Depends on: - GetStream/stream-chat-js#1495 - GetStream/stream-chat-css#328 ### 🛠 Implementation details The message composition now relies on `MessageComposer `instance. The instance is available for the channel message list, thread message list and for editing a specific message. The `MessageComposer` instance should be accessed via `useMessageComposer` hook, that identifies the correct context (channel, thread, message). ### 🎨 UI Changes No changes BREAKING CHANGE: `Channel` props `dragAndDropWindow` & `optionalMessageInputProps` have been removed, use `WithDragAndDropUpload` component instead (#2688) BREAKING CHANGE: Attachment identity functions moved to stream-chat-js (e.g. isFileAttachment...) BREAKING CHANGE: Remove ChatAutoComplete, AutoCompleteTextarea, DefaultSuggestionList, DefaultSuggestionListItem and introduce TextareaComposer, SuggestionList, SuggestionListItem BREAKING CHANGE: Remove defaultScrollToItem function previously used by SuggestionList BREAKING CHANGE: Removed DefaultTriggerProvider component BREAKING CHANGE: Remove from Channel props - acceptedFiles, enrichURLForPreview, enrichURLForPreviewConfig, maxNumberOfFiles, multipleUploads, TriggerProvider BREAKING CHANGE: Removal of acceptedFiles, debounceURLEnrichmentMs, enrichURLForPreview, findURLFn, multipleUploads, onLinkPreviewDismissed, quotedMessage from ChannelStateContext BREAKING CHANGE: Changed signature for functions sendMessage and editMessage in ChannelActionContext BREAKING CHANGE: Changed signature for handleSubmit BREAKING CHANGE: Removed setQuotedMessage from ChannelActionContext BREAKING CHANGE: Removed types MessageToSend, StreamMessage, UpdatedMessage in favor of LocalMessage or RenderedMessage BREAKING CHANGE: Removed Trigger generics from ChannelProps BREAKING CHANGE: Message input state as well as the API is now kept within MessageComposer instead of MessageInputContext BREAKING CHANGE: Renamed useMessageInputState to useMessageInputControls as it does not handle the composition state anymore BREAKING CHANGE: Removed from MessageInputProps - disabled, disableMentions, doFileUploadRequest, doImageUploadRequest, errorHandler, getDefaultValue, mentionAllAppUsers, mentionQueryParams, message, noFiles, urlEnrichmentConfig, useMentionsTransliteration, additionalTextareaProps do not expect default value anymore BREAKING CHANGE: Changed the signature of MessageInput prop overrideSubmitHandler BREAKING CHANGE: Local attachment and link preview types moved to stream-chat BREAKING CHANGE: The SuggestionListItem UI components for TextareaComposer receive tokenizedDisplayName instead of itemNameParts BREAKING CHANGE: Removed duplicate types SendMessageOptions, UpdateMessageOptions which should be imported from stream-chat instead BREAKING CHANGE: Removed type LinkPreviewListProps - LinkPreviewList does not have any props anymore --------- Co-authored-by: Anton Arnautov <[email protected]>
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
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
Needed for GetStream/stream-chat-react#2669