Skip to content

[WIKI-402] feat: emoji support for all editors #7275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 2, 2025

Conversation

VipinDevelops
Copy link
Member

@VipinDevelops VipinDevelops commented Jun 26, 2025

Description

Adds emoji extension with dropdown suggestions and slash command integration. Users can now input emojis using : prefix or via slash commands.

Type of Change

  • Added @tiptap/extension-emoji with GitHub emoji support
  • Implemented EmojiList component with keyboard navigation
  • Added emoji option to slash commands

Screenshots and Media (if applicable)

Screen.Recording.2025-06-26.at.6.32.56.PM.mov

Test Scenarios

References

Summary by CodeRabbit

  • New Features

    • Introduced emoji support in the editor, including an emoji picker with keyboard navigation and search capabilities.
    • Added a slash command for inserting emojis.
    • Emojis are now supported in markdown serialization.
  • Improvements

    • Enhanced editor extension management to track active dropdowns (e.g., emoji and mention pickers) in a unified way.
  • Bug Fixes

    • Improved handling of Enter key behavior when dropdowns are active.
  • Other

    • Updated internal types and configuration to support new emoji features and improve extension extensibility.

Copy link

makeplane bot commented Jun 26, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

Copy link
Contributor

coderabbitai bot commented Jun 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes introduce emoji support to the editor by integrating the @tiptap/extension-emoji package, creating a custom emoji suggestion UI, updating core extension arrays, and adjusting storage and command logic to handle emoji input and dropdowns. The mentions dropdown logic is refactored to use a shared active extension array.

Changes

File(s) Change Summary
packages/editor/package.json Added @tiptap/extension-emoji dependency.
.../src/core/constants/extension.ts Added EMOJI to CORE_EXTENSIONS enum.
.../src/core/extensions/emoji/extension.ts New: Exported EmojiExtension integrating TipTap emoji with custom suggestion.
.../src/core/extensions/emoji/suggestion.ts New: Implements emoji suggestion logic and popup UI integration.
.../src/core/extensions/emoji/components/emojis-list.tsx New: React component for rendering and interacting with emoji suggestion list.
.../src/core/extensions/extensions.ts
.../core/extensions/core-without-props.ts
Imported and added EmojiExtension to core editor extensions arrays.
.../src/core/extensions/utility.ts Added activeDropbarExtensions array to storage for tracking active dropdowns.
.../src/core/extensions/mentions/extension-config.ts Removed MentionExtensionStorage, updated storage logic for mentions.
.../src/ce/types/storage.ts Removed mention storage, added emoji storage to extension storage map.
.../src/core/extensions/mentions/utils.ts Refactored mention dropdown logic to use activeDropbarExtensions array.
.../src/core/extensions/enter-key.ts Changed Enter key logic to check activeDropbarExtensions instead of mentions open boolean.
.../src/core/extensions/slash-commands/command-items-list.ts Added new slash command for inserting emoji.
.../src/core/types/editor.ts Added "emoji" to TEditorCommands type union.
.../src/ce/types/utils.ts Added TAdditionalActiveDropbarExtensions type alias as never.
packages/editor/src/styles/editor.css Added CSS rules for emoji image styling inside editor content.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Editor
    participant EmojiExtension
    participant EmojiSuggestion
    participant EmojiList

    User->>Editor: Types ":"
    Editor->>EmojiExtension: Detects emoji trigger
    EmojiExtension->>EmojiSuggestion: Provides suggestion context
    EmojiSuggestion->>EmojiList: Renders emoji options in popup
    User->>EmojiList: Navigates/selects emoji
    EmojiList->>Editor: Inserts selected emoji
Loading

Suggested labels

🛠️refactor, ready to merge

Suggested reviewers

  • Palanikannan1437

Poem

🐰
Hooray for emoji, now part of our lore,
With smiles and hearts, the editor can roar!
Dropbars and popups, suggestions that gleam,
Mentions and emojis, a collaborative dream.
So type a colon, let joy take the stage—
The editor now sparkles with emoji on the page!
😊✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d9bd4fd and a17b03c.

📒 Files selected for processing (3)
  • packages/editor/src/ce/types/storage.ts (1 hunks)
  • packages/editor/src/core/extensions/utility.ts (3 hunks)
  • packages/editor/src/core/types/editor.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (5)
