feat(composer): emoji picker button (LC-316) #335
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-316-composer-emoji-picker"
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?
Summary
An emoji button on the composer toolbar opens a browse-and-click grid of popular Unicode emojis + the room's custom emojis; clicking one inserts the glyph (or
:shortcode:for custom) at the textarea cursor.Changes
server/src/routes/emoji_complete.rs:popular_unicode()(curated set viaemojis::get_by_shortcode, unknown shortcodes skipped) +get_picker(GET /rooms/{id}/emoji-picker, access-gated), popular + custom ->EmojiPickerFragment.server/src/views/emoji_complete.rs:EmojiPickerFragment.server/templates/partials/emoji_picker.html(new): root idpicker-composerso the LC-274 reaction-picker filter narrows it client-side; buttons carrydata-lc-emoji-insert+data-lc-emoji-name.server/templates/room/composer.html: toolbar emoji button (hx-get into a relative slot).server/templates/layout.html: permanent delegated handler insertsdata-lc-emoji-insertat the composer cursor + firesinput; closes on Escape / outside click (panel stays open after insert).server/src/routes/mod.rs: register the route.locales/{en,es}/room.ftl:room-composer-emoji.Full-unicode search-by-typing remains the
:shortcode:autocomplete's job (LC-296); this is the click surface, so it ships only the popular set.Testing
just check,just fmt,just test,just test-saasall pass.routes_emoji_complete.rs: picker lists popular unicode (tada glyph) + the seeded custom emoji withdata-lc-emoji-insert+ filter input; non-member 403.Not operator-visible (no env/config/contract change).
Add an emoji button to the composer toolbar that opens a browse-and-click grid of popular Unicode emojis plus the room's custom emojis; clicking one inserts the glyph (or :shortcode: for a custom emoji) at the textarea cursor. The picker (GET /rooms/{id}/emoji-picker, access-gated like the autocomplete) reuses EmojiSuggestion + the LC-274 client-side filter (its root id starts with "picker-" and it carries data-lc-emoji-filter / data-lc-emoji-grid) and a curated popular-unicode set resolved through the emojis crate by shortcode (unknown shortcodes silently skipped). A permanent delegated handler in layout.html splices the chosen emoji at the cursor and fires input (auto-resize / draft-save / send-enable), closing the panel on Escape or an outside click. Full-unicode search-by-typing remains the :shortcode: autocomplete's job (LC-296); this panel is the click surface. #LC-316 #LC-317 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>