HomePhabricator
Diffusion Comm db6358f55b9f

[native] introduce contentDimensions prop to full screen view modal

Description

[native] introduce contentDimensions prop to full screen view modal

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

Reviewers: atul, inka

Reviewed By: atul

Subscribers: ashoat, tomek, wyilio

Differential Revision: https://phab.comm.dev/D9363