loculus-project / loculus

An open-source software package to power microbial genomic databases
https://loculus.org
GNU Affero General Public License v3.0
37 stars 2 forks source link

New organism card has layout shift of images stretching out when loading #3195

Open corneliusroemer opened 1 week ago

corneliusroemer commented 1 week ago

Small visual thing I noticed when testing latest main, the images don't seem to be sized correctly in the CSS initially so they stretch out when loading: 2024-11-11 18 57 56

Note I slowed down the recording slightly (factor of 2) to make the effect easier to see.

Current production shows no such scaling effect, instead images flash when reloading. 2024-11-11 18 59 05

Maybe the current behavior is on purpose but I think a little CSS magic could fix it probably to not rescale visibly.

theosanderson commented 1 week ago

It seems like this is specific to the super small images

corneliusroemer commented 1 week ago

It seems like this is specific to the super small images Possible, but could also be related to external domain vs same domain:

Google Chrome Beta 2024-11-11 19 55 19

I somehow remember the flashing didn't happen for the external images on loculus.org - this could be an Astro default?

theosanderson commented 1 week ago

good point - yes in that case it's because we don't allow the images to be cached on Astro (allowing that seemed hard but hosting the images somewhere else is easy)