Commit graph

13 commits

Author SHA1 Message Date
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
infinite-persistence fb839b92ef Only apply Staked Levels to Comments (allow it in Posts)
Blocking videos and images was too limiting, plus the system was intended to block spammy comments in the first place.
2021-04-09 11:27:07 -04:00
infinite-persistence 0d850742f5 Disable video previews in Comments and Post if author is below a certain level. 2021-03-12 10:38:16 -05:00
Sean Yesmunt 7702477e71 better posts styling 2021-03-11 14:12:59 -05:00
Sean Yesmunt 295b8cf2e1 refactor floatingUri to allow inline players in comments/markdown 2020-10-21 15:29:29 -04:00
Jeremy Kauffman 793f622d8d semi-broken 2020-04-29 11:00:42 -04:00
Sean Yesmunt 39102d81ca fix viewcount being fired before video starts playing 2020-04-06 15:34:49 -04:00
Jeremy Kauffman 872259b73a
File downloads and refactoring (#3918)
* am I done?

* post diff

* unused selector cleanup

* missed commit

* mess with button styles

* fix flow

Co-authored-by: Jeremy Kauffman <jeremy@lbry.io>
Co-authored-by: Sean Yesmunt <sean@lbry.io>
2020-04-01 14:43:50 -04:00
Sean Yesmunt 72b9f3efdd new text viewer layout 2020-01-06 16:35:43 -05:00
Jeremy Kauffman 24edbc085c disable link prompts 2019-12-03 11:50:39 -05:00
Thomas Zarebczan 4e55415763 fix: unused variable 2019-12-02 23:25:37 -05:00
Thomas Zarebczan 722c0b978c feat: additional file types on lbry.tv
Should support markdown, PDF, and anything in the code viewer. Tested that it's working on web and app.
2019-12-02 23:25:37 -05:00
Sean Yesmunt 6ad31a3ce9 refactor lbrytv web server 2019-11-11 13:27:29 -05:00
Renamed from src/ui/component/viewers/documentViewer.jsx (Browse further)