Add emoji picker and message reactions (Gitea issue #11)

Composer gains an emoji picker (static curated unicode list, insert at
cursor position) and messages gain Slack/Mattermost-style reactions:
react with any emoji, toggle off by reacting again, see who reacted via
a tooltip on each pill.

Backend: MessageReaction model (unique on message_id+user_id+emoji backs
toggle semantics), WS "reaction" envelope broadcasts the full recomputed
reaction list per message (same approach as message edits), REST message
list embeds reactions so a reload doesn't lose state that only arrived
over WS.

Frontend: shared EmojiPicker component (anchored popover, Escape/outside-
click dismiss via new useEscapeKey hook) used by both the composer and a
new hover-revealed reaction trigger on each message row.
This commit is contained in:
2026-08-14 15:37:59 -06:00
parent f2a59f798b
commit c6f90d49fc
22 changed files with 854 additions and 34 deletions
+29
View File
@@ -53,6 +53,35 @@
display: none;
}
.composer-emoji-wrap {
position: relative;
flex: none;
}
.composer-emoji-trigger {
width: 36px;
height: 36px;
flex: none;
border-radius: var(--radius);
background: transparent;
border: 1px solid var(--ds-border);
font-size: 1rem;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.composer-emoji-trigger:hover:not(:disabled) {
border-color: var(--ds-accent);
}
.composer-emoji-trigger:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.composer-attach {
width: 36px;
height: 36px;