#48293 closed feature request (fixed)
Update Twemoji to version 12.1.3
Reported by: | desrosj | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Emoji | Keywords: | has-patch good-first-bug commit dev-reviewed |
Focuses: | Cc: | ||
PR Number: |
Description
This version includes adjustments to a handful of emoji.
Release notes: https://github.com/twitter/twemoji/releases/tag/v12.1.3
Attachments (1)
Change History (19)
#5
@
6 days ago
@desrosj @pento @dd32
The latest version of Twemoji (https://github.com/twitter/twemoji/releases/tag/v12.0.4) includes some replacement emojis and no new ones. This is validated by doing a diff versus the latest s.w.org CDN's https://s.w.org/images/core/emoji/12.0.0-1/72x72
and https://s.w.org/images/core/emoji/12.0.0-1/svg
(analogous) directories compared to the Twemoji release, and seeing that it's all modifications (no adds or deletes).
Looks like to me that we have two paths that we can go down:
- We could replace the assets from the latest Twemoji release in the path that is serving the current CDN, i.e.
https://s.w.org/images/core/emoji/12.0.0-1/72x72
andhttps://s.w.org/images/core/emoji/12.0.0-1/svg
and then, if possible, purge the CDN cache on all URLs beginning with those paths. Even if we do this, given the current cache TTL is ten years (cache-control: max-age=315360000
). Anything that has the assets cached will not see the changed emoji for a long time without any other intervention. This is rather easy I'd imagine, would require updating the 22 or so diffed assets in place where the current assets are stored that are being served by CDN. After doing that, I believe the only update in code would be changing the package.lock and re-running npm install.
- We can add the whole updated image-set including the 12.1.3 changes into a new directory on the CDN, i.e.
https://s.w.org/images/core/emoji/12.1.3/72x72/
andhttps://s.w.org/images/core/emoji/12.1.3/svg/
and serve the new assets from there -- a corresponding update of the URLs being referenced need to be updated, i.e. replace the four or so places where the 12.0.0-1 is referenced in code, e.g.,
'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/12.0.0-1/72x72/' ),
to
'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/12.1.3/72x72/' ),
along with updating the package.lock and re-running npm install. Without any institutional knowledge, the second option makes the most sense as it is cut and dry and less likely to see inconsistencies, but I am not sure if doing so would be labor intensive or would require any additional work.
Let me know your thoughts.
#6
@
6 days ago
- Milestone changed from 5.4 to 5.3
The 12.0.0-1
CDN folder currently includes everything up to Twemoji version 12.1.2 (which, in an unfortunate versioning coincidence, doesn't correspond to the Emoji 12.1 spec). So, the only changes to be concerned about are those in the Twemoji 12.1.3 release:
- Trans flag: This was added in Twemoji 12.1, so currently only works in WordPress 5.3. I'm fine with the older version appearing for the handful of people who may have it cached already.
- Rosetta, ballot box, puzzle piece: All from older Emoji specs, so are probably cached by a lot of people. The appearance has been polished, but the meaning hasn't been changed. I don't think there's a risk of folks seeing the older/newer versions depending on what they have cached.
- Woman/Man/Person playing handball: From an older emoji spec. The figure has changed direction, but is otherwise the same. Given that other vendor implementations vary in what direction they face, I don't think this is a major concern. (Note: the Twemoji 12.1.3 changelog incorrectly shows that the man playing handball has changed to using the figure of the woman playing handball.)
Provided this can be done in WP 5.3, I'm inclined to think that just overwriting the 12.0.0-1
folder on the CDN, and upgrading the Twemoji package version is fine.
I'll move this ticket to the 5.3 milestone for consideration, but it's up to the 5.3 release leads as to whether they want to merge it this late in the cycle.
#7
@
6 days ago
in that case, I believe this patch is all that's needed @pento -- we also need to coordinate updating the CDN with the SVG/PNG files from https://github.com/twitter/twemoji SVG and 72x72
#8
@
4 days ago
Change as described by @pento above committed and deployed in [dotorg:15520]. cc @desrosj
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
4 days ago
#12
@
4 days ago
- Keywords commit dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to backport.
This ticket was mentioned in Slack in #core by desrosj. View the logs.
4 days ago
#14
@
4 days ago
- Keywords has-patch dev-reviewed added; needs-patch dev-feedback removed
Looks good to backport.
Adding
good-first-bug
.Also, just wanted to note that the assets would need to be updated on .org when this is committed.