Commit graph

57 commits

Author SHA1 Message Date
infinite-persistence
3b47edc3b9
Livestream category improvements (#7115)
*  Remove old method of displaying active livestreams

Completely remove it for now to make the commit deltas clearer.
We'll replace it with the new method at the end.

* Fetch and store active-livestream info in redux

* Tiles can now query active-livestream state from redux instead of getting from parent.

*  ClaimTilesDiscover: revert and cleanup

## Simplify
- Simplify to just `uris` instead of having multiple arrays (`uris`, `modifiedUris`, `prevUris`)
- The `prevUris` is for CLS prevention. With this removal, the CLS issue is back, but we'll handle it differently later.
- Temporarily disable the view-count fetching. Code is left there so that I don't forget.

## Fix
- `shouldPerformSearch` was never true when `prefixUris` is present. Corrected the logic.
- Aside: prefix and pin is so similar in function. Hm ....

* ClaimTilesDiscover: factor out options

## Change
Move the `option` code outside and passed in as a pre-calculated prop.

## Reason
To skip rendering while waiting for `claim_search`, we need to add `React.memo(areEqual)`. However, the flag that determines if we are fetching `claim_search` (fetchingClaimSearchByQuery[]) depends on the derived options as the key.

Instead of calculating `options` twice, we moved it to the props so both sides can use it.

It also makes the component a bit more readable.

The downside is that the prop-passing might not be clear.

* ClaimTilesDiscover: reduce ~17 renders at startup to just 2.

* ClaimTilesDiscover: fill with placeholder while waiting for claim_search

## Issue
Livestream claims are fetched seperately, so they might already exists. While claim_search is running, the list only consists of livestreams (collapsed).

## Fix
Fill up the space with placeholders to prevent layout shift.

* Add 'useFetchViewCount' to handle fetching from lists

This effect also stashes fetched uris, so that we won't re-fetch the same uris during the same instance (e.g. during infinite scroll).

*  ClaimListDiscover: revert and cleanup

## Revert
- Removed the 'finalUris' stuff that was meant to "pause" visual changes when fetching. I think it'll be cleaner to use React.memo to achieve that.

## Alterations
- Added `renderUri` to make it clear which array that this component will render.
- Re-do the way we fetch view counts now that 'finalUris' is gone. Not the best method, but at least correct for now.

* ClaimListDiscover: add prefixUris, similar to ClaimTilesDiscover

This will be initially used to append livestreams at the top.

*  Re-enable active livestream tiles using the new method

* doFetchActiveLivestreams: add interval check

- Added a default minimum of 5 minutes between fetches. Clients can bypass this through `forceFetch` if needed.

* doFetchActiveLivestreams: add option check

We'll need to support different 'orderBy', so adding an "options check" when determining if we just made the same fetch.

* WildWest: limit livestream tiles + add ability to show more

Most likely this behavior will change in the future, so we'll leave `ClaimListDiscover` untouched and handle the logic at the page level.

This solution uses 2 `ClaimListDiscover` -- if the reduced livestream list is visible, it handles the header; else the normal list handles the header.

* Use better tile-count on larger screens.

Used the same method as how the homepage does it.
2021-09-24 10:26:21 -04:00
zeppi
d4bab45809 removeNags 2021-08-29 10:51:59 -04:00
zeppi
ed0387d94a pinning 2021-07-22 23:24:55 -04:00
zeppi
90e2a225e4 use meme component 2021-07-19 14:00:35 -04:00
zeppi
dfc013d423 more recon 2021-07-18 11:27:05 -04:00
zeppi
d612b86a8c homepages v2
homepages served without cache

error catching

memo homepagedata

support auto limit

no more config pins
2021-07-14 14:09:46 -04:00
Dispatch
fba8b89b3b
Merge pull request #6438 from lbryio/retargetting-pix
add retargeting pixel
2021-07-13 20:49:18 -07:00
zeppi
e6376871d5 move pixel to web 2021-07-13 23:40:49 -04:00
zeppi
0bb9c520ff fix livestream display 2021-07-08 15:08:53 -04:00
DispatchCommit
f390320030 add retargeting pixel 2021-07-08 01:26:58 -07:00
infinite-persistence
bb8fb038ca
WaitUntilOnPage: add option to load when approaching viewport 2021-07-05 12:06:54 +08:00
infinite-persistence
4562a33926
Lazy-load homepage categories 2021-06-25 16:00:46 +08:00
infinite-persistence
742110c81c Homepage|Discover: hide livestreams, then append active livestreams at the top.
This essentially hides inactive livestreams from the list.
2021-04-30 14:11:42 -04:00
infinite-persistence
0258c2d3c3 useGetLivestreams: add ability to filter by minimum viewers 2021-04-30 14:11:42 -04:00
infinite-persistence
6ef42cd121 Run 'claim_search' with 'has_no_source' to bring up buried active livestreams.
Scenarios where active livestreams will not appear:
- creation date is way back.
- homepage section options excludes livestreams.

Make an explicit `claim_search` but with `has_no_source` if the client wants `liveLivestreamsFirst`.

If there are lots of channels with livestreams, there's a possibility that the final list will be larger than what was requested. We could trim it to be within the original `options.pageSize` range, but I left that out for now.
2021-04-30 14:11:42 -04:00
infinite-persistence
41380d20df Homepage: move "LIVE" livestreams to the front. 2021-04-30 14:11:42 -04:00
zeppi
9b82f57006 livestream related publish fixes 2021-04-22 10:59:03 -04:00
Sean Yesmunt
63453284dd add lbry.tv is shutting down message 2021-03-19 17:58:05 -04:00
zeppi
cbe4cb1cf1 i18n homepage sections 2020-12-23 09:45:45 -05:00
infiinte-persistence
c059f3dced Fix double translation in homepage
## Issue
The "Trending for xxx" string was being resolved and translated twice, so it often re-appears in the string list during development.

## Change
It seems like `getHomepage` is repopulated every time, so I think it is safe to just resolve and translate `title` at that level.

## Extra
Remove unused "Creator analytics are down" message per recent changes.
2020-11-30 14:47:16 -05:00
Sean Yesmunt
bbfed3fbb1 remove special styling for first homepage category 2020-11-17 14:58:54 -05:00
zeppi
ad7a0c9cac reconcile more 2020-11-10 14:02:59 -05:00
Sean Yesmunt
60bac01a4a remove extra prop 2020-11-10 12:08:19 -05:00
Sean Yesmunt
1023f30b4c initial PR for custom homepages - take 2 2020-11-10 12:08:19 -05:00
Sean Yesmunt
353c1a5689 Revert "unified custom homepage"
This reverts commit 55768fc6b5.
2020-11-10 10:36:11 -05:00
jessop
55768fc6b5 unified custom homepage 2020-11-10 10:24:04 -05:00
Sean Yesmunt
172e918de5 pass to 2020-10-13 15:31:07 -04:00
Sean Yesmunt
4e1076e01b make category header clickable 2020-09-29 17:12:32 -04:00
Sean Yesmunt
c1e6e90896 large claim-grid header text + optional icon 2020-09-29 17:12:32 -04:00
Sean Yesmunt
19fb7d7f06 new layout 🕺 2020-09-29 17:12:32 -04:00
Sean Yesmunt
e0e33eb148 additional copy changes 2020-08-21 11:47:41 -04:00
Sean Yesmunt
3b4ac976b6 Revert "full width homepage"
This reverts commit 0018fdaebc.
2020-08-18 12:53:07 -04:00
Sean Yesmunt
0018fdaebc full width homepage 2020-08-18 09:25:36 -04:00
Sean Yesmunt
aa092baec4 move claim-grid link to bottom right 2020-07-23 11:16:32 -04:00
Sean Yesmunt
90327a72ed add comments behind a flag 2020-07-23 11:03:00 -04:00
jessop
e3c2919373 rename lbrytv to web
language and API consts

improve customization
custom homepages
get config from .env.default
custom title and logo

small changes

add pinned item to sidebar

rebase?
2020-05-25 17:21:02 -04:00
Thomas Zarebczan
6d888b5121 A few tweaks 2020-05-22 11:17:47 -04:00
Sean Yesmunt
c2abcf110c
Paid content on lbry.tv (#4197) 2020-05-21 11:38:28 -04:00
Jeremy Kauffman
ab70f1c758
remove #whothinks 2020-05-05 15:03:15 -04:00
Jeremy Kauffman
ef437c8847 proper search parameters 2020-04-22 19:19:00 -04:00
Sean Yesmunt
220994eeaa no reposts for #whothinks 2020-04-22 15:17:29 -04:00
Sean Yesmunt
2504d126bd update homepage 2020-04-22 13:29:07 -04:00
Jeremy Kauffman
3d6270b133 tag homepage campaign support 2020-04-17 12:24:33 -04:00
Jeremy Kauffman
2b042d1d97 new homepage searches, always show sidebar 2020-04-02 13:12:29 -04:00
Jeremy Kauffman
195fb4363b only show content for tags on the homepage 2020-03-26 10:33:43 -04:00
Sean Yesmunt
86414855b1 fix discover link on homepage 2020-03-10 10:54:22 -04:00
Sean Yesmunt
41c9ba4869 fix links on homepage 2020-03-09 11:48:05 -07:00
Sean Yesmunt
31ef391ff6 fix claimType prop on home page 2020-02-28 12:37:43 -05:00
Sean Yesmunt
d2a87f164a fix page names 2020-02-28 10:13:33 -05:00
Sean Yesmunt
e1aac34079 use claim_search for channel discovery 2020-02-20 13:17:11 -05:00