Skip to content

Add reactions feature#398

Draft
DominikPeters wants to merge 2 commits intokohler:masterfrom
DominikPeters:reactions
Draft

Add reactions feature#398
DominikPeters wants to merge 2 commits intokohler:masterfrom
DominikPeters:reactions

Conversation

@DominikPeters
Copy link

This pull request adds the ability to add emoji reactions to comments, similar to functionality in social networks and messaging apps. When hovering over a comment, a button labelled + appears
image
Clicking the button opens a hovering panel showing a number of standard reaction emojis as well as ellipses "..." allowing users to choose from the full set of emojis.
image
Once a reaction is added, it is displayed below the comment and can be seen by everyone who can see the comment. On hover, the identity of the reacters is shown. The same person can add multiple reactions.
image
The icon is blue if the currently logged-in user has reacted that way, and on clicking it, the reaction is removed.

Reactions are logged in the action log:
image

There are settings for turning reactions on or off in the admin JSON settings, as well as to configure the list of standard emojis displayed:
image

@johnwickerson
Copy link

This looks amazing. I have only one suggestion: here on this Github issues page, the "add reaction" button is a smiley face. Your proposal is to use a "+" icon. I think the smiley face icon perhaps gives a slightly clearer indication to the user that "this button will lead to reactions", whereas "+" is more generic?

PRIMARY KEY (`reactionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4")) {
$conf->update_schema_version(313);
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I will add more comments later too, but two thoughts here—I'm interested in your take.

  1. HotCRP tables related to papers always have a primary key and a separate unique key. The primary key here should be the PAIR (paperId,reactionId), so that select * from CommentReaction where paperId=N is fast.

  2. Perhaps we should unify comment reactions with review ratings into a single table. What if it looked like

create table `PaperReaction` (
`paperId` int(11) NOT NULL,
`reactionId` int(11) NOT NULL AUTO_INCREMENT,
`reviewId` int(11) NOT NULL DEFAULT 0,
`commentId` int(11) NOT NULL DEFAULT 0,
`contactId` NOT NULL,
`emoji` ...,
`timeModified`...
);

Where if a reaction is to a review reviewId>0, and if to a comment commentId>0.

Then we could load all reactions relating to a paper in a single go.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, maybe the emoji member should be called reaction.

@msridhar
Copy link
Contributor

Just wanted to say I'd love to see this feature land! For PLDI 2026 I've wanted this feature basically every day 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants