lbry-desktop/ui
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
constants some recon (#6532) 2021-07-18 13:06:52 -04:00
effects useLazyLoading: start loading when near viewport 2021-07-12 17:06:30 -04:00
modal lbc remove file 2021-07-21 15:56:09 -04:00
page recon followDisc 2021-07-21 16:58:13 -04:00
redux Pop up Menu Fixes and Improvements 2021-07-21 14:40:44 -04:00
scss Improve CLS on Posts 2021-07-22 10:38:01 +08:00
util 100% compression doesn't work with current CDN url 2021-07-20 02:34:25 +08:00
analytics.js Fix lint (removal of videoFetchDuration) 2021-06-10 10:14:52 -04:00
app.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
comments.js Reactions: switch from SDK to Commentron 2021-07-16 13:41:41 -04:00
i18n.js Revert "Simplify language lists" 2021-04-06 15:42:27 -04:00
index.jsx CodeSplit: Load 3rd-party css before ours. 2021-06-25 16:00:45 +08:00
logWarningConsoleMessage.js new lbc icon 2020-09-29 17:12:32 -04:00
native.js working 2020-12-16 10:52:22 -05:00
reducers.js wip 2021-06-08 13:25:52 -04:00
rewards.js When a new reward is acquired, only close modals if the reward comes from reward_code 2021-01-08 08:16:41 -07:00
store.js improve pending over refreshes 2021-07-05 10:22:13 -04:00