Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7c9018b
Add replyType
HoonBaek Sep 23, 2021
bc30e85
Add and use min.js instead of sendbird to apply not released change f…
HoonBaek Sep 23, 2021
f7b1402
Change name ReplyingMessage to QuoteMessage
HoonBaek Sep 28, 2021
d317928
Change name ReplyingMessageAttachment to QuoteMessageInput
HoonBaek Sep 28, 2021
2585741
Change name QuoteMessageItemBody to QuoteMessage
HoonBaek Sep 29, 2021
82e4a65
Ignore sendbird.min.js on lint
HoonBaek Oct 1, 2021
f378010
Add and apply replyType and quoteMessage
HoonBaek Oct 1, 2021
39fd03e
Clean up codes and class names, Modify samples
HoonBaek Oct 1, 2021
60dc798
Add and modify CSS
HoonBaek Oct 1, 2021
5b07be3
Add filter for includeParentMessageInfo in the filterMessageListParams
HoonBaek Oct 1, 2021
924e090
Remove legacy snapshot
HoonBaek Oct 5, 2021
335a69c
Apply replyType to messageListParams (#32)
HoonBaek Oct 14, 2021
ff79342
[UK-973] Design change for message menu and status (#31)
HoonBaek Oct 14, 2021
4434364
Remove empty CSS file
HoonBaek Oct 14, 2021
72d57ec
Add space to fix lint error
HoonBaek Oct 15, 2021
f025a8d
Open props replyType of the App component
HoonBaek Oct 18, 2021
06a9771
[QU-291] Add quote message into callback props (#41)
HoonBaek Oct 26, 2021
f497585
[QU-305] Match width of message and emoji reactions (#43)
HoonBaek Oct 26, 2021
0944cdd
[QU-294] Storybook sample update (#46)
HoonBaek Oct 26, 2021
1d1c489
[QU-298] Fix message filter issue (#42)
HoonBaek Oct 26, 2021
b51c13a
[QU-289] Get messages with include thread info (#45)
HoonBaek Oct 26, 2021
e9b083d
[QU-308] Fix dark theme color issue (#48)
HoonBaek Oct 28, 2021
a72986c
[QU-321] Quote message input width (#52)
HoonBaek Oct 28, 2021
284293c
[QU-306] Make quote message have only two lines (#51)
HoonBaek Oct 28, 2021
1fff0a8
[QU-320] Place holder of message input when replying (#50)
HoonBaek Oct 28, 2021
4947bb2
[QU-299] Apply name first before applying url (#49)
HoonBaek Oct 28, 2021
dae2667
Finalize message threading integration (#53)
HoonBaek Nov 4, 2021
e4d9778
Merge branch 'main' into feature/UK-932/Integrate-message-threading
HoonBaek Nov 4, 2021
ffdf554
Add useReply option into the App sample
HoonBaek Nov 7, 2021
c888909
Apply 'only_reply_to_channel' to the messageListParams when replyType…
HoonBaek Nov 8, 2021
0b7fbf0
Add optional chiaing for isResendable and modify for clear boolean ty…
HoonBaek Nov 8, 2021
4425363
Hide outline of message menu item on focus-visible by designer request
HoonBaek Nov 8, 2021
d137fe4
Update key name of stringSet and display 'You' when current user matc…
HoonBaek Nov 8, 2021
4b827f8
[QU-358] Do not display message status component if channel type is s…
HoonBaek Nov 9, 2021
23707d7
Make placeholder icon center in the og thumbnail
HoonBaek Nov 9, 2021
500f7d1
Don't display message status if channel type is broadcast or it does …
HoonBaek Nov 9, 2021
c5b3004
Undisplay message status icon in the message status component in spec…
HoonBaek Nov 9, 2021
e380757
Set animated message for replying and highlighted message for searchi…
HoonBaek Nov 10, 2021
5822c14
Hide input props of messag threading and clean up codes by review
HoonBaek Nov 10, 2021
a6d852a
Reset animatedMessageId after the scroll hooks are ran
HoonBaek Nov 12, 2021
182dbba
Modify duplicate messages removal logic to consider sequence of the r…
HoonBaek Nov 12, 2021
0fddc88
Set quote message to null when it equals the deleted message
HoonBaek Nov 12, 2021
98c4226
Fix for lint
HoonBaek Nov 12, 2021
a6334f3
Merge branch 'main' into feature/UK-932/Integrate-message-threading
HoonBaek Nov 18, 2021
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
29,830 changes: 10,787 additions & 19,043 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@
"prop-types": "^15.7.2",
"react": "^16.8.6 || ^17.0.0",
"react-dom": "^16.8.6 || ^17.0.0",
"sendbird": "^3.0.154"
"sendbird": "^3.0.160"
},
"dependencies": {
"css-vars-ponyfill": "^2.3.2",
"date-fns": "^2.16.1",
"prop-types": "^15.7.2",
"react": "^16.8.6 || ^17.0.0",
"react-dom": "^16.8.6 || ^17.0.0",
"sendbird": "^3.0.154"
"sendbird": "^3.0.160"
},
"bugs": {
"url": "https://community.sendbird.com"
Expand Down
6 changes: 4 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export type Logger = {
};

export type SendbirdError = Sendbird.SendBirdError;
export type ReplyType = "NONE" | "QUOTE_REPLY" | "THREAD";

export interface RenderOpenChannelTitleProps {
channel: Sendbird.OpenChannel;
Expand Down Expand Up @@ -165,6 +166,7 @@ export interface RenderGroupChannelMessageInputProps {
channel: Sendbird.GroupChannel;
user: Sendbird.User;
disabled: boolean;
quoteMessage?: Sendbird.UserMessage | Sendbird.FileMessage;
}

export interface ClientMessageSearchQuery extends SendBird.MessageSearchQuery {
Expand Down Expand Up @@ -375,8 +377,8 @@ interface ChannelProps {
onSearchClick?(): void;
highlightedMessage?: string | number;
startingPoint?: number;
onBeforeSendUserMessage?(text: string): Sendbird.UserMessageParams;
onBeforeSendFileMessage?(file: File): Sendbird.FileMessageParams;
onBeforeSendUserMessage?(text: string, quoteMessage?: Sendbird.UserMessage | Sendbird.FileMessage): Sendbird.UserMessageParams;
onBeforeSendFileMessage?(file: File, quoteMessage?: Sendbird.UserMessage | Sendbird.FileMessage): Sendbird.FileMessageParams;
onBeforeUpdateUserMessage?(text: string): Sendbird.UserMessageParams;
onChatHeaderActionClick?(event: React.MouseEvent<HTMLElement>): void;
renderCustomMessage?: RenderCustomMessage;
Expand Down
4 changes: 4 additions & 0 deletions src/smart-components/App/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default function App(props) {
profileUrl,
config = {},
useReaction,
// replyType,
useMessageGrouping,
colorSet,
stringSet,
Expand Down Expand Up @@ -96,6 +97,7 @@ export default function App(props) {
startingPoint={startingPoint}
highlightedMessage={highlightedMessage}
useReaction={useReaction}
// replyType={replyType}
useMessageGrouping={useMessageGrouping}
/>
</div>
Expand Down Expand Up @@ -156,6 +158,7 @@ App.propTypes = {
]),
}),
useReaction: PropTypes.bool,
// replyType: PropTypes.oneOf(['NONE', 'QUOTE_REPLY', 'THREAD']),
showSearchIcon: PropTypes.bool,
useMessageGrouping: PropTypes.bool,
stringSet: PropTypes.objectOf(PropTypes.string),
Expand Down Expand Up @@ -186,6 +189,7 @@ App.defaultProps = {
renderUserProfile: null,
config: {},
useReaction: true,
// replyType: 'NONE',
useMessageGrouping: true,
stringSet: null,
colorSet: null,
Expand Down
1 change: 1 addition & 0 deletions src/smart-components/App/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
.sendbird-app__conversation-wrap {
flex: 1;
position: relative;
width: calc(100% - 320px);
}
.sendbird-app__channellist-wrap {
max-width: 320px;
Expand Down
105 changes: 63 additions & 42 deletions src/smart-components/App/stories/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ export const versionInfo = () => {
<>
<div>UIKit: {pkg.version}</div>
<div>Sendbird SDK: {pkg.dependencies.sendbird.version}</div>
<button onClick={() => { setshowAll(!showAll)}}>Show all</button>
<button onClick={() => { setshowAll(!showAll) }}>Show all</button>
{
showAll && (
<div>
{
Object.keys(pkg.dependencies)
.map((p) => (
<div key={p}>{p}: {pkg.dependencies[p].version}</div>
))
}
</div>
<div>
{
Object.keys(pkg.dependencies)
.map((p) => (
<div key={p}>{p}: {pkg.dependencies[p].version}</div>
))
}
</div>
)
}
</>
Expand All @@ -47,7 +47,7 @@ export const basicSDK = () => fitPageSize(
userId={userId}
nickname={userId}
showSearchIcon
/*config={{ logLevel: 'all' }}*/
/*config={{ logLevel: 'all' }}*/
/>
);

Expand All @@ -68,6 +68,7 @@ export const login = () => {
const [theme, setTheme] = useState('light');
const [messageSearch, setMessageSearch] = useState(true);
const [profileEdit, setProfileEdit] = useState(true);
const [useReply, setUseReply] = useState(true);
return isLoginPage
? fitPageSize(
<div
Expand Down Expand Up @@ -111,8 +112,8 @@ export const login = () => {
type="button"
value={
messageSearch
? 'Use MessageSearch'
: 'Not use MessageSearch'
? 'Use MessageSearch'
: 'Not use MessageSearch'
}
onClick={() => setMessageSearch(!messageSearch)}
/>
Expand All @@ -121,11 +122,21 @@ export const login = () => {
type="button"
value={
profileEdit
? 'Use ProfileEdit'
: 'Not use ProfileEdit'
? 'Use ProfileEdit'
: 'Not use ProfileEdit'
}
onClick={() => setProfileEdit(!profileEdit)}
/>
<input
className="input__toggle-use-reply"
type="button"
value={
useReply
? 'Use Reply'
: 'Not use Reply'
}
onClick={() => setUseReply(!useReply)}
/>
<input
className="login-submit"
type="submit"
Expand All @@ -142,6 +153,7 @@ export const login = () => {
theme={theme}
showSearchIcon={messageSearch}
allowProfileEdit={profileEdit}
replyType={useReply ? 'QUOTE_REPLY' : 'NONE'}
/>
)
};
Expand All @@ -162,7 +174,7 @@ export const updateProfile = () => {
);
};

const age = 60;
const age = 70;
const array = [
`hoon${age}1`,
`hoon${age}2`,
Expand Down Expand Up @@ -196,6 +208,7 @@ export const user1 = () => fitPageSize(
profileUrl={addProfile}
config={{ logLevel: 'all' }}
queries={{}}
replyType="QUOTE_REPLY"
/>
);
export const user2 = () => fitPageSize(
Expand All @@ -206,7 +219,12 @@ export const user2 = () => fitPageSize(
showSearchIcon
allowProfileEdit
profileUrl={addProfile}
// config={{ logLevel: 'all' }}
replyType="QUOTE_REPLY"
imageCompression={{
compressionRate: 0.5,
resizingWidth: 100,
resizingHeight: '100px',
}}
/>
);
export const user3 = () => fitPageSize(
Expand All @@ -218,11 +236,7 @@ export const user3 = () => fitPageSize(
showSearchIcon
allowProfileEdit
profileUrl={addProfile}
imageCompression={{
compressionRate: 0.5,
resizingWidth: 100,
resizingHeight: '100px',
}}
replyType="QUOTE_REPLY"
/>
);

Expand Down Expand Up @@ -262,10 +276,25 @@ const CustomApp = () => {
imageCompression={{ compressionRate: 0.5, resizingWidth: 100, resizingHeight: '100px' }}
>
<div style={{ height: '100%', width: '100%', display: 'flex', flexDirection: 'row' }}>
<SBChannelList setChannelUrl={setChannelUrl} />
<div style={{ height: '100%', width: '100%', display: 'inline-flex', flexDirection: 'row' }}>
<SBChannelList setChannelUrl={setChannelUrl} />
<div style={{ height: '100%', width: '100%', display: 'inline-flex', flexDirection: 'row' }}>
<div style={{ width: '100%' }}>
<Conversation
channelUrl={channelUrl}
onChatHeaderActionClick={() => {
setChannelSearch(false);
setChannelSettings(true);
}}
showSearchIcon
onSearchClick={() => {
setChannelSettings(false);
setChannelSearch(true);
}}
/>
</div>
{channelSearch && (
<div style={{ width: '100%' }}>
<Conversation
<MessageSearch
channelUrl={channelUrl}
onChatHeaderActionClick={() => {
setChannelSearch(false);
Expand All @@ -281,25 +310,17 @@ const CustomApp = () => {
}}
/>
</div>
{channelSearch && (
<div style={{ width: '100%' }}>
<MessageSearch
channelUrl={channelUrl}
searchString="hello"
onResultClick={() => {}}
/>
</div>
)}
{channelSettings && (
<div style={{ display: 'inline-flex'}}>
<ChannelSettings
channelUrl={channelUrl}
onCloseClick={() => setChannelSettings(false)}
/>
</div>
)}
</div>
)}
{channelSettings && (
<div style={{ display: 'inline-flex' }}>
<ChannelSettings
channelUrl={channelUrl}
onCloseClick={() => setChannelSettings(false)}
/>
</div>
)}
</div>
</div>
</Sendbird>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/smart-components/ChannelList/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export const pubSubHandler = (pubSub, channelListDispatcher) => {
subScriber.set(topics.UPDATE_USER_MESSAGE, pubSub.subscribe(topics.UPDATE_USER_MESSAGE, (msg) => {
const { channel, message } = msg;
const updatedChannel = channel;
if (updatedChannel.lastMessage && updatedChannel.lastMessage.messageId === message.messageId) {
if (updatedChannel?.lastMessage?.messageId === message.messageId) {
updatedChannel.lastMessage = message;
}
if (channel) {
Expand Down
Loading