Commit 9aca0a1f authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'no-spritesheet' into 'master'

The spritesheet should only load when an award emoji picker is opened.

This makes sure that the emoji spritesheet is loaded **only** when the emoji picker is opened. This saves 250-650KB on every page load.

Prevents !3785 from reverting the fix from !3449.

cc: @jschatz1 @zj @fatihacet 

See merge request !4469
parents 8bb57e70 f9cc619c
......@@ -2,7 +2,7 @@
.awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: url_for([:toggle_award_emoji, @project.namespace.becomes(Namespace), @project, awardable]) } }
- awards_sort(grouped_emojis).each do |emoji, awards|
%button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button", class: (award_active_class(awards, current_user)), data: { placement: "bottom", title: award_user_list(awards, current_user) } }
= emoji_icon(emoji)
= emoji_icon(emoji, sprite: false)
%span.award-control-text.js-counter
= awards.count
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment