Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#35300 closed task (blessed) (fixed)

Clean up emoji compatibility code

Reported by: pento's profile pento Owned by: pento's profile pento
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: Emoji Keywords: emoji has-patch
Focuses: Cc:

Description

The code in wp-emoji-loader.js is fairly messy, and it's kind of annoying to have to remember to update several places when a new test is added (for example, we'll need a new test when Unicode 9 lands later in the year).

Let's make it easier to read, and fix how wp-emoji.js uses the settings.supports object, so that we don't have to keep updating it.

Attachments (1)

35300.diff (7.0 KB) - added by pento 9 years ago.

Download all attachments as: .zip

Change History (8)

#1 @pento
9 years ago

  • Component changed from General to Emoji

#2 @ocean90
9 years ago

  • Keywords needs-patch added

@pento
9 years ago

#3 @pento
9 years ago

  • Keywords has-patch added; needs-patch removed

35300.diff makes it a bit nicer to work with - we only need to add a new case in browserSupportsEmoji(), then add that corresponding test to the tests array.

#4 @pento
9 years ago

  • Owner set to pento
  • Resolution set to fixed
  • Status changed from new to closed

In 36816:

Emoji: Clean up the emoji browser support tests.

As new sets of emoji are added to Unicode, and browsers add support for them at random intervals, we'll inevitably need to add new tests to the emoji loader. This change makes it much easier to add new tests as they're needed.

Fixes #35300.

#5 @pento
9 years ago

In 36818:

Emoji: Fix some jshint warnings introduced in [36816].

See #35300.

#6 @pento
9 years ago

In 36927:

Emoji: Twemoji replacements weren't working in TinyMCE after [36816].

See #35300.

#7 @pento
9 years ago

In 37029:

Emoji: The everythingExceptFlag browser support flag, introduced in [36816], wasn't being initialised correctly.

See #35300.

Note: See TracTickets for help on using tickets.