regression: Legacy emoji in composer popup

Closed
YA
3mo ago
+54-3

Proposed changes (including videos or screenshots)

Currently we don't show legacy emojis in emoji picker but we still show them in composer popup. This results in inconsistent behavior. To keep consistency, we should also remove legacy emojis from composer emoji popup.

This PR introduces a new flag on emoji list legacy which is true for legacy emojis and based on this flag we render the emoji on composer popup.

Issue(s)

Steps to test or reproduce

  • Open a message composer.
  • Type :dog2.
  • Observe the emoji autocomplete popup.
  • Confirm that ๐Ÿ• :dog2: is displayed as a suggestion.
  • Open the emoji picker and search for dog2.
  • Confirm that no result is returned.
  • Enter the complete :dog2: shortcode manually and send the message.
  • Confirm that it renders as ๐Ÿ•

Further comments

CORE-2467

Summary by CodeRabbit

  • Bug Fixes
    • Improved emoji autocomplete by excluding legacy emojis from suggestions and local filtering, while keeping compatibility for manually typed legacy shortcodes.
    • Updated emoji search behavior to avoid returning legacy-only entries in results and partial matches.
  • Tests
    • Expanded emoji helper tests to verify legacy exclusion in search/autocomplete and continued support for rendering legacy shortcodes.