lbry-desktop/ui/modal
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
..
modalAffirmPurchase integrate all the things 2021-10-15 23:49:41 -04:00
modalAutoGenerateThumbnail integrate all the things 2021-10-15 23:49:41 -04:00
modalAutoUpdateDownloaded Fetch and display last release changes from GitHub in modal upgrade & modal auto update downloaded 2021-02-09 11:04:03 -05:00
modalBlockChannel integrate all the things 2021-10-15 23:49:41 -04:00
modalClaimCollectionAdd wip 2021-06-08 13:25:52 -04:00
modalCommentAcknowledgement Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalConfirmAge integrate all the things 2021-10-15 23:49:41 -04:00
modalConfirmThumbnailUpload integrate all the things 2021-10-15 23:49:41 -04:00
modalConfirmTransaction redux fixes (#7400) 2022-01-04 13:46:55 -05:00
modalDownloading Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalError bring in 'notifications' state from lbry-redux 2020-06-16 09:56:32 -04:00
modalFileSelection integrate all the things 2021-10-15 23:49:41 -04:00
modalFileTimeout integrate all the things 2021-10-15 23:49:41 -04:00
modalFirstReward copy changes 2020-09-29 17:12:32 -04:00
modalFirstSubscription cloud connect 2021-10-22 16:39:45 -04:00
modalImageUpload Thumbnail upload fixes (#6860) 2021-08-24 20:28:23 -04:00
modalIncompatibleDaemon Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalMassTipUnlock integrate all the things 2021-10-15 23:49:41 -04:00
modalMobileSearch Moderator Delegation GUI 2021-06-18 15:46:51 -04:00
modalOpenExternalResource Revert "Open the actual image when clicking on the image viewer" 2021-02-19 14:05:51 -05:00
modalPasswordUnsave Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalPhoneCollection Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalPublish mostly remove is_web (#7408) 2022-01-07 14:02:33 -05:00
modalPublishPreview strip out livestreams 2021-10-20 17:05:37 -04:00
modalRemoveBtcSwapAddress CoinSwap: websocket + multi-coin 2021-04-13 14:02:25 -04:00
modalRemoveCard integrate all the things 2021-10-15 23:49:41 -04:00
modalRemoveCollection integrate all the things 2021-10-15 23:49:41 -04:00
modalRemoveComment Add direct reacting from notifications 2021-08-28 20:48:49 +08:00
modalRemoveFile Selector refactors (#7424) 2022-01-19 20:46:01 -05:00
modalRepost Modal repost (#7341) 2021-12-12 01:03:00 -05:00
modalRevokeClaim integrate all the things 2021-10-15 23:49:41 -04:00
modalRewardCode new lbc icon 2020-09-29 17:12:32 -04:00
modalRouter Modal repost (#7341) 2021-12-12 01:03:00 -05:00
modalSendTip tip/support marriage 2020-06-15 10:50:01 -04:00
modalSetReferrer fixes restoring wallet page and removing lbry.tv references 2021-11-28 15:06:11 -05:00
modalSignOut Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalSocialShare sharing with lId, fix autoplay bump, 2021-06-10 17:47:02 -04:00
modalSupportsLiquidate integrate all the things 2021-10-15 23:49:41 -04:00
modalSyncEnable fix sync clean wallet bug 2020-09-21 14:11:25 -04:00
modalTransactionFailed copy 2021-07-19 17:39:59 -04:00
modalUpgrade Fix scrollbar in upgrade modal (#7076) 2021-09-13 11:35:26 -04:00
modalViewImage Zoomable image viewer in Markdown (posts and comments) 2021-01-27 10:06:31 -05:00
modalWalletDecrypt integrate all the things 2021-10-15 23:49:41 -04:00
modalWalletEncrypt integrate all the things 2021-10-15 23:49:41 -04:00
modalWalletUnlock integrate all the things 2021-10-15 23:49:41 -04:00
modalYoutubeWelcome cut SIMPLE_SITE 2021-10-20 17:05:37 -04:00
modal.jsx add aria-label for modal close button (X) 2021-07-13 18:23:45 -05:00