Commit graph

27 commits

Author SHA1 Message Date
jessopb
c7021a08ad
Selector refactors (#7424)
* Attempt to speed up sidebar menu for mobile (#283)

* Exclude default homepage data at compile time

The youtuber IDs alone is pretty huge, and is unused in the `CUSTOM_HOMEPAGE=true` configuration.

* Remove Desktop items and other cleanup

- Moved constants out of the component.
- Remove SIMPLE_SITE check.
- Remove Desktop-only items

* Sidebar: limit subscription and tag section

Too slow for huge lists

Limit to 10 initially, and load everything on "Show more"

* Fix makeSelectThumbnailForUri

- Fix memo
- Expose function to extract directly from claim if client already have it.

* Fix and optimize makeSelectIsSubscribed (#273)

- It will not return true if the uri provided is canonical, because the compared subscription uri is in permanent form. This was causing certain elements like the Heart to not appear in claim tiles.
- It is super slow for large subscriptions not just because of the array size + being a hot selector, but also because it is looking up the claim twice (not memo'd) and also calling `parseURI` to determine if it's a channel, which is unnecessary if you already have the claim.

- Optimize the selector to only look up the claim once, and make operations using already-obtained info.

* Simplify makeSelectTitleForUri

No need to memo given no transformation.

* Simplify makeSelectIsUriResolving

- Memo not required. `resolvingUris` is very dynamic and is a short array anyways.
- Changeg from using `indexOf` to `includes`, which is more concise.

* Cost Info selector fixes

- no memo required since they are just directly accessing the store.

Co-authored-by: infinite-persistence <64950861+infinite-persistence@users.noreply.github.com>
Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2022-01-19 20:46:01 -05:00
jessopb
a3398843c2
Optimize selectClaimIsMine (#7370)
Frequently used; top in perf profile

Most of the time, you already have the claim object in the current context. `selectClaimIsMineForUri` will retrieve the claim again, which is wasteful, even if it is memoized (looking up the cache still takes time).

Break apart the logic and added the alternative `selectClaimIsMine` for faster lookup.

Co-authored-by: infinite-persistence <inf.persistence@gmail.com>
2021-12-31 12:52:26 -05:00
zeppi
3a77c7507b cut SIMPLE_SITE 2021-10-20 17:05:37 -04:00
zeppi
ee9f63a161 integrate all the things
bugfix

wip

flow

fix

cleaning

clean
2021-10-15 23:49:41 -04:00
btzr-io
7c8c43d3a7 fix file actions accessibility 2021-07-15 15:14:21 -05:00
infinite-persistence
fbcb740dc9 Move 'Download' and 'Report Content' into overflow menu.
## Issue
6236 Add context menu to file page

## Notes
The download button actually handles a lot of things -- generating 'streamingUrl', differences between Web and Desktop, download progress for Desktop, etc.  A simpler fix would be to put something else (maybe "Share") into the overflow menu instead.

Anyway, went ahead to do it per 6236, but retained the item for Desktop since we need a progress label.
2021-06-18 15:50:13 -04:00
infinite-persistence
217ae3ecf7 Fix broken 'Open File' icon color
## Issue
The removal of `svg` from `media__subtitle` in 09b689ba made the icon black.

## Fix
Both 'Open File' and 'Download' should have the same css class.
2021-02-24 11:23:06 -05:00
Sean Yesmunt
0cc3af28a3 flow fixes 2020-12-16 10:52:22 -05:00
Sean Yesmunt
138d84155b fix opening files externally on desktop 2020-12-15 13:58:27 -05:00
Sean Yesmunt
a92a3305b1 align FileActions with odysee style 2020-09-30 17:00:18 -04:00
Sean Yesmunt
1dcf16b0b4 fix download link on desktop 2020-06-08 16:26:49 -04:00
infiinte-persistence
1ef182ed71 Fix split sentence: "% downloaded"
#4239
2020-05-28 09:50:08 -04:00
Sean Yesmunt
c2abcf110c
Paid content on lbry.tv (#4197) 2020-05-21 11:38:28 -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
Kenneth Tubman V
b2bf80f3ce Added download icon to Claim Previews 2020-02-05 12:03:54 -05:00
jessop
71c1a8821a reenable downloads 2020-02-01 16:17:20 -05:00
Sean Yesmunt
4bb4d66852 make sure claim exists before showing download link 2020-01-30 11:48:14 -05:00
Sean Yesmunt
10d12fb0e8 cleanup 2020-01-29 14:04:08 -05:00
Sean Yesmunt
5944e471c7 use local download url that redirects to api server 2020-01-13 12:42:24 -05:00
Sean Yesmunt
b50f1b0d8b trigger analytics view for download on lbry.tv 2020-01-13 12:42:24 -05:00
Sean Yesmunt
978871a927 enable downloads on lbry.tv 2020-01-13 12:42:24 -05:00
Sean Yesmunt
15815e5071 remove [data-mode='dark'] 2019-11-22 16:45:33 -05:00
Sean Yesmunt
73bd46e7d8 fire analytics event after file has started downloading 2019-11-13 10:43:21 -05:00
jessop
1427ad2a76 triggers analytic before completed for downloads 2019-11-13 10:43:21 -05:00
jessop
ba4d6afde0 triggers analytic on download click + completed 2019-11-13 10:43:21 -05:00
jessop
723d1fabbb adds anaytics to download button 2019-11-13 10:43:21 -05:00
Sean Yesmunt
6ad31a3ce9 refactor lbrytv web server 2019-11-11 13:27:29 -05:00