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(chat) add message reactions #15006

Merged
merged 70 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
46fd2cd
Add reaction button and kebab menu
he-patrick Jun 17, 2024
b3cbe81
Add emoji selector for ReactButton
he-patrick Jun 25, 2024
512f931
Make buttons use Popover
he-patrick Jun 25, 2024
58a9e42
Add private message functionality
he-patrick Jul 2, 2024
c315b48
Connect to lib-jitsi-meet
he-patrick Jul 2, 2024
2b53a7b
Update components
he-patrick Jul 2, 2024
3c3c14f
Add definitions and types
he-patrick Jul 18, 2024
f62c904
Reaction UI components pass in proper values
he-patrick Jul 18, 2024
cf0bd37
Handle reactions from lib-jitsi-meet
he-patrick Jul 18, 2024
331e141
Place reactions within message
he-patrick Jul 24, 2024
0a39330
Render three reactions in group and show timestamp on every message
he-patrick Aug 6, 2024
a754161
Fix reaction id
he-patrick Aug 6, 2024
d36f636
Fix eslint errors
he-patrick Aug 6, 2024
51af82f
Fix margin between reactions
he-patrick Aug 6, 2024
e3bf900
Fix timestamp render location and reaction count colour
he-patrick Aug 6, 2024
1b1138f
feat(chat) use the original message ID for processing
he-patrick Aug 6, 2024
171499a
Add reaction button and kebab menu
he-patrick Jun 17, 2024
1b35cef
Add definitions and types
he-patrick Jul 18, 2024
fbfe141
Handle reactions from lib-jitsi-meet
he-patrick Jul 18, 2024
c2ee906
Fix reaction id
he-patrick Aug 6, 2024
665f008
Fix eslint errors
he-patrick Aug 6, 2024
b2956e7
Fix conflict errors
he-patrick Aug 10, 2024
6f323b2
Add canReact back
he-patrick Aug 10, 2024
76918f4
Type errors
he-patrick Aug 10, 2024
efb4488
Fix linting issues
he-patrick Aug 10, 2024
f2fb614
Fix reaction button and rendering issues
he-patrick Aug 10, 2024
b8d9e1a
Prevent duplicate reactions
he-patrick Aug 11, 2024
ac80843
Revert "feat(deps) replace lodash with lodash-es"
he-patrick Aug 12, 2024
dd5f585
Revert accidental revert
he-patrick Aug 12, 2024
da6ae54
Merge branch 'jitsi:master' into master
he-patrick Aug 13, 2024
1d2aca8
Merge branch 'jitsi:master' into master
he-patrick Aug 20, 2024
00d87ec
Make reaction panel background visible
he-patrick Aug 20, 2024
2ca67f8
Convert ReactButton popover to MaterialUI
he-patrick Aug 20, 2024
89a95a4
Display reactions list
he-patrick Aug 20, 2024
234dde4
Fix linting errors
he-patrick Aug 20, 2024
abbb7d4
Chat menu optimizations
he-patrick Aug 20, 2024
48f567d
Remove receiverId from REACTION_RECEIVED
he-patrick Aug 20, 2024
c156121
Update reaction parameters
he-patrick Aug 20, 2024
8908ba6
Remove logs
he-patrick Aug 27, 2024
ee2d6db
Fix kebab menu copy and private messages, chatmessage props
he-patrick Aug 27, 2024
1d00213
Fix tsc errors
he-patrick Aug 27, 2024
c9eae6c
Fix lint errors
he-patrick Aug 27, 2024
2737825
Fix logging and remove reply
he-patrick Aug 27, 2024
c00c11e
Change available reactions
he-patrick Aug 27, 2024
b1a4187
Add reaction button label
he-patrick Aug 27, 2024
b6c7e57
Merge branch 'jitsi:master' into master
he-patrick Sep 2, 2024
ad85d50
Fix callback error and update chat message menu display
he-patrick Sep 2, 2024
39e63c0
Add shouldDisplayChatMessageMenu type
he-patrick Sep 2, 2024
ca55172
Add callback
he-patrick Sep 2, 2024
c76b4ae
Fix lint errors
he-patrick Sep 2, 2024
0d886ec
Fix tsc errors
he-patrick Sep 2, 2024
625e7b6
Remove private message from self message kebab menu
he-patrick Sep 3, 2024
9d6834b
Remove white corners from popover
he-patrick Sep 3, 2024
d056a6e
Fix lint errors
he-patrick Sep 3, 2024
56debca
Reaction popover UI improvements
he-patrick Sep 3, 2024
54e719b
Change text colour
he-patrick Sep 5, 2024
9bc4398
Rename KebabMenu to MessageMenu
he-patrick Sep 11, 2024
6f7de59
Revert PrivateMessageButton changes
he-patrick Sep 11, 2024
5fb0189
Replace navigator.cllipboard with copyText
he-patrick Sep 11, 2024
876e2f6
Set const for number of reactions to display
he-patrick Sep 11, 2024
698ad17
Display number of reactions rather than participants
he-patrick Sep 11, 2024
c15b722
Fix data type and lint error
he-patrick Sep 11, 2024
911e769
Participant name overflow
he-patrick Sep 11, 2024
673efa0
Convert reactionslist popover from materialui to custom popover compo…
he-patrick Sep 11, 2024
1b9c653
Convert reaction button from materialui to custom popover component
he-patrick Sep 11, 2024
bfd9279
Convert messagemenu popover from materialui to custom popover component
he-patrick Sep 12, 2024
01a1419
Fix tsc errors
he-patrick Sep 12, 2024
0aa47a7
Fix chat message sizing
he-patrick Sep 12, 2024
9222e3d
Fix lint error
he-patrick Sep 13, 2024
8fd1f17
Fix displayed name length
he-patrick Sep 18, 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
1 change: 1 addition & 0 deletions lang/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,7 @@
"privateMessage": "Send private message",
"profile": "Edit your profile",
"raiseHand": "Raise your hand",
"react": "Message reactions",
"reactions": "Reactions",
"reactionsMenu": "Reactions menu",
"recording": "Toggle recording",
Expand Down
1 change: 1 addition & 0 deletions react/features/base/conference/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export interface IJitsiConference {
sendLobbyMessage: Function;
sendMessage: Function;
sendPrivateTextMessage: Function;
sendReaction: Function;
sendTextMessage: Function;
sendTones: Function;
sessionId: string;
Expand Down
24 changes: 24 additions & 0 deletions react/features/chat/actionTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
*/
export const ADD_MESSAGE = 'ADD_MESSAGE';

/**
* The type of the action that adds a reaction to a chat message.
*
* {
* type: ADD_MESSAGE_REACTION,
* reaction: string,
* messageID: string,
* receiverID: string,
* }
*/
export const ADD_MESSAGE_REACTION = 'ADD_MESSAGE_REACTION';

/**
* The type of the action which signals to clear messages in Redux.
*
Expand Down Expand Up @@ -62,6 +74,18 @@ export const OPEN_CHAT = 'OPEN_CHAT';
*/
export const SEND_MESSAGE = 'SEND_MESSAGE';

/**
* The type of the action which signals a reaction to a message.
*
* {
* type: SEND_REACTION,
* reaction: string,
* messageID: string,
* receiverID: string
* }
*/
export const SEND_REACTION = 'SEND_REACTION';

/**
* The type of action which signals the initiation of sending of as private message to the
* supplied recipient.
Expand Down
41 changes: 41 additions & 0 deletions react/features/chat/actions.any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import { LOBBY_CHAT_INITIALIZED } from '../lobby/constants';

import {
ADD_MESSAGE,
ADD_MESSAGE_REACTION,
CLEAR_MESSAGES,
CLOSE_CHAT,
EDIT_MESSAGE,
REMOVE_LOBBY_CHAT_PARTICIPANT,
SEND_MESSAGE,
SEND_REACTION,
SET_IS_POLL_TAB_FOCUSED,
SET_LOBBY_CHAT_ACTIVE_STATE,
SET_LOBBY_CHAT_RECIPIENT,
Expand Down Expand Up @@ -49,6 +51,27 @@ export function addMessage(messageDetails: Object) {
};
}

/**
* Adds a reaction to a chat message.
*
* @param {Object} reactionDetails - The reaction to add.
* @param {string} reactionDetails.participantId - The ID of the message to react to.
* @param {string} reactionDetails.reactionList - The reaction to add.
* @param {string} reactionDetails.messageId - The receiver ID of the reaction.
* @returns {{
* type: ADD_MESSAGE_REACTION,
* participantId: string,
* reactionList: string[],
* messageId: string
* }}
*/
export function addMessageReaction(reactionDetails: Object) {
return {
type: ADD_MESSAGE_REACTION,
...reactionDetails
};
}

/**
* Edits an existing chat message.
*
Expand Down Expand Up @@ -111,6 +134,24 @@ export function sendMessage(message: string, ignorePrivacy = false) {
};
}

/**
* Sends a reaction to a message.
*
* @param {string} reaction - The reaction to send.
* @param {string} messageId - The message ID to react to.
* @param {string} receiverId - The receiver ID of the reaction.
* @returns {Function}
*/
export function sendReaction(reaction: string, messageId: string, receiverId?: string) {

return {
type: SEND_REACTION,
reaction,
messageId,
receiverId
};
}

/**
* Initiates the sending of a private message to the supplied participant.
*
Expand Down
Loading