#40858 closed enhancement (fixed)
Upgrade Twemoji to 2.3.0
Reported by: | peterwilsoncc | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Emoji | Keywords: | commit dev-reviewed |
Focuses: | Cc: |
Description
Twemoji 2.3.0 was released overnight to support Emoji 5
Diff https://github.com/twitter/twemoji/compare/v2.2.5...v2.3.0
Required:
- Update CDN (see meta ticket)
- Update flag test (England, Scotland or Wales)
- Update person test
- Script
Attachments (2)
Change History (19)
#3
@
8 years ago
- Owner changed from peterwilsoncc to pento
Updated tests:
- English flag using 5 letter sub-division code
- Replace emoji 4 tests with emoji 5's bearded person
Giving this to you @pento as you have the requisite CDN commit.
Local testing prior to the CDN being loaded will require the following filters and hosting the images locally.
<?php function wp40858_filtered_emoji_svn_cdn( $cdn = '' ) { return 'http://src.wordpress-develop.dev/path/to/svg/'; } function wp40858_filtered_emoji_png_cdn( $cdn = '' ) { return 'http://src.wordpress-develop.dev/path/to/72x72/'; } add_filter( 'emoji_svg_url', 'wp40858_filtered_emoji_svn_cdn' ); add_filter( 'emoji_url', 'wp40858_filtered_emoji_png_cdn' );
#6
follow-up:
↓ 7
@
8 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
This seems to be not working in Safari in Mac Sierra.
Test screenshot below:
The first is the England flag. The second is bearded person. The third is the UN flag.
The test site is: http://charming-okapi.w4.poopy.life/2017/05/26/test/
I used the Wordpress beta tester plugin to upgrade to the Wordpress nightly build which seems to have the code added in this ticket.
(Sorry for the bad site name but the site creators chose it for a reason).
#7
in reply to:
↑ 6
@
8 years ago
Replying to superpoincare:
This seems to be not working in Safari in Mac Sierra.
Thanks for the catch.
Testing in https://jsbin.com/fogoxac/13/edit?js,output shows two things:
- In the last commit, I introduced a bug comparing the UN flag to a broken pride flag. This causes the flag test to pass.
- In Safari, Fitzpatrick skin tone modifiers are displayed as tofu if they follow a tofu and as the skin tone if they follow a zero-width space. This causes the bearded person test to pass
To mitigate this I'll remove the skin tone modifier from our bearded person and compare the UN flag to a broken UN flag.
#8
follow-up:
↓ 9
@
8 years ago
In 40858.2.diff:
- Fixes the UN flag bug introduced in [40837]
- Replaces the bearded person check with a male fairy. Emoji 5 does not have gendered bearded people, so I needed to switch it out so I could use the ZWJ/ZWS check for broken render.
Reduced tests case: https://jsbin.com/fogoxac/18/edit?js,output
@superpoincare are you able to check this patch?
#9
in reply to:
↑ 8
@
8 years ago
Replying to peterwilsoncc:
skin tone modifiers are displayed as tofu if they follow a tofu and as the skin tone if they follow a zero-width space. This causes the bearded person test to pass
To mitigate this I'll remove the skin tone modifier from our bearded person and compare the UN flag to a broken UN flag.
Replaces the bearded person check with a male fairy. Emoji 5 does not have gendered bearded people, so I needed to switch it out so I could use the ZWJ/ZWS check for broken render.
This may be the most interesting and appealing set of comments in an open source project that I have ever seen.
Well done. Props to you, good sir.
#10
@
8 years ago
Hi Peter,
It's working now.
I was able to test by modifying the file formatting.php in the wp-includes folder with the diff.
The test site is http://glorious-serval.w3.poopy.life/
and this is the screenshot:
So works!
#11
@
8 years ago
- Keywords commit added
Thanks for checking. I've labeled it commit ready & will arrange for another set of eyes to go over it as core is in RC.
This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.
8 years ago
#14
follow-up:
↓ 15
@
8 years ago
Shouldn't emoji4 in the file wp-emoji-loader.js be emoji5?
Such as
case 'emoji5'
instead of
case 'emoji4'
and emoji51 and emoji52 instead of emoji41 and emoji42.
(Just the naming, otherwise seems to run fine.
#15
in reply to:
↑ 14
@
8 years ago
- Keywords dev-reviewed added
Replying to superpoincare:
Shouldn't emoji4 in the file wp-emoji-loader.js be emoji5?
I caught that after the event too but will fix when WordPress 4.9 opens for commits, it's not important enough for an RC.
I'm inclined to refactor slightly similar to the method in the tests as repeating the code has lead to a couple of mistakes recently.
I've converted Dooooooo iiiiitttttttt to dev-reviewed and will commit shortly.
Related meta ticket https://meta.trac.wordpress.org/ticket/2839