Page MenuHomePhabricator

[web] Add MediaGalleryItem component
ClosedPublic

Authored by bartek on May 26 2023, 1:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 11, 4:46 PM
Unknown Object (File)
Feb 22 2024, 2:16 AM
Unknown Object (File)
Feb 21 2024, 10:36 PM
Unknown Object (File)
Feb 21 2024, 8:41 PM
Unknown Object (File)
Feb 21 2024, 8:53 AM
Unknown Object (File)
Jan 20 2024, 10:49 AM
Unknown Object (File)
Dec 16 2023, 3:20 AM
Unknown Object (File)
Dec 16 2023, 2:28 AM
Subscribers

Details

Summary

Proper displaying of encrypted and non-encrypted thread gallery media required more code so I extracted it into a separate component.
Basically, most of the work is already done by the <EncryptedMultimedia> component so I only needed to add thumbhash and background for non-encrypted images.

Depends on D7993

Test Plan

Tested together with next diff where this is used.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.May 26 2023, 1:52 AM
atul requested changes to this revision.May 26 2023, 8:44 AM

We should use the classnames component to conditionally apply styles on web. Added some examples of usage inline.

Definitely let me know if I'm missing something + feel free to re-request review

web/modals/threads/gallery/thread-settings-media-gallery-item.react.js
34–41 ↗(On Diff #27084)

Can we use the classnames utility instead of passing things to img style prop?

There should be a lot of examples of classnames usage throughout the codebase eg:

6b1ca2.png (432×2 px, 122 KB)

a3d6c8.png (492×2 px, 141 KB)

Definitely let me know if I'm missing something here though

This revision now requires changes to proceed.May 26 2023, 8:44 AM
web/modals/threads/gallery/thread-settings-media-gallery-item.react.js
34–41 ↗(On Diff #27084)

Ok but how do I pass dynamic URL value to such classname thing?

Re-requesting because I see no way of creating a dynamic style with classnames

Re-requesting because I see no way of creating a dynamic style with classnames

Sorry for blocking stack on this, should have read through more carefully

web/modals/threads/gallery/thread-settings-media-gallery-item.react.js
34–41 ↗(On Diff #27084)

Good point... not sure what I was thinking. Sorry for blocking stack on this.

This revision is now accepted and ready to land.May 30 2023, 9:31 AM
This revision was automatically updated to reflect the committed changes.