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

Updated Stream Chat #624

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
18 changes: 8 additions & 10 deletions components/Chat/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Channel,
ChannelHeader,
Chat as StreamChat,
MessageInputSmall,
MessageInput,
MessageList,
Thread,
Window,
Expand Down Expand Up @@ -36,14 +36,12 @@ export default function Chat(props = {}) {
const { channelType, channelId } = props.streamChatChannel;
const isLivestream = channelType === 'livestream';

const {
getCurrentUserRoleForChatChannel,
streamChatRole,
} = useCurrentUserRoleForChatChannel({
variables: {
channelId,
},
});
const { getCurrentUserRoleForChatChannel, streamChatRole } =
useCurrentUserRoleForChatChannel({
variables: {
channelId,
},
});

// Semantic shortcuts
const connected = connectionStatus === CONNECTED;
Expand Down Expand Up @@ -139,7 +137,7 @@ export default function Chat(props = {}) {
</Box>
)}
<MessageList />
{authenticated && <MessageInputSmall noFiles={noFileUploads} />}
{authenticated && <MessageInput noFiles={noFileUploads} />}
{!authenticated && (
<Styled.CenteredContent p="base">
<Button variant="secondary" onClick={handleLoginClick}>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,16 @@
"prop-types": "^15.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-file-utils": "^1.2.0",
"react-is": "^18.2.0",
"react-multi-carousel": "2.8.4",
"react-player": "^2.9.0",
"react-quill": "^2.0.0",
"react-simple-typewriter": "^5.0.1",
"sanitize-html": "^2.7.0",
"storybook": "^7.0.18",
"stream-chat": "3.1.x",
"stream-chat-react": "^4.1.3",
"stream-chat": "^8.13.0",
"stream-chat-react": "^10.14.0",
"styled-components": "^6.0.0-rc.3",
"styled-system": "^5.1.5",
"url": "^0.11.0",
Expand Down
5 changes: 5 additions & 0 deletions pages/StreamChatOverrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@
.str-chat__message-livestream-author {
margin-bottom: 0;
}

.str-chat__message-actions-box:not(.str-chat__message-actions-box-angular):not(.str-chat__message-actions-box--mine) {
inset-block-end: 100%;
inset-inline-end: 0%;
}
2 changes: 1 addition & 1 deletion pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import JsonLD from 'components/JsonLD';
import configureNProgress from 'config/nprogress';
import { AppProvider } from 'providers';

import 'stream-chat-react/dist/css/index.css';
import 'stream-chat-react/dist/css/v2/index.css';
import './StreamChatOverrides.css';

import 'react-quill/dist/quill.snow.css';
Expand Down
Loading