lbry-desktop/ui/modal
infinite-persistence fc7edc875b
ChannelThumbnail improvements
- [x] (6332) The IntersectionObserver method of lazy-loading loads cached images visibly late on slower devices. Previously, it was also showing the "broken image" icon briefly, which we mended by placing a dummy transparent image as the initial src.
  - Reverted that ugly transparent image fix.
  - Use the browser's built-in `loading="lazy"` instead. Sorry, Safari.

- [x] Size-optimization did not take "device pixel ratio" into account.
  - When resizing an image through the CDN, we can't just take the dimensions of the tag in pixels directly -- we need to take zooming into account, otherwise the image ends up blurry.
  - Previously, we quickly disabled optimization for the channel avatar in the Channel Page because of this. Now that we know the root-cause, the change was reverted and we now go through the CDN with appropriate sizes. This also improves our Web Vital scores.

- [x] Size-optimization wasn't really implemented for all ChannelThumbnail instances.
  - The CDN-optimized size was hardcoded to the largest instance, so small images like sidebar thumbnails are still loading images that are unnecessarily larger.
  - There's a little-bit of hardcoding of values from CSS here, but I think it's a ok compromise (not something we change often). It also doesn't need to be exact -- the "device pixel ratio" calculate will ensure it's slightly larger than what we need.

- [x] Set `width` and `height` of `<img>` to improve CLS.
  - Addresses Ligthhouse complaints, although technically the shifting was addressed at the `ClaimPreviewTile` level (sub-container dimensions are well defined).
  - Notes: the values don't need to be the final CSS-adjusted sizes. It just needs to be in the right aspect ratio to help the browser pre-allocate space to avoid shifts.

- [x] Add option to disable lazy-load Channel Thumbnails
  - The guidelines mentioned that items that are already in the viewport should not enable `loading="lazy"`.
  - We have a few areas where it doesn't make sense to lazy-load (e.g. thumbnail in Header, channel selector dropdown, publish preview, etc.).
2021-07-05 16:04:10 +08:00
..
modalAffirmPurchase refactor floatingUri to allow inline players in comments/markdown 2020-10-21 15:29:29 -04:00
modalAutoGenerateThumbnail Use sentence case for all card titles 2020-09-29 17:12:32 -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
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 all settings constants come from redux 2020-07-27 11:53:14 -04:00
modalConfirmThumbnailUpload hack together a thumbnail message on the channel page 2020-11-19 13:33:37 -05:00
modalConfirmTransaction allow sending directly to a channel or content address (#5990) 2021-05-20 15:30:40 -04: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 large claim-grid header text + optional icon 2020-09-29 17:12:32 -04:00
modalFileTimeout Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalFirstReward copy changes 2020-09-29 17:12:32 -04:00
modalFirstSubscription Sign In => Log in 2020-09-29 17:12:32 -04:00
modalImageUpload style pass for channel edit 2020-07-01 22:04:23 -04:00
modalIncompatibleDaemon Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalMassTipUnlock mass claim tips 2021-02-05 16:55:06 -05: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 review changes 2021-04-05 13:26:52 -04:00
modalPublishPreview ChannelThumbnail improvements 2021-07-05 16:04:10 +08:00
modalRemoveBtcSwapAddress CoinSwap: websocket + multi-coin 2021-04-13 14:02:25 -04:00
modalRemoveCollection Fix remaining "Collection" strings to "List" 2021-06-18 22:31:10 +08:00
modalRemoveFile new lbc icon 2020-09-29 17:12:32 -04:00
modalRevokeClaim Fix repost deletion 2021-06-23 15:21:49 -04:00
modalRewardCode new lbc icon 2020-09-29 17:12:32 -04:00
modalRouter ~ Initial Code Split (#6228) 2021-06-25 16:02:45 +08:00
modalSendTip tip/support marriage 2020-06-15 10:50:01 -04:00
modalSetReferrer Use sentence case for all card titles 2020-09-29 17:12:32 -04: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 Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalSyncEnable fix sync clean wallet bug 2020-09-21 14:11:25 -04:00
modalTransactionFailed Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalUpgrade Fetch and display last release changes from GitHub in modal upgrade & modal auto update downloaded 2021-02-09 11:04:03 -05:00
modalViewImage Zoomable image viewer in Markdown (posts and comments) 2021-01-27 10:06:31 -05:00
modalWalletDecrypt Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalWalletEncrypt theme orginization and cleanup 2021-04-30 15:05:58 -04:00
modalWalletUnlock Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modalYoutubeWelcome Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
modal.jsx collapsable sidebar initial commit 2020-08-11 17:04:14 -04:00