HomePhabricator
Diffusion Comm 5121a059d44a

[web] fix stretched encrypted images

Description

[web] fix stretched encrypted images

Summary:
The cause of this bug of this bug was that multimedia modal was passing the incorrect content dimensions to the full screen view modal. We were passing the dimensions state (which has an initial value of null) to the full screen modal, so when we tried to calculate the content dimensions for the full screen modal we were always returning early and not properly setting the dyanmicContentDimensions for the multimedia modal.

For the solution we actually don't want to pass in the dimensions state at all, but instead we want to pass in the initial media dimensions so that when we try and calculate the dynamic full screen dimensions of the media we can utilize the initial media dimensions to properly calculate what the dynamic dimensions of the media will be in this full screen view.

This is also what we were doing before I made this unintentional change in the refactor:
https://github.com/CommE2E/comm/blob/8ba42dce166acf4564e2baca3ad405a21d2c7fed/web/media/multimedia-modal.react.js#L164-L191

Linear task: https://linear.app/comm/issue/ENG-5685/imagemodal-on-web-stretches-images

Test Plan:
Please see the demo video below

Reviewers: bartek, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek

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

Details

Provenance
ginsuAuthored on Dec 5 2023, 1:37 PM
Reviewer
ashoat
Differential Revision
D10208: [web] fix stretched encrypted images
Parents
rCOMMf598a5573160: [lib] Remove cookie on logout
Branches
Unknown
Tags
Unknown