Skip to content

feat: add emoji picker option#2659

Open
thegreatalxx wants to merge 1 commit intoTypeCellOS:mainfrom
thegreatalxx:feat-emoji-picker-option
Open

feat: add emoji picker option#2659
thegreatalxx wants to merge 1 commit intoTypeCellOS:mainfrom
thegreatalxx:feat-emoji-picker-option

Conversation

@thegreatalxx
Copy link
Copy Markdown

@thegreatalxx thegreatalxx commented Apr 18, 2026

Adds an emoji picker option to the slash menu. Fixes #808.

Summary by CodeRabbit

  • Tests
    • Added test coverage for emoji suggestion menu item functionality, verifying that selecting an emoji item correctly triggers the suggestion menu with appropriate configuration parameters.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 18, 2026

@thegreatalxx is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 18, 2026

📝 Walkthrough

Walkthrough

A test was added to the SuggestionMenu test suite to verify that the emoji menu item is properly registered in the default slash menu. The test confirms that clicking the emoji item triggers the suggestion menu with the correct colon (:) trigger character and appropriate configuration options.

Changes

Cohort / File(s) Summary
Emoji Menu Item Test
packages/core/src/extensions/SuggestionMenu/SuggestionMenu.test.ts
Added test case for emoji menu item that verifies its presence in the default slash menu items and validates that clicking it opens the suggestion menu with the correct trigger character and options (deleteTriggerCharacter: true, ignoreQueryLength: true).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A colon, a click, and emojis appear,
The test now ensures the picker is here,
With emoji keys dancing in slash menu light,
Suggestion menus bloom—: makes it right!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR only adds a test and does not implement the actual emoji picker feature with required functionality (emoji library integration, keyboard navigation, accessibility, trigger character support). Implement the core emoji picker feature with library integration, keyboard navigation support, accessibility features, and trigger character (:) support as specified in issue #808.
Description check ❓ Inconclusive The PR description is minimal and lacks required template sections (Summary, Rationale, Changes, Impact, Testing, etc.) but does reference the linked issue #808. Expand the description to follow the template structure, providing details on implementation approach, testing performed, and impacts on existing functionality.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat: add emoji picker option' is related to the changeset, which adds a test for the emoji picker functionality in the slash menu.
Out of Scope Changes check ✅ Passed The changes are limited to adding a test case for emoji picker functionality, which is directly related to the linked issue and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
packages/core/src/extensions/SuggestionMenu/SuggestionMenu.test.ts (1)

144-161: LGTM — test correctly validates the emoji slash menu wiring.

The new test cleanly asserts that the "emoji" item exists in the default slash menu and that its onItemClick delegates to openSuggestionMenu(":", { deleteTriggerCharacter: true, ignoreQueryLength: true }), which matches the implementation in getDefaultSlashMenuItems.ts and the openSuggestionMenu signature in SuggestionMenu.ts.

One small optional nit: vi.spyOn is not restored (no mockRestore() / vi.restoreAllMocks()). Since a fresh editor is created per test and destroyed at the end, this is harmless here, but adding a cleanup (or using afterEach(() => vi.restoreAllMocks())) would make the suite more robust against future refactors that share editor instances across tests.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/extensions/SuggestionMenu/SuggestionMenu.test.ts` around
lines 144 - 161, The test creates a spy with vi.spyOn(sm, "openSuggestionMenu")
but never restores it; add cleanup to avoid leaking mocks across tests by
restoring the spy or all mocks after each test. Update the test file to call
mockRestore() on openSuggestionMenuSpy or add an afterEach hook that invokes
vi.restoreAllMocks(), referencing the spy name openSuggestionMenuSpy and the
vi.spyOn call in SuggestionMenu.test.ts so the mock is cleaned up after the
test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/core/src/extensions/SuggestionMenu/SuggestionMenu.test.ts`:
- Around line 144-161: The test creates a spy with vi.spyOn(sm,
"openSuggestionMenu") but never restores it; add cleanup to avoid leaking mocks
across tests by restoring the spy or all mocks after each test. Update the test
file to call mockRestore() on openSuggestionMenuSpy or add an afterEach hook
that invokes vi.restoreAllMocks(), referencing the spy name
openSuggestionMenuSpy and the vi.spyOn call in SuggestionMenu.test.ts so the
mock is cleaned up after the test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3e40ccbd-d694-487c-93dc-baac7a41935b

📥 Commits

Reviewing files that changed from the base of the PR and between 40ddec4 and e00efa4.

📒 Files selected for processing (1)
  • packages/core/src/extensions/SuggestionMenu/SuggestionMenu.test.ts

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.

Integrate emoji picker

1 participant