lbry-desktop/ui/page
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
..
backup add wallet sync message on wallet page 2020-02-21 13:42:17 -05:00
buy filter buy countries on master 2021-07-06 16:06:58 -04:00
channel Filter out playlists from main channel listing (#6931) 2021-08-23 16:24:39 -04:00
channelNew claim email_verified reward on channel/new page 2021-04-04 22:16:45 -04:00
channels Thumbnail fixes (#6969) 2021-08-26 10:51:53 -04:00
channelsFollowing Livestream category improvements (#7115) 2021-09-24 10:26:21 -04:00
channelsFollowingDiscover Revert "fix recommended follows (#7081)" (#7085) 2021-09-13 15:50:28 -04:00
checkoutPage Revert "move stuff to web (#6537)" 2021-07-19 10:12:57 -04:00
collection Expanded Playback and List controls (#6921) 2021-09-02 16:05:32 -04:00
creatorDashboard remove analytics 2021-06-15 13:47:56 -04:00
discover Livestream category improvements (#7115) 2021-09-24 10:26:21 -04:00
embedWrapper Fix: Paid embed warning was showing lbry.tv (#6819) 2021-08-12 23:06:04 -04:00
file Ignore/reset player position if video is too short or almost finished playing. (#6976) 2021-08-30 10:41:38 -04:00
fileListDownloaded wip 2021-06-08 13:25:52 -04:00
fileListPublished use button-toggle group for page title 2021-03-16 12:04:39 -04:00
fourOhFour Revert "move stuff to web (#6537)" 2021-07-19 10:12:57 -04:00
help integrate some Odysee code with master 2021-04-27 19:56:30 -04:00
home Livestream category improvements (#7115) 2021-09-24 10:26:21 -04:00
invite add youtube sync to first run 2020-09-29 17:12:32 -04:00
invited new layout 🕺 2020-09-29 17:12:32 -04:00
library new lbc icon 2020-09-29 17:12:32 -04:00
listBlocked Blocklist page: fix perpetual spinner when trying to refresh with no channels 2021-09-24 15:04:59 +08:00
lists wip 2021-06-08 13:25:52 -04:00
livestream livestream api constant rename 2021-07-28 16:51:11 -04:00
livestreamCurrent Add 'ENABLE_WIP_FEATURES' for live page. 2021-08-12 21:52:58 -07:00
livestreamSetup Restore "Stream Key Button (#7127)" + lint and modifications 2021-09-23 20:13:02 +08:00
navigationHistory refactor lbrytv web server 2019-11-11 13:27:29 -05:00
notifications Fix notifications fetching issues (#7002) 2021-09-01 12:03:48 -04:00
passwordReset new layout 🕺 2020-09-29 17:12:32 -04:00
passwordSet new layout 🕺 2020-09-29 17:12:32 -04:00
passwordUpdate Move 'update password' into a subpage 2021-08-23 23:45:31 +08:00
publish add initial support for comment API outside of SDK 2021-02-11 10:45:34 -05:00
receive ReceiveLBC: switch from Modal to Page 2021-04-13 14:02:25 -04:00
report Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
reportContent Implement ReportContent page 2021-04-21 10:49:31 -04:00
repost changes, bump 2020-12-28 15:00:15 -05:00
rewards fix accessibility issue on rewards page #5991 2021-07-20 12:14:28 -05:00
rewardsVerify rewards redirect fix for manually approved users 2020-07-03 13:18:28 -04:00
search send recsys powered-by (#6875) 2021-08-17 10:03:25 -04:00
send allow sending directly to a channel or content address (#5990) 2021-05-20 15:30:40 -04:00
settings Page: the 'settingsPage' option now automatically adds the sidebar. 2021-08-23 23:45:25 +08:00
settingsCreator Convert "moderator search" to use the new widget 2021-09-08 21:27:25 +08:00
settingsNotifications Convert setting sub-pages to new style 2021-08-23 23:45:26 +08:00
settingsStripeAccount Merge pull request #6917 from lbryio/squashed-and-merged 2021-08-24 18:46:47 +02:00
settingsStripeCard Fiat tip improvements (#7038) 2021-09-09 12:52:03 -04:00
show Fix Question Mark appearing on address 2021-08-29 11:40:07 -04:00
signIn new layout 🕺 2020-09-29 17:12:32 -04:00
signInVerify review this 2021-07-13 23:45:51 -04:00
signInWalletPassword get sync password out of signing flow 2020-09-21 14:11:25 -04:00
signUp new layout 🕺 2020-09-29 17:12:32 -04:00
swap CoinSwap: websocket + multi-coin 2021-04-13 14:02:25 -04:00
tagsFollowing Enable tile layout for 'Your Tags' page 2020-12-18 14:02:50 -05:00
tagsFollowingManage per channel notification settings 2020-11-02 14:13:13 -05:00
top i18n 2021-08-03 14:44:57 +08:00
wallet fixes for flow and linter 2021-08-19 23:20:01 +02:00
welcome new layout 🕺 2020-09-29 17:12:32 -04:00
youtubeSync Sort all language dropdowns, not just in the Settings Page. 2021-06-07 10:15:07 +08:00