DEV: Bump max theme sprite size to 1MB (#23556)
There is one repo with very large sprites, and it's causing missing icons on some instances.
This commit is contained in:
parent
038de393ed
commit
f6326d03f0
|
@ -244,7 +244,7 @@ module SvgSprite
|
|||
|
||||
THEME_SPRITE_VAR_NAME = "icons-sprite"
|
||||
|
||||
MAX_THEME_SPRITE_SIZE = 512.kilobytes
|
||||
MAX_THEME_SPRITE_SIZE = 1024.kilobytes
|
||||
|
||||
def self.preload
|
||||
settings_icons
|
||||
|
|
|
@ -339,7 +339,8 @@ RSpec.describe SvgSprite do
|
|||
fname = "theme-icon-sprite.svg"
|
||||
symbols = ""
|
||||
|
||||
1500.times do |i|
|
||||
# should exceed MAX_THEME_SPRITE_SIZE
|
||||
3500.times do |i|
|
||||
id = "icon-id-#{i}"
|
||||
path =
|
||||
"M#{rand(1..100)} 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 .008z"
|
||||
|
|
|
@ -671,7 +671,7 @@ HTML
|
|||
fname = "theme-icon-sprite.svg"
|
||||
symbols = ""
|
||||
|
||||
1500.times do |i|
|
||||
3500.times do |i|
|
||||
id = "icon-id-#{i}"
|
||||
path =
|
||||
"M#{rand(1..100)} 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 .008z"
|
||||
|
|
Loading…
Reference in New Issue