Page MenuHomePhabricator

[web] Add MediaGalleryItem component
ClosedPublic

Authored by bartek on Fri, May 26, 1:17 AM.
Tags
None
Referenced Files
F560005: a3d6c8.png
Fri, May 26, 8:44 AM
F560004: 6b1ca2.png
Fri, May 26, 8:44 AM
Unknown Object (File)
Fri, May 26, 2:38 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.Fri, May 26, 1:52 AM
atul requested changes to this revision.Fri, May 26, 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.Fri, May 26, 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.Tue, May 30, 9:31 AM
This revision was automatically updated to reflect the committed changes.