Skip to content

Conversation

snehalsaurabh
Copy link

@snehalsaurabh snehalsaurabh commented Oct 9, 2025

Add Emoji Autocomplete on Colon Type

Acceptance Criteria fulfillment

  • When a user types a colon (:) followed by at least two characters (e.g., :la), a suggestion pop-up appears above the input box.
  • The pop-up displays a scrollable list of emojis that match the text typed after the colon.
  • Feature provides faster workflow for keyboard-focused users, matching main Rocket.Chat web and desktop clients.

Fixes #1013 (issue)

Video/Screenshots

Demo Video: EmbeddedChat - Emoji Autocomplete Feature


Screenshot 2025-10-09 063910

Key Features Implemented

✅ Trigger: : + 2 characters minimum
✅ Display format: emoji unicode + :shortname: (matching Rocket.Chat)
✅ Keyboard navigation: ArrowUp/Down, Enter, Escape
✅ Click selection support
✅ Auto-scroll to highlighted item
✅ Consistent styling with existing autocomplete lists
✅ Limited to 10 results for better performance
✅ Proper state management and cleanup
✅ No interference with @ mentions or / commands

Implementation Details

This PR adds emoji autocomplete functionality to the EmbeddedChat component, allowing users to quickly find and insert emojis by typing : followed by text in the message input box. The implementation follows the same patterns as existing autocomplete features (mentions and commands) for consistency.

Files Added/Modified:

New Files:

  • packages/react/src/lib/emojiList.js - Comprehensive emoji data source with shortnames and aliases
  • packages/react/src/hooks/useSearchEmoji.js - Hook for emoji filtering logic
  • packages/react/src/views/EmojiList/ - Complete EmojiList component with styling

Modified Files:

  • packages/react/src/views/ChatInput/ChatInput.js - Integrated emoji autocomplete functionality

Technical Highlights:

  • Performance Optimized: Limited to 10 suggestions with efficient filtering
  • Accessibility: Full keyboard navigation support
  • Theme Integration: Consistent styling with existing UI components
  • State Management: Proper cleanup and no memory leaks
  • User Experience: Smooth interaction with existing features

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-1015 after approval. Contributors are requested to replace <pr_number> with the actual PR number.

Testing Instructions:

  • Basic Functionality: Type :sm in the message input to see emoji suggestions
  • Keyboard Navigation: Use ArrowUp/Down to navigate, Enter to select, Escape to cancel
  • Click Selection: Click on any emoji in the list to select it
  • Integration Tests: Verify no interference with @ mentions or / commands
  • Edge Cases: Test with empty input, special characters, and rapid typing

…gestions when users type ':' followed by at least 2 characters, similar to existing mention and command autocomplete features
@CLAassistant
Copy link

CLAassistant commented Oct 9, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add Emoji Autocomplete on Colon Type

2 participants