Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#37543 closed task (blessed) (fixed)

Update Twemoji for pirate and rainbow flags

Reported by: pento's profile pento Owned by: pento's profile pento
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Emoji Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description (last modified by pento)

There's a minor update to Twemoji that adds support for the pirate and rainbow flags.

https://github.com/twitter/twemoji/commit/cae041df48a4365bd5d4e232af4859a2704e2dd9

The rainbow flag in an officially documented ZJW sequence, and can be implemented immediately, despite not being part of Unicode 9.0. It was just added to the iOS 10 beta, so we can assume it'll become more popular very soon.

The pirate flag is *not* an officially documented ZJW sequence, and I'm not aware of any other platforms supporting it at this time. I don't consider that to be an issue, as it doesn't break forwards compatibility (it's very unlikely that a different emoji would use the same ZJW sequence in the future, one would have to derive a different meaning from "skull/crossbones" + "black flag" to even suggest it).

Due to the minor nature of this change, I don't think we need to add an extra test to the twemoji loader, this can just be an update to the twemoji.js regex.

Attachments (1)

37543.diff (9.9 KB) - added by pento 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 @pento
8 years ago

  • Description modified (diff)
  • Owner set to pento
  • Status changed from new to assigned

#2 @pento
8 years ago

  • Description modified (diff)

@pento
8 years ago

#3 @pento
8 years ago

  • Keywords has-patch 2nd-opinion added

The assets have been deployed to the CDN.

The patch requires review and approval from another permanent committer.

#4 @ocean90
8 years ago

  • Keywords commit dev-reviewed added; 2nd-opinion removed

@pento 37543.diff looks good to me.

#5 @pento
8 years ago

In 38179:

Emoji: Add support for the Rainbow and Pirate flag emoji.

Twemoji recently added images for the Rainbow and Pirate flags, and the latest iOS 10 beta added support for the Rainbow flag. Never let it be said that WordPress is at anything less than the cutting edge of emoji research and development.

Props ocean90 for the code review.

See #37543.

#6 @pento
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 38180:

Emoji: Add support for the Rainbow and Pirate flag emoji.

Twemoji recently added images for the Rainbow and Pirate flags, and the latest iOS 10 beta added support for the Rainbow flag. Never let it be said that WordPress is at anything less than the cutting edge of emoji research and development.

Merge of [38179] to the 4.6 branch.

Props ocean90 for the code review.
Fixes #37543.

#7 @ocean90
8 years ago

In 38194:

Emoji: Update the Twemoji loader to include the rainbow flag.

[38179] added support for the rainbow flag to core, but platform compatibility is a bit strange, because the flag was defined out of sync with the usual Unicode release cycle. For example Android N supports all Unicode 9.0 emoji, but doesn't support the rainbow flag thus the rainbow flag isn't rendered.
The Twemoji loader already has an exception for flags - it'll load if the browser supports everything but flags, and then only replace flag emoji, leaving everything else as native rendering. To provide a seamless experience for all flags the loader now uses the rainbow flag to test flag support.

Props pento.
See #37543.
Fixes #37566.

#8 @ocean90
8 years ago

In 38195:

Emoji: Update the Twemoji loader to include the rainbow flag.

[38179] added support for the rainbow flag to core, but platform compatibility is a bit strange, because the flag was defined out of sync with the usual Unicode release cycle. For example Android N supports all Unicode 9.0 emoji, but doesn't support the rainbow flag thus the rainbow flag isn't rendered.
The Twemoji loader already has an exception for flags - it'll load if the browser supports everything but flags, and then only replace flag emoji, leaving everything else as native rendering. To provide a seamless experience for all flags the loader now uses the rainbow flag to test flag support.

Merge of [38194] to the 4.6 branch.

Props pento.
See #37543.
See #37566.

Note: See TracTickets for help on using tickets.