Skip to content

Only load emoji spritesheet when necessary

Connor Shea requested to merge (removed):efficient-emoji-loading into master

The emoji_icon helper is for the emoji menu, where all the emoji need to be loaded.

The independent_emoji_icon helper is for the emoji awards that display by default.

Default (the visible award emoji are using the independent_emoji_icon helper): Screen_Shot_2016-03-29_at_5.50.02_PM

With the full award emoji picker open (using emoji_icon): Screen_Shot_2016-03-29_at_5.50.07_PM

On a normal issue where the only award emoji displayed by default are the thumbs-up and thumbs-down emoji, this decreases the page load by 670KB or 250KB depending on pixel density.

You can see in the above screenshots that the images on the page made up ~12KB before and 686KB after opening the emoji picker. Prior to this change, the full 686KB would be loaded regardless.

Resolves #14334 (closed).

cc: @rspeicher @jschatz1

Merge request reports