comfig-app icon indicating copy to clipboard operation
comfig-app copied to clipboard

HUD screenshots do not preload

Open chitinlink opened this issue 1 year ago • 7 comments

2023-11-27_02 10 36

HUD screenshots do not preload, causing the rapid preview to just flash uselessly until you've gone through all of them.

chitinlink avatar Nov 27 '23 01:11 chitinlink

https://github.com/mastercomfig/comfig-app/blob/002964ac332c203af397161afa06617490576e6d/src/components/huds/HudListItem.astro#L44C33-L44C33

Unfortunately lazy-loading images will not load until the image "reaches a calculated distance from the viewport, as defined by the browser", and as far as I know, if the image has display: none, it is never considered to be in the viewport to begin with

chitinlink avatar Nov 27 '23 01:11 chitinlink

What browser is this?

mastercoms avatar Nov 27 '23 01:11 mastercoms

Firefox 119.0.1 (64-bit)

chitinlink avatar Nov 27 '23 01:11 chitinlink

The fade-in is probably being skipped for some reason, probably animation effects being turned off which enables reduced motion. But, I can agree that even with the fade between, it may still not be good enough for very slow internet connections (~2G levels). I'll think about the best way to solve this.

mastercoms avatar Nov 27 '23 02:11 mastercoms

I'm on Firefox 120.0 (64-bit), Fade-in isn't skipped for me, but I still see the filename for a split second while the image is loading, maybe by default the first image for every hud on the page is loaded, and then when hovering over the hud it loads the next image and waits for it to finish loading before fading into that one?

treacherousfiend avatar Nov 27 '23 02:11 treacherousfiend

animation effects being turned off which enables reduced motion

Interesting, I didn't know about this. image Reduced motion media feature

chitinlink avatar Nov 27 '23 02:11 chitinlink

For firefox, you can set ui.prefersReducedMotion to 0 in about:config to preserve being able to disable Windows animations, but I am not sure if Chrome has an option for anyone curious.

mastercoms avatar Nov 27 '23 02:11 mastercoms