Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#35300 closed task (blessed) (fixed)

Clean up emoji compatibility code

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

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 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 @pento
11 years ago

  • Component GeneralEmoji

#2 @ocean90
11 years ago

  • Keywords needs-patch added

@pento
11 years ago

#3 @pento
11 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
11 years ago

  • Owner set to pento
  • Resolutionfixed
  • Status newclosed

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
11 years ago

In 36818:

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

See #35300.

#6 @pento
11 years ago

In 36927:

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

See #35300.

#7 @pento
10 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.