Skip to content
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

fix chat messages are not scrollable #662

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/orange-carpets-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@livekit/components-react": patch
"@livekit/components-styles": patch
---

Fix chat messages are not scrollable.
2 changes: 1 addition & 1 deletion packages/react/src/prefabs/VideoConference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export function VideoConference({
<ControlBar controls={{ chat: true }} />
</div>
<Chat
style={{ display: widgetState.showChat ? 'flex' : 'none' }}
style={{ display: widgetState.showChat ? 'grid' : 'none' }}
messageFormatter={chatMessageFormatter}
messageEncoder={chatMessageEncoder}
messageDecoder={chatMessageDecoder}
Expand Down
17 changes: 9 additions & 8 deletions packages/styles/scss/prefabs/chat.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
.chat {
display: flex;
flex-direction: column;
align-items: stretch;
display: grid;
grid-template-rows: 1fr var(--control-bar-height);
width: clamp(200px, 55ch, 60ch);
background-color: var(--bg2);
border-left: 1px solid var(--border-color);
align-items: end;
}

.chat-messages {
display: flex;
width: 100%;
flex-grow: 1;
max-height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 0.25rem;
margin-bottom: 0.5rem !important;
overflow: auto;
}

.chat-entry {
Expand Down Expand Up @@ -62,6 +59,10 @@
text-decoration: underline;
color: inherit;
}

&:last-child {
margin-bottom: 0.25rem;
}
}

.chat-form {
Expand Down
Loading