stream-chat-react
stream-chat-react copied to clipboard
feat: allow to add the thread's parent message to the scrolled message list
Motivation
Currently the parent message is displayed only as fixed above the scrollable reply list in virtualized Thread. Customers requested the possibility to control, whether the parent message will stay fixed or will disappear from the view, when scrolling the virtualized Thread.
However in the non-virtualized thread, the current behavior is the opposite. The parent message is part of the scrollable list.
If a virtualized Thread's parent message scroll behavior is to be configurable, then the same has to apply for the non-virtualized Thread.
Proposed solution
Provide a flag parentMessageFixed prop on Thread'. If false the parent message can be passed into MessageList as part of the messages array.

In case of virtualized Thread the default value should be true, for backwards compatibility.
In case of non-virtualized Thread the default value will be false and so the parent message will keep scrolling with the replies.
The <ThreadStart/> component will have to be included in the scrollable list as well for backwards compatibility. But it may also be beneficial to provide flag for switching / not rendering the ThreadStart component.
Acceptance Criteria Integrator can control whether
- parent message in a
Threadis part of the scrollable list ThreadStartcomponent should or should not be rendered