feat(ui): filter field on the reaction emoji picker (LC-274) #315
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-274-reaction-picker-filter"
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 emoji picker now opens with a filter input that narrows the emoji buttons as you type (LC-274). As an enclave accrues custom emojis the picker was an unsearchable strip; now you can type to find one fast.
How
routes::reactions::get_picker: each button gains adata-lc-emoji-nametoken - human keywords for the six unicode defaults (thumbsup +1,heart,joy laugh,tada party,wow,cry sad) and the shortcode for custom emojis. The fragment is restructured into a small bordered box: an autofocuseddata-lc-emoji-filterinput + the cancel×on top, and a wrapping, scrollabledata-lc-emoji-gridof buttons below. The localized placeholder/aria come fromcrate::i18n::translate_currentand are attribute-escaped.layout.html: one delegatedinputlistener finds the picker's grid and toggles each[data-lc-emoji-name]button'shiddenby case-insensitive substring. The picker is ephemeral (htmx-swapped), so a single permanent listener suffices.Access gating and the reaction POST are unchanged. No new route/DB/env. Not operator-visible.
Tests
routes_reactions_authz::picker_ships_filter_and_name_tokensasserts the picker ships the filter input + per-button name tokens.just testandjust test-saaspass.QA note
JS filtering is client-side, so worth a quick manual pass: open the picker (filter input is focused), type
heart/tada(unicode defaults narrow by keyword), type a custom-emoji shortcode (custom narrows), clear the box (all return), and confirm the×still closes the picker and clicking an emoji still reacts.