feat(ui): who-reacted tooltip on reaction pills (LC-266) #311
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-266-who-reacted-tooltip"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Hovering or focusing a reaction pill now reveals who reacted with that emoji (LC-266). Reactions previously showed only
{emoji} {count}; now the pill carries a nativetitlelisting the reactors' display names - accessible by default, instant, no popover JS, no extra route.How
list_reactions/list_room_reactions) gaingroup_concat(user_id), so eachReactioncarries itsreactor_ids(users react at most once per emoji, so no dedupe).build_reactor_titles(state, &[Reaction])helper resolves every distinct reactor across a render in ONEdisplay_names_for_idsquery, then comma-joins each pill's reactor names (display_name else username, capped at 20 with a+Noverflow). Best-effort: a label-lookup error yields empty titles (no tooltip), never a 500.POST .../reactions/{emoji}toggle, and the two WS reaction/edit re-renders), so the title threads throughReactionView::new- the tooltip stays correct after a reaction is added/removed and for other viewers over the WS.reaction_bar.htmlrenderstitle="{{ r.reactors_title }}"only when non-empty; Askama HTML-escapes the names in the attribute (no injection via display names).The room-page path resolves all reactor names for the page in one query; single-message paths resolve that message's reactors. No new route, DB table, env var, or i18n string (a plain name list). Not operator-visible.
Tests
routes_reactions_authz::reaction_pill_titles_who_reactedreacts as a named user and asserts the pilltitlecarries their name.just testandjust test-saaspass (noReaction-equality or LC-77 fixture regressions; fixtures carry no reactions).QA note
Mostly server-rendered and test-covered, so low-risk. Worth a quick manual check: react to a message and hover the pill (shows your name); have a second user also react and confirm both names appear; remove a reaction and confirm the name drops; check a custom-emoji reaction also titles correctly.