uiowa / brand-icon-browser

0 stars 1 forks source link

Lag on color switch #16

Open GaryRidgway opened 2 years ago

GaryRidgway commented 2 years ago

There is some color lag with changing from two color to one color and vice versa, should we skeleton load this as well?

@quamsta response to this:

Possibly, although possibly introducing pagination or "load as you scroll" so that fewer DOM elements aren't changing at once may alleviate this. (500 or so icons are changing their variants at once, which may be hard on the CPU) I'm a little hesitant to run any code in between the color switch, just for performance reasons.

I don't think this would have to run code though if we are just using placeholder css backgrounds? perhaps we only rule this out after we investigate the skeleton loading? Then we can discern whether this will be too high cost to run between reflows.

quamsta commented 2 years ago

@GaryRidgway What about something like this?

https://user-images.githubusercontent.com/472923/171717578-31311cc5-0a9c-427d-85f0-c4340732ee83.mov

quamsta commented 2 years ago

I tried an experiment with this fading effect, but Safari REALLY hates this when viewing all of the icons at once. Almost caused @bspeare's computer to explode.

Probably won't continue down that route unless we somehow paginate or reduce the number of icons shown at once, or otherwise optimize this