Skip to content

Commit fc1daf8

Browse files
authored
Merge pull request #1075 from GetStream/virtual-message-simple
Virtual message simple
2 parents ffa284d + c66430b commit fc1daf8

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Chore
1010

1111
- Replace `replaceAll` method with `replace` and add global flag for older browser support [#1074](https://github.com/GetStream/stream-chat-react/pull/1074)
12+
- Adjust `VirtualizedMessageList` CSS to support `MessageSimple` [#1075](https://github.com/GetStream/stream-chat-react/pull/1075)
1213

1314
## [6.4.6](https://github.com/GetStream/stream-chat-react/releases/tag/v6.4.6) 2021-07-23
1415

src/components/MessageList/VirtualizedMessageList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { DateSeparator as DefaultDateSeparator } from '../DateSeparator/DateSepa
1919
import { EmptyStateIndicator as DefaultEmptyStateIndicator } from '../EmptyStateIndicator/EmptyStateIndicator';
2020
import { EventComponent } from '../EventComponent/EventComponent';
2121
import { LoadingIndicator as DefaultLoadingIndicator } from '../Loading/LoadingIndicator';
22-
import { FixedHeightMessage, Message, MessageUIComponentProps } from '../Message';
22+
import { Message, MessageSimple, MessageUIComponentProps } from '../Message';
2323

2424
import {
2525
ChannelActionContextValue,
@@ -100,7 +100,7 @@ const VirtualizedMessageListWithContext = <
100100
MessageNotification = DefaultMessageNotification,
101101
MessageSystem = EventComponent,
102102
TypingIndicator = null,
103-
VirtualMessage: contextMessage = FixedHeightMessage,
103+
VirtualMessage: contextMessage = MessageSimple,
104104
} = useComponentContext<At, Ch, Co, Ev, Me, Re, Us>();
105105

106106
const { t } = useTranslationContext();

src/styles/MessageList.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@
164164

165165
p {
166166
margin: 0 !important; // always use padding, margin mess up the height calculations
167+
168+
a {
169+
white-space: pre-line;
170+
overflow: hidden;
171+
word-wrap: break-word;
172+
}
167173
}
168174
}
169175

src/styles/VirtualMessage.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.str-chat__virtual-list {
22
.str-chat__virtual-list-message-wrapper {
3-
// display: inline-block;
3+
padding: 20px 40px;
44
width: 100%;
55
}
66

0 commit comments

Comments
 (0)