Page MenuHomePhabricator

[web] Add MediaGalleryItem component
ClosedPublic

Authored by bartek on May 26 2023, 1:17 AM.
Tags
None
Referenced Files
F3400744: D7994.id27289.diff
Mon, Dec 2, 8:39 AM
Unknown Object (File)
Wed, Nov 13, 1:55 PM
Unknown Object (File)
Wed, Nov 13, 1:55 PM
Unknown Object (File)
Wed, Nov 13, 1:55 PM
Unknown Object (File)
Wed, Nov 13, 1:53 PM
Unknown Object (File)
Oct 14 2024, 6:43 PM
Unknown Object (File)
Oct 13 2024, 5:41 PM
Unknown Object (File)
Oct 13 2024, 5:41 PM
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
No Lint Coverage
Unit
No Test Coverage

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

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

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

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.