packages/editor/src/core/extensions/utility.ts (1)

15-15: Fix formatting in type union definition.

Missing space after the pipe operator makes the type definition less readable.

-type TActiveDropbarExtensions = CORE_EXTENSIONS.MENTION | CORE_EXTENSIONS.EMOJI |TActiveDropbarExtensionsCE;
+type TActiveDropbarExtensions = CORE_EXTENSIONS.MENTION | CORE_EXTENSIONS.EMOJI | TActiveDropbarExtensionsCE;
packages/editor/src/core/extensions/slash-commands/command-items-list.tsx (1)

193-203: Consider improving the emoji command implementation.

The command logic inserts <p>:</p> which seems like a workaround to trigger emoji suggestion. This approach may create unwanted paragraph elements.

Consider using a more direct approach:

-command: ({ editor, range }) => {
-  editor.chain().focus().insertContentAt(range, "<p>:</p>").run();
-},
+command: ({ editor, range }) => {
+  editor.chain().focus().deleteRange(range).insertContent(":").run();
+},

This would insert just the colon trigger without wrapping it in paragraph tags.

packages/editor/src/core/components/menus/emoji/suggestion.ts (1)

12-24: Consider optimizing the default emoji filtering logic.

The current implementation performs a linear search through all emojis for each default emoji name, which could be inefficient with large emoji datasets.

Consider creating a lookup map for better performance:

