Page MenuHomePhabricator

[native] introduce children prop to FullScreenViewModal
ClosedPublic

Authored by ginsu on Oct 4 2023, 10:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 1, 9:05 PM
Unknown Object (File)
Tue, Oct 1, 9:05 PM
Unknown Object (File)
Tue, Oct 1, 9:05 PM
Unknown Object (File)
Tue, Oct 1, 9:05 PM
Unknown Object (File)
Tue, Oct 1, 9:05 PM
Unknown Object (File)
Tue, Oct 1, 9:04 PM
Unknown Object (File)
Tue, Oct 1, 8:59 PM
Unknown Object (File)
Fri, Sep 6, 11:24 PM
Subscribers

Details

Summary

Introduce children prop to FullScreenViewModal. This also factors out the rendering of Multimedia from FullScreenModal and instead we pass Multimedia in ImageModal This is step 3 in the list below

Outlined below are the steps I will take in this stack (each point here will be it's own diff):

  1. Introduce FullScreenViewModal file and move everything from the ImageModal file into here, and change what is absolutely necessary (the imports)
  2. Correct the naming inside of FullScreenViewModal
  3. Lift out rendering of <Multimedia /> in favor for a generic content child
  4. Lift save content / copy content functionality out of FullScreenViewModal and make those optional props
  5. Lift the imageDimensions function out of FullScreenViewModal and introduce a required generic contentDimesions prop

Depends on D9361

Test Plan

Confirmed that there were no regressions with the viewing an image multimedia message experience

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu published this revision for review.Oct 4 2023, 10:26 AM
ginsu planned changes to this revision.

This seems pretty difficult to review... will break down this diff further

ginsu retitled this revision from [native] introduce FullScreenViewModal to DO NOT REVIEW FOR NOW [native] introduce FullScreenViewModal .Oct 4 2023, 11:21 AM
ginsu retitled this revision from DO NOT REVIEW FOR NOW [native] introduce FullScreenViewModal to DO NOT REVIEW FOR NOW [native] introduce FullScreenViewModal.

update

ginsu retitled this revision from DO NOT REVIEW FOR NOW [native] introduce FullScreenViewModal to [native] introduce children prop to FullScreenViewModal.Oct 4 2023, 12:12 PM
ginsu edited the summary of this revision. (Show Details)
ginsu added reviewers: atul, inka.

Looks good, let's memoize ImageModal before landing

native/media/image-modal.react.js
33–37 ↗(On Diff #31645)

We should definitely memoize this

This revision is now accepted and ready to land.Oct 4 2023, 4:31 PM