Skip to content

Update to Twemoji 16 for Emoji 16 support #8774

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

Open
wants to merge 13 commits into
base: trunk
Choose a base branch
from

Conversation

peterwilsoncc
Copy link
Contributor

@peterwilsoncc peterwilsoncc commented May 6, 2025

Updates to Emoji 16:

  • Introduces a new test to account for single data point emoji tests, emojiRendersEmptyCenterPoint
  • Updates the flag test from UN to Sark (CQ) 🇨🇶
  • Adds a test for an Emoji 16 emoji, Shovel 🪏 Splatter 🫟
  • Modesty aside, uses a pretty good pun in the comments
  • Updates the CDN URL to point to the 16.0.1 images.
  • Updates the grunt script to pull emoji images from the 16.0.1 version of Twemoji for generating the regex
  • Updates Twemoji (regex only change)
  • I'm leaving the bot to update the formatting.php regex.

@westonruter Would you be able to validate that I am passing the new function around correctly for the support tests to continue working in workers?

@pento I based the test for an empty center point on the tests in the version in the 4.2 branch, do you recall if that caused any problems?

/*
* This creates a smiling emoji, and checks to see if there is any image data in the
* center pixel. In browsers that don't support emoji, the character will be rendered
* as an empty square, so the center pixel will be blank.
*/
context.fillText( String.fromCharCode( 55357, 56835 ), 0, 0 );
return context.getImageData( 16, 16, 1, 1 ).data[0] !== 0;

Trac ticket: https://core.trac.wordpress.org/ticket/63324


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copy link

github-actions bot commented May 6, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @1178653+wordpress-develop-pr-bot[bot]@users.noreply.github.com.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props peterwilsoncc, westonruter, pento.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@peterwilsoncc peterwilsoncc requested review from westonruter and pento May 6, 2025 02:04
Copy link

github-actions bot commented May 6, 2025

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@pento
Copy link
Member

pento commented May 6, 2025

I based the test for an empty center point on the tests in the version in the 4.2 branch, do you recall if that caused any problems?

This would potentially cause the test to incorrectly fail if the site or UA is using Noto Emoji Font, as it looks like the centre pixel for the shovel would be white. This is an extreme edge case that I usually wouldn't be concerned about, particularly as it hasn't caused any reported issues with the historical smiley used.

If you feel like addressing it, it could probably be mitigated by testing with the splatter emoji, instead.

@westonruter
Copy link
Member

Would you be able to validate that I am passing the new function around correctly for the support tests to continue working in workers?

@peterwilsoncc This looks good to me!

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