lbry-desktop/ui/util
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
..
autoLaunch.js fix autolaunch after changing linux cmd capitalization 2019-12-17 13:38:09 -05:00
batch-actions.js integrate all the things 2021-10-15 23:49:41 -04:00
buildHomepage.js Selector refactors (#7424) 2022-01-19 20:46:01 -05:00
claim.js fix library filter crash (#7376) 2021-12-30 15:35:35 -05:00
comments.js Restore comment pagination 2021-07-16 10:54:12 -04:00
context-menu.js Electron 15 (#7384) 2022-01-02 15:33:11 -05:00
country.js Util to get list of countries 2021-04-21 10:49:31 -04:00
debounce.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
deep-equal.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
default-languages.js Sort all language dropdowns, not just in the Settings Page. 2021-06-07 10:15:07 +08:00
detect-typing.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
detect-user-bandwidth.js Send video bitrate and user bandwidth to Watchman (#7145) 2021-10-06 14:59:33 -04:00
downloadClaim.js Move 'Download' and 'Report Content' into overflow menu. 2021-06-18 15:50:13 -04:00
enhanced-layout.js mobile view 2019-12-20 15:03:18 -05:00
fetch.js add 10 second timeout to lbrytv status call 2020-03-16 17:59:24 -04:00
form-validation.js integrate all the things 2021-10-15 23:49:41 -04:00
format-bytes.js use new buffer analytics api 2020-08-07 22:54:29 -04:00
format-credits.js integrate all the things 2021-10-15 23:49:41 -04:00
formatAriaLabel.js fix typo 2021-07-29 11:52:34 -05:00
formatMediaDuration.js add more info for claim-preview-tile aria label 2021-07-15 18:12:11 -05:00
full-screen.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
generate-thumbnail-name.js style pass for channel edit 2020-07-01 22:04:23 -04:00
handle-fetch.js send recsys powered-by (#6875) 2021-08-17 10:03:25 -04:00
hex.js hyperchats 2021-04-23 16:20:17 -04:00
lazyImport.js Fix broken embeds in incognito 2021-07-23 00:50:02 +08:00
lbryURI.js integrate all the things 2021-10-15 23:49:41 -04:00
merge-claim.js integrate all the things 2021-10-15 23:49:41 -04:00
number.js show total balance on wallet page/header 2021-01-22 11:46:27 -05:00
object.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
parse-data.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
publish.js wip 2021-06-08 13:25:52 -04:00
query-params.js Recommended changes (#7089) 2021-09-16 16:00:44 -04:00
redux-utils.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
remark-lbry.js improve channel parsing for mentions maybe 2021-10-27 21:46:00 -04:00
remark-timestamp.js Fix timestamp regex error 2021-03-09 16:05:00 -05:00
saved-passwords.js mostly remove is_web (#7408) 2022-01-07 14:02:33 -05:00
search.js cut SIMPLE_SITE 2021-10-20 17:05:37 -04:00
set-operations.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
shuffle-array.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
string.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
stripe.js Chore desktop cleanup (#6896) 2021-08-17 18:34:16 -04:00
swap-json.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
sync-settings.js integrate all the things 2021-10-15 23:49:41 -04:00
throttle.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
thumbnail.js Revert accidental commit from ody repo 2021-10-11 09:43:58 +08:00
time.js Allow video sharing with start timestamp 2020-05-08 14:00:59 -04:00
transifex-upload.js integrate all the things 2021-10-15 23:49:41 -04:00
url.js integrate all the things 2021-10-15 23:49:41 -04:00
web-file-system.js Support drag-and-drop file publishing (#4170) 2020-05-25 10:27:36 -04:00
web.js rss tests 2021-08-06 17:05:36 -04:00
zoomWindow.js integrate all the things 2021-10-15 23:49:41 -04:00