feat(ui): recently-used emoji row in the reaction picker (LC-288) #322
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-288-recent-emoji"
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
The reaction picker now opens with a "Recent" row of the emojis you react with most, for one-click reuse (LC-288). Builds on the LC-274 picker.
How
get_pickerrenders an emptydata-lc-emoji-recentplaceholder (hidden, with a localized label data-attr) above the grid.layout.html:[hx-post*="/reactions/"]parses the emoji from the URL and, for unicode emoji only (custom:shortcode:skipped - enclave-scoped, not reusable across rooms; the cancel/open controls usehx-getso never match), pushes it tolocalStorage['lc-recent-emoji'](MRU, cap 12, deduped).htmx:afterSettle, builds real htmx-wired reaction buttons for the recents (targeting that message's#reactions-{id}), runshtmx.process, and reveals the row. Empty history leaves it hidden, so the picker looks exactly as before for new users.Recents are an ephemeral per-device convenience (localStorage, like theme/density/sidebar) - no schema, query, or route. Label localized in en + es. Not operator-visible. No LC-77 fixture impact (the picker isn't rendered in any fixture).
Tests
routes_reactions_authz: the picker ships thedata-lc-emoji-recentplaceholder.just testandjust test-saaspass; no fixture changes.QA note
JS + localStorage, so worth a manual pass: react with a few unicode emojis, reopen the picker (a "Recent" row shows them, newest first), click a recent one (it reacts), react with more and confirm MRU ordering/dedup and the cap; confirm a custom
:emoji:reaction does NOT appear in Recent; confirm a brand-new browser (no history) shows no Recent row; reload and confirm recents persist.