Skip to content

chore: insert emojis as UTF-8 Unicode instead of shortname syntax#39432

Draft
Copilot wants to merge 13 commits intoremove-joypixelfrom
copilot/sub-pr-39411
Draft

chore: insert emojis as UTF-8 Unicode instead of shortname syntax#39432
Copilot wants to merge 13 commits intoremove-joypixelfrom
copilot/sub-pr-39411

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

Emoji insertion via the picker and autocomplete was using :shortname: format. Native emojis should be inserted as their UTF-8 Unicode characters; custom emojis continue to use :shortname:.

Changes

  • Picker (MessageBox.tsx): Resolves the selected emoji name against emoji.list — inserts UTF-8 for native, :shortname: for custom/unknown
  • Autocomplete (: trigger, ComposerPopupProvider.tsx): getValue returns the Unicode character for native emojis; prefix set to '' to prevent the trigger : from being double-prepended
  • Typed completion (MessageBox.tsx): keyup handler auto-converts a fully typed :emoji: shortname to UTF-8 the moment the closing : is pressed — no-ops on custom emojis and unknown shortnames
// Picker — before
chat.emojiPicker.open(ref, (emoji) => chat.composer?.insertText(` :${emoji}: `));

// Picker — after
chat.emojiPicker.open(ref, (emojiName) => {
  const emojiEntry = emoji.list[`:${emojiName}:`];
  const isCustom = emojiEntry?.emojiPackage === 'emojiCustom';
  const text = isCustom ? `:${emojiName}:` : (emojiEntry?.unicode ?? `:${emojiName}:`);
  chat.composer?.insertText(` ${text} `);
});

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

sampaiodiego and others added 12 commits March 6, 2026 14:55
Replace the emojione-based emoji rendering with a new native Unicode
emoji module. Uses emojibase for shortname-to-unicode mapping and
renders emojis as native characters with a standard emoji font stack.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Delete entire emoji-emojione module (CSS sprites, config, templates)
- Remove emojione sprite PNGs (~6.4MB of assets)
- Update all imports to use the new emoji-native module
- Replace emojione.shortnameToUnicode with emojibase-backed utility
- Update emoji picker, tone selector, and parser for native rendering
- Update federation-matrix to use emojibase for emoji conversion
- Remove emoji-toolkit from pdf-worker, render unicode directly
- Remove emojione type declarations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove emojione, emoji-toolkit, emojione-assets from all packages
- Add emojibase and emojibase-data as replacements
- Update eslint and stylelint ignore patterns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update federation e2e tests to use .emoji class instead of .emojione
- Update reaction unit test description

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Mar 6, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 6, 2026

⚠️ No Changeset found

Latest commit: ebacdab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

…typed shortname completion

Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove emojione in favor of native emojis chore: insert emojis as UTF-8 Unicode instead of shortname syntax Mar 6, 2026
@sampaiodiego sampaiodiego force-pushed the remove-joypixel branch 2 times, most recently from e0ef711 to fdc9e41 Compare March 11, 2026 14:20
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.

3 participants