FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Make video thumbnails have certain height before image loading starts to avoid layout shifts

Open PikachuEXE opened this issue 1 year ago • 0 comments

Pull Request Type

  • [ ] Bugfix
  • [x] Feature Implementation
  • [ ] Documentation
  • [ ] Other

Related issue

Similar to https://github.com/FreeTubeApp/FreeTube/pull/4713

Description

As title The constant aspect ratio is only applied before image loading finished (no idea how to detect image loading start) in case the image got different aspect ratio

Screenshots

Image loading not started yet image

Image loaded started image

Testing

  • Turn off Replace HTTP Cache (so that renderer does the image loading)
  • In dev tool change network speed to slow 3G
  • Find some random playlist to load (user playlist might be faster)
  • Ensure thumbnail element got height before image loading starts

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

PikachuEXE avatar Feb 27 '24 01:02 PikachuEXE