Page MenuHomePhabricator

[native] introduce contentDimensions prop to full screen view modal
ClosedPublic

Authored by ginsu on Oct 4 2023, 1:27 PM.
Tags
None
Referenced Files
F2903605: D9363.diff
Sat, Oct 5, 11:23 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 20, 1:40 PM
Unknown Object (File)
Fri, Sep 6, 5:50 AM
Subscribers

Details

Summary

This diff factors out the last ImageModal feature specific part out of FullScreenViewModal. This logic calculates and returns the dimensions (width + height) of an image. We will need to calculate the dimensions of User Avatars in a different way, so it makes sense that this logic should now live in just ImageModal and be passed down as a prop called contentDimensions

This is step 5 of 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 contentDimensions prop

Depends on D9362

Test Plan

confirmed that there were no regressions with the content size + navigating to ImageModal

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: atul, inka.
ginsu edited the summary of this revision. (Show Details)
ginsu requested review of this revision.Oct 4 2023, 1:45 PM
This revision is now accepted and ready to land.Oct 4 2023, 5:09 PM