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

feat(CLNP-3087): message threading #181

Open
wants to merge 81 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
1727b18
Implement GroupChannel thread.
OnestarLee May 9, 2024
0620e93
Clean up code
OnestarLee May 30, 2024
48c6727
Fixed lint
OnestarLee May 30, 2024
636a0b9
Update uikit-tools version
OnestarLee May 30, 2024
4f06819
Apply review
OnestarLee May 31, 2024
252b977
Fixed lint
OnestarLee May 31, 2024
a4861ac
Apply review
OnestarLee May 31, 2024
169b40e
Apply review
OnestarLee May 31, 2024
f2de01a
Apply review
OnestarLee May 31, 2024
528c209
Apply review
OnestarLee May 31, 2024
1af97bf
Changed threadReplySelectType to thread
OnestarLee May 31, 2024
c793d25
Apply review
OnestarLee May 31, 2024
a915920
chore: update parent message reactions UI
bang9 May 31, 2024
6a9b220
chore: add applyReactionEvent to reaction addon
bang9 May 31, 2024
0e40c3d
chore: resolve message gap issue in thread fragment
bang9 May 31, 2024
08d4a54
Apply review
OnestarLee May 31, 2024
514efc1
chore: disable message grouping if reply or thread message
bang9 May 31, 2024
9ae9a63
chore: update message grouping logic
bang9 May 31, 2024
431454b
chore: add color to more button.
OnestarLee May 31, 2024
d6732fd
chore: fixed lint.
OnestarLee May 31, 2024
e494858
chore: update parent message properly
bang9 May 31, 2024
c519bbb
chore: improve thread message list.
OnestarLee Jun 1, 2024
db2c418
Merge remote-tracking branch 'origin/feat/message-threading' into fea…
OnestarLee Jun 1, 2024
03ae8a1
chore: improve thread message list.
OnestarLee Jun 1, 2024
fba519d
chore: change version for sample test.
OnestarLee Jun 1, 2024
f4753cd
chore: fixed not going to channel when clicking title.
OnestarLee Jun 4, 2024
8bd34b7
chore: fixed to show 'Reply to thread' in the placeholder when there…
OnestarLee Jun 4, 2024
7f2b70a
chore: removed NewMessageButton, ScrollToBottomButton in thread.
OnestarLee Jun 4, 2024
b61954b
chore: fixed usernames are not displaying in thread.
OnestarLee Jun 4, 2024
1e8b68e
chore: fixed an issue where it is possible to enter an invalid thread.
OnestarLee Jun 4, 2024
54e37b6
chore: fixed an issue where incorrect sentences are displayed when re…
OnestarLee Jun 4, 2024
805c80f
chore: removed NewMessageButton, ScrollToBottomButton in thread.
OnestarLee Jun 4, 2024
dabeb0b
Implement GroupChannel thread.
OnestarLee May 9, 2024
4144be4
Clean up code
OnestarLee May 30, 2024
e061099
Fixed lint
OnestarLee May 30, 2024
2baa437
Update uikit-tools version
OnestarLee May 30, 2024
95e61d5
Apply review
OnestarLee May 31, 2024
c532fdd
Fixed lint
OnestarLee May 31, 2024
a6238f8
Apply review
OnestarLee May 31, 2024
7d741ca
Apply review
OnestarLee May 31, 2024
40c2c69
Apply review
OnestarLee May 31, 2024
1d71dee
Apply review
OnestarLee May 31, 2024
9f9f455
Changed threadReplySelectType to thread
OnestarLee May 31, 2024
bbf42aa
Apply review
OnestarLee May 31, 2024
4d8e78e
chore: update parent message reactions UI
bang9 May 31, 2024
92f56e1
chore: add applyReactionEvent to reaction addon
bang9 May 31, 2024
6462d28
chore: resolve message gap issue in thread fragment
bang9 May 31, 2024
50bd116
Apply review
OnestarLee May 31, 2024
8c7de1f
chore: disable message grouping if reply or thread message
bang9 May 31, 2024
fc4da02
chore: update message grouping logic
bang9 May 31, 2024
14c01e2
chore: add color to more button.
OnestarLee May 31, 2024
918d39c
chore: fixed lint.
OnestarLee May 31, 2024
9701a86
chore: improve thread message list.
OnestarLee Jun 1, 2024
cd5e18d
chore: update parent message properly
bang9 May 31, 2024
a0f26e3
chore: improve thread message list.
OnestarLee Jun 1, 2024
7e80e69
chore: changed replyType to quote_reply
OnestarLee Jun 5, 2024
9d55ef1
Merge remote-tracking branch 'refs/remotes/origin/feat/message-thread…
OnestarLee Jun 14, 2024
742180b
chore: fixed inverted no message.
OnestarLee Jun 14, 2024
c2bd6c9
chore: update reply count format to display 99+ replies for counts of…
OnestarLee Jun 14, 2024
5147852
chore: fixed issue with mention suggestion list sorting
OnestarLee Jun 17, 2024
f7a4334
chore: fixed issue with file upload size limit exceeded
OnestarLee Jun 18, 2024
9fe3a0f
chore: fixed issue with file upload size limit exceeded
OnestarLee Jun 18, 2024
5390017
chore: add voice message status manager
OnestarLee Jun 21, 2024
226fdb6
chore: add voice message status manager
OnestarLee Jun 23, 2024
ceae6b8
chore: change scroll timeout
OnestarLee Jun 23, 2024
4e797aa
chore: organize code
OnestarLee Jun 23, 2024
7b9072c
chore: fixed scroll issue
OnestarLee Jun 23, 2024
1b59c86
chore: apply review.
OnestarLee Jun 28, 2024
f906482
chore: update note
bang9 Jun 28, 2024
6a07692
chore: apply review.
OnestarLee Jun 28, 2024
59c1b2d
Merge remote-tracking branch 'origin/feat/message-threading-qa' into …
OnestarLee Jun 28, 2024
484199d
chore: apply review when clicking the subtitle
OnestarLee Jul 3, 2024
a7d75a7
chore: apply review when clicking the subtitle
OnestarLee Jul 3, 2024
95c4848
Merge pull request #182 from sendbird/feat/message-threading-qa
OnestarLee Jul 3, 2024
10c9693
chore: apply review
OnestarLee Jul 3, 2024
c1a345d
chore: apply review
OnestarLee Jul 3, 2024
67bd30d
chore: apply review when clicking the subtitle
OnestarLee Jul 4, 2024
5c95845
chore: apply review when clicking the subtitle
OnestarLee Jul 8, 2024
7ce5584
chore: apply review when clicking the subtitle
OnestarLee Jul 8, 2024
cff851c
chore: apply review when clicking the subtitle
OnestarLee Jul 8, 2024
5ef3876
chore: apply review when clicking the subtitle
OnestarLee Jul 8, 2024
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
Prev Previous commit
Next Next commit
chore: update message grouping logic
  • Loading branch information