+const createEmojiLookup = (emojis: EmojiItem[]) => {
+  const lookup = new Map<string, EmojiItem>();
+  emojis.forEach(emoji => {
+    emoji.shortcodes.forEach(shortcode => lookup.set(shortcode, emoji));
+    lookup.set(emoji.name, emoji);
+  });
+  return lookup;
+};

 const emojiSuggestion = {
   items: ({ editor, query }: { editor: Editor; query: string }): EmojiItem[] => {
     if (query.trim() === "") {
+      const lookup = createEmojiLookup(editor.storage.emoji.emojis);
       const defaultEmojis = DEFAULT_EMOJIS
-        .map((name) =>
-          editor.storage.emoji.emojis.find((emoji: EmojiItem) =>
-            emoji.shortcodes.includes(name) || emoji.name === name
-          )
-        )
+        .map((name) => lookup.get(name))
         .filter(Boolean) 
         .slice(0, 5);
packages/editor/src/core/components/menus/emoji/emoji-list.tsx (2)

120-126: Good fallback image handling with potential accessibility improvement.

The fallback image implementation is solid, but the image could benefit from better alt text.

Consider using more descriptive alt text for the fallback image:

 {item.fallbackImage ? (
-  <img src={item.fallbackImage} alt={item.name} className="size-4 object-contain" />
+  <img src={item.fallbackImage} alt={`${item.name} emoji`} className="size-4 object-contain" />
 ) : (
   item.emoji
 )}

107-108: Consider using stable keys for better React performance.

Using array index as key can cause unnecessary re-renders when the items array changes.

If emoji items have unique identifiers, use them as keys:

 <button
-  key={index}
+  key={item.name}
   id={`emoji-item-${index}`}

Note: Only apply this change if item.name is guaranteed to be unique within the filtered results.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25a6cd4 and 37280f8.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (13)
  • packages/editor/package.json (1 hunks)
  • packages/editor/src/ce/types/storage.ts (0 hunks)
  • packages/editor/src/ce/types/utils.ts (1 hunks)
  • packages/editor/src/core/components/menus/emoji/emoji-list.tsx (1 hunks)
  • packages/editor/src/core/components/menus/emoji/suggestion.ts (1 hunks)
  • packages/editor/src/core/constants/extension.ts (1 hunks)
  • packages/editor/src/core/extensions/enter-key.ts (1 hunks)
  • packages/editor/src/core/extensions/extensions.ts (2 hunks)
  • packages/editor/src/core/extensions/mentions/extension-config.ts (1 hunks)
  • packages/editor/src/core/extensions/mentions/utils.ts (3 hunks)
  • packages/editor/src/core/extensions/slash-commands/command-items-list.tsx (2 hunks)
  • packages/editor/src/core/extensions/utility.ts (3 hunks)
  • packages/editor/src/core/types/editor.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/editor/src/ce/types/storage.ts
🧰 Additional context used
🧬 Code Graph Analysis (3)
packages/editor/src/core/extensions/mentions/utils.ts (1)
packages/editor/src/core/helpers/get-extension-storage.ts (1)
  • getExtensionStorage (5-8)
packages/editor/src/core/extensions/enter-key.ts (1)
packages/editor/src/core/helpers/get-extension-storage.ts (1)
  • getExtensionStorage (5-8)
packages/editor/src/core/extensions/utility.ts (1)
packages/editor/src/ce/types/utils.ts (1)
  • TActiveDropbarExtensionsCE (1-1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (19)
packages/editor/package.json (1)

46-46: ```shell
#!/bin/bash

Description: Extract existing TipTap extension versions from the targeted package.json

echo "TipTap extensions in packages/editor/package.json (dependencies):"
cat packages/editor/package.json | jq -r '
.dependencies
| to_entries
| map(select(.key | startswith("@tiptap/")))
| .[]
| "(.key): (.value)"
'

echo -e "\nTipTap extensions in packages/editor/package.json (devDependencies):"
cat packages/editor/package.json | jq -r '
.devDependencies // {}
| to_entries
| map(select(.key | startswith("@tiptap/")))
| .[]
| "(.key): (.value)"
'


</details>
<details>
<summary>packages/editor/src/ce/types/utils.ts (1)</summary>

`1-1`: **LGTM! Appropriate use of `never` type for CE placeholder.**

The `never` type correctly represents that the Community Edition has no additional active dropbar extensions beyond the core ones. This design allows for extensibility in other editions while maintaining type safety.

</details>
<details>
<summary>packages/editor/src/core/constants/extension.ts (1)</summary>

`44-44`: **LGTM! Consistent enum extension for emoji support.**

The `EMOJI` constant follows the established naming and value conventions in the enum, properly integrating with the existing extension system.

</details>
<details>
<summary>packages/editor/src/core/types/editor.ts (1)</summary>

`50-50`: **LGTM! Emoji command integration looks correct.**

The addition of `"emoji"` to the `TEditorCommands` union properly extends the command system to support emoji functionality. The emoji command doesn't require extra props in `TCommandExtraProps`, which is appropriate for this use case.

</details>
<details>
<summary>packages/editor/src/core/extensions/utility.ts (2)</summary>

`25-29`: **Excellent centralization of dropbar extension state management.**

The new `activeDropbarExtensions` array provides a clean, scalable approach to track multiple active dropbar extensions (mentions, emojis, etc.) in a centralized location, replacing the previous mention-specific boolean flag approach.

---

`64-70`: **Proper storage initialization for active dropbar extensions.**

The empty array initialization in `addStorage()` correctly establishes the initial state for tracking active dropbar extensions.

</details>
<details>
<summary>packages/editor/src/core/extensions/extensions.ts (2)</summary>

`42-43`: **LGTM! Clean emoji extension integration.**

The emoji extension import and suggestion handler integration look correct and follow TipTap patterns.

---

`102-106`: ```shell
#!/bin/bash
# Locate and inspect the Emoji extension configuration in extensions.ts
grep -n "Emoji.configure" -n packages/editor/src/core/extensions/extensions.ts
sed -n '1,200p' packages/editor/src/core/extensions/extensions.ts
packages/editor/src/core/extensions/slash-commands/command-items-list.tsx (1)

17-17: LGTM! Appropriate icon import for emoji command.

The Smile icon from lucide-react is a good choice for the emoji slash command.

packages/editor/src/core/extensions/enter-key.ts (1)

14-20: LGTM! Improved centralized dropdown state management.

The refactor from checking mentionsOpen boolean to using the centralized activeDropbarExtensions array is a good architectural improvement. This allows multiple dropdown extensions (mentions, emoji) to be tracked consistently.

The logic correctly prevents the Enter key callback when any dropdown is active.

packages/editor/src/core/extensions/mentions/utils.ts (3)

11-12: LGTM! Appropriate imports for centralized state management.

Adding the necessary imports for the refactored dropdown state management.


33-33: Good: Centralized dropdown state tracking on start.

Correctly adds the mention extension to the active dropbar extensions array when the dropdown opens.


69-74: Good: Proper cleanup of dropdown state on exit.

The cleanup logic correctly removes the mention extension from the active array and updates the storage. The filtering approach is safe and maintains array integrity.

packages/editor/src/core/extensions/mentions/extension-config.ts (2)

15-15: LGTM! Cleaned up extension configuration.

Removing the MentionExtensionStorage generic parameter is consistent with the refactor to centralized dropdown state management.


50-59: Good: Simplified storage to core functionality.

The storage now focuses only on markdown serialization, which is appropriate after moving dropdown state management to the utility extension.

packages/editor/src/core/components/menus/emoji/suggestion.ts (1)

59-75: Excellent popup configuration with comprehensive fallback strategy.

The popup configuration properly handles multiple possible container targets with appropriate fallbacks, ensuring the emoji list displays correctly in various editor contexts.

packages/editor/src/core/components/menus/emoji/emoji-list.tsx (3)

5-11: Well-defined TypeScript interfaces with proper fallback support.

The interfaces are comprehensive and the fallbackImage property provides good fallback handling for emoji rendering.


37-43: Excellent circular navigation implementation.

The modulo arithmetic correctly handles wrapping at both ends of the list, providing smooth keyboard navigation experience.


52-67: Robust scroll-into-view implementation with performance optimization.

The logic properly checks if the item is already in view before scrolling, preventing unnecessary scroll operations.

@aaryan610 aaryan610 changed the title [WIKI-402] Feat : emoji support [WIKI-402] feat: emoji support for all editors Jun 27, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
packages/editor/src/core/extensions/emoji/suggestion.ts (2)

15-20: Consider more robust emoji filtering with better error handling.

The current implementation uses find() which returns undefined for missing emojis, but the filter(Boolean) should handle this. However, consider making the logic more explicit for better maintainability.

-      const defaultEmojis = DEFAULT_EMOJIS.map((name) =>
-        emojis.find((emoji: EmojiItem) => emoji.shortcodes.includes(name) || emoji.name === name)
-      )
-        .filter(Boolean)
-        .slice(0, 5);
+      const defaultEmojis = DEFAULT_EMOJIS
+        .map((name) => emojis.find((emoji: EmojiItem) => 
+          emoji.shortcodes.includes(name) || emoji.name === name
+        ))
+        .filter((emoji): emoji is EmojiItem => emoji !== undefined)
+        .slice(0, 5);

92-100: Proper escape key handling but consider consistency.

The escape key handling correctly hides the popup and destroys the component, but the order of operations differs from the onExit method. Consider using a shared cleanup function.

+      const cleanup = () => {
+        if (popup) {
+          popup[0]?.hide();
+          popup[0]?.destroy();
+        }
+        if (component) {
+          component.destroy();
+        }
+      };
+
       onKeyDown: (props: SuggestionKeyDownProps): boolean => {
         if (props.event.key === "Escape") {
-          if (popup) {
-            popup[0]?.hide();
-          }
-          if (component) {
-            component.destroy();
-          }
+          cleanup();
           return true;
         }
packages/editor/src/core/extensions/emoji/emoji-list.tsx (1)

39-52: Keyboard navigation logic is correct but enterHandler could be simplified.

The arrow key handlers use modulo arithmetic for proper wrapping, which is excellent. However, the enterHandler implementation is unnecessarily complex.

 const enterHandler = useCallback(() => {
-   setSelectedIndex((prevIndex) => {
-     selectItem(prevIndex);
-     return prevIndex;
-   });
+   selectItem(selectedIndex);
 }, [selectItem, selectedIndex]);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1cdd08c and fcda39a.

📒 Files selected for processing (3)
  • packages/editor/src/core/extensions/emoji/emoji-list.tsx (1 hunks)
  • packages/editor/src/core/extensions/emoji/index.ts (1 hunks)
  • packages/editor/src/core/extensions/emoji/suggestion.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/editor/src/core/extensions/emoji/index.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (7)
packages/editor/src/core/extensions/emoji/suggestion.ts (2)

56-72: Excellent popup configuration with comprehensive fallback strategy.

The Tippy.js configuration properly handles different editor containers with a robust fallback chain, and the popup settings are well-configured for user interaction.


105-118: Proper cleanup implementation with state management.

The cleanup logic correctly removes the extension from the active extensions array and destroys both popup and component instances. The array manipulation using splice is appropriate here.

packages/editor/src/core/extensions/emoji/emoji-list.tsx (5)

5-21: Well-defined TypeScript interfaces with comprehensive typing.

The interfaces properly define the expected data structure and component API. The EmojiItem interface includes all necessary properties including the optional fallbackImage for graceful degradation.


57-72: Sophisticated scroll management with proper viewport detection.

The useLayoutEffect implementation correctly calculates whether the selected item is in view and scrolls appropriately. The use of useLayoutEffect prevents visual flicker during updates.


102-147: Excellent accessibility implementation with proper ARIA attributes.

The component uses appropriate roles (listbox, option), ARIA attributes (aria-label, aria-selected), and semantic HTML. The fallback image handling and keyboard/mouse interaction support are well implemented.


130-136: Robust emoji rendering with fallback image support.

The conditional rendering handles both native emoji display and fallback images gracefully, ensuring emojis are visible across different platforms and environments.


88-94: ```shell
#!/bin/bash

Search for other Enter key handlers in the editor codebase, including .ts and .tsx files

rg -A5 -B5 'event.key.Enter|keyCode.13' -g '.ts' -g '.tsx'


</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
packages/editor/src/core/extensions/emoji/components/emojis-list.tsx (3)

16-16: Remove unused editor prop.

The editor prop is defined in the interface but never used within the component. Consider removing it to keep the interface clean.

export interface EmojiListProps {
  items: EmojiItem[];
  command: (item: { name: string }) => void;
- editor: Editor;
}

47-52: Simplify enterHandler logic.

The enterHandler unnecessarily wraps selectItem in setSelectedIndex. Since selectItem doesn't modify the selected index, this wrapper adds no value.

const enterHandler = useCallback(() => {
- setSelectedIndex((prevIndex) => {
-   selectItem(prevIndex);
-   return prevIndex;
- });
+ selectItem(selectedIndex);
}, [selectItem]);

111-111: Consider key uniqueness for emoji items.

Using item.shortcodes.join(" - ") as the key might not guarantee uniqueness if multiple emojis share identical shortcodes. Consider using the emoji name or a combination of name and emoji.

- const emojiKey = item.shortcodes.join(" - ");
+ const emojiKey = `${item.name}-${item.emoji}`;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fcda39a and 4363015.

📒 Files selected for processing (5)
  • packages/editor/src/core/extensions/core-without-props.ts (2 hunks)
  • packages/editor/src/core/extensions/emoji/components/emojis-list.tsx (1 hunks)
  • packages/editor/src/core/extensions/emoji/extension.ts (1 hunks)
  • packages/editor/src/core/extensions/emoji/suggestion.ts (1 hunks)
  • packages/editor/src/core/extensions/extensions.ts (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/editor/src/core/extensions/emoji/extension.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/editor/src/core/extensions/core-without-props.ts
  • packages/editor/src/core/extensions/extensions.ts
  • packages/editor/src/core/extensions/emoji/suggestion.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
packages/editor/src/core/extensions/emoji/components/emojis-list.tsx (3)

57-72: Excellent scrolling implementation!

The scroll-into-view logic properly handles viewport bounds checking and uses scrollIntoView with block: "nearest" for smooth navigation. The implementation correctly ensures selected items remain visible during keyboard navigation.


74-100: Well-implemented keyboard navigation.

The imperative handle correctly processes keyboard events with proper event handling (preventDefault/stopPropagation for Enter) and returns boolean values to indicate event consumption. The arrow key navigation provides intuitive UX.


102-146: Strong accessibility and interaction support.

The component implements proper ARIA roles (listbox/option), labels, and selection states. The mouse and keyboard interactions work harmoniously, and the empty state is handled gracefully.

@sriramveeraghanta sriramveeraghanta merged commit ba6b822 into preview Jul 2, 2025
3 of 5 checks passed
@sriramveeraghanta sriramveeraghanta deleted the feat-emoji_support branch July 2, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants