lbry-desktop/ui/scss
infinite-persistence 032e17cecd
Improve CLS on Posts
## Issue
6068 Fix "Cumulative Layout Shift" for Core Web Vitals

In Posts, the Comments section appears first while we fetch the MD file. When the MD is fetched, Comments get pushed to the bottom (or shifted up for short posts), hence the red CLS scores.

## Approach
There are too many layers between `<FilePage>` and `<DocumentViewer>` to pass the `loading` state around to hide the Comments section, so just make Comments fade in after a 2s delay.

## Changes
- Posts: Add 2s fade-in delay to Comments.
- Posts: remove the gray placeholder. This improves the score a bit more, and reduces flicker as well. There's already a spinner from `FileRenderInline` to tell the user to be patient.
- Posts: add a minimum 30vh height so that short posts don't get collapsed too much, causing the `FileDetails` and Comments to shift. Small shifts are fine as long as CLS is below 0.1.
2021-07-22 10:38:01 +08:00
..
component Improve CLS on Posts 2021-07-22 10:38:01 +08:00
init wip 2021-06-08 13:25:52 -04:00
themes Fix notification color. 2021-06-10 10:21:50 -04:00
all.scss updated code 2021-07-03 14:42:37 -04:00
third-party.scss Revert lazy-loading videojs 2021-07-06 17:04:16 +08:00