aboutsummaryrefslogtreecommitdiffstats
path: root/src/public-chat.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-06 19:48:19 -0700
committerAdam Soltys <[email protected]>2026-09-06 19:48:19 -0700
commitad496c0fb53706f221241dd48440c68d3333937d (patch)
tree0adff8309cee22c52389010a9c9095a883c87f9b /src/public-chat.js
parent966ef24380bc25fb0f0a064358c802347cb965a3 (diff)
downloadcoinosv3-ad496c0fb53706f221241dd48440c68d3333937d.tar.gz
coinosv3-ad496c0fb53706f221241dd48440c68d3333937d.zip
Chat reactions render inside the bubble (Telegram-style), not floating below it.
Reactions were a sibling of the bubble (a separate row under it), so they hung outside the message. Moved the reaction pills inside .chat-bubble, tucked under the text, across all three renderers: community channel messages, DMs, and the read-only public /chat page. The pill background and the "your reaction" highlight border now derive from the bubble's own text colour (color-mix on currentColor), so they read correctly on both the plain bubble and the accent "me" bubble. Tapping a pill stops propagation so it toggles the reaction without also opening the message action sheet. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01MGzU12QrAA4G6BYGzGVdXz
Diffstat (limited to 'src/public-chat.js')
-rw-r--r--src/public-chat.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/public-chat.js b/src/public-chat.js
index d3dd042..0cdadc4 100644
--- a/src/public-chat.js
+++ b/src/public-chat.js
@@ -253,10 +253,10 @@ export function mountPublicChat() {
m.author === COMMUNITY.owner ? h('span', { class: 'chat-badge' }, t('msgAdmin')) : null,
h('span', { class: 'chat-time' }, timeAgo(ms / 1000))),
h('div', { class: 'chat-bubble' }, quote, ...linkedBody(content),
- edit && edit.author === m.author ? h('span', { class: 'chat-edited' }, ' ' + t('msgEdited')) : null),
- reacts && reacts.size ? h('div', { class: 'chat-reacts' },
- ...[...[...reacts.values()].reduce((m2, e) => m2.set(e, (m2.get(e) || 0) + 1), new Map()).entries()]
- .map(([emoji, n]) => h('span', { class: 'chat-react' }, emoji + (n > 1 ? ' ' + n : '')))) : null)));
+ edit && edit.author === m.author ? h('span', { class: 'chat-edited' }, ' ' + t('msgEdited')) : null,
+ reacts && reacts.size ? h('div', { class: 'chat-reacts' },
+ ...[...[...reacts.values()].reduce((m2, e) => m2.set(e, (m2.get(e) || 0) + 1), new Map()).entries()]
+ .map(([emoji, n]) => h('span', { class: 'chat-react' }, emoji + (n > 1 ? ' ' + n : '')))) : null))));
}
if (stick) log.scrollTop = log.scrollHeight;
}