bang9 authored and OnestarLee committed Jun 13, 2024
commit fc4da02030afea2ab314ce7259e09d0b2a4618e3
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const GroupChannelMessageRenderer: GroupChannelProps['Fragment']['renderMessage'
prevMessage,
nextMessage,
sbOptions.uikit.groupChannel.channel.replyType === 'thread',
shouldRenderParentMessage(message, hideParentMessage),
);
const variant = isMyMessage(message, currentUser?.userId) ? 'outgoing' : 'incoming';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const createGroupChannelThreadFragment = (
const content = renderMessage ? (
renderMessage(props)
) : (
<GroupChannelMessageRenderer hideParentMessage={true} {...props} />
<GroupChannelMessageRenderer hideParentMessage {...props} />
);
return <Box>{content}</Box>;
});
Expand Down
7 changes: 5 additions & 2 deletions packages/uikit-utils/src/sendbird/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@ export function calcMessageGrouping(
prev?: SendbirdMessage,
next?: SendbirdMessage,
isReplyThreadType?: boolean,
hasParentMessageUI?: boolean,
) {
const getPrev = () => {
if (!groupEnabled) return false;
if (!prev) return false;
if (curr.isAdminMessage()) return false;
if (!hasSameSender(curr, prev)) return false;
if (curr.parentMessageId || (isReplyThreadType && curr.threadInfo)) return false;
if (hasParentMessageUI && curr.parentMessageId) return false;
if (isReplyThreadType && curr.threadInfo) return false;
if (getMessageTimeFormat(new Date(curr.createdAt)) !== getMessageTimeFormat(new Date(prev.createdAt))) return false;
return true;
};
Expand All @@ -83,7 +85,8 @@ export function calcMessageGrouping(
if (!next) return false;
if (curr.isAdminMessage()) return false;
if (!hasSameSender(curr, next)) return false;
if (curr.parentMessageId || (isReplyThreadType && curr.threadInfo)) return false;
if (hasParentMessageUI && curr.parentMessageId) return false;
if (isReplyThreadType && curr.threadInfo) return false;
if (getMessageTimeFormat(new Date(curr.createdAt)) !== getMessageTimeFormat(new Date(next.createdAt))) return false;
return true;
};
Expand Down