When encrypted images were being viewed in the full screen multimedia modal they were being stretched. This is because we were explicitly setting the width and height of the encrypted imageThe cause of this bug of this bug was that multimedia modal was passing the incorrect content dimensions to the full screen view modal. Images that weren't encrypted did not haveWe were passing the `dimensions` state (which has an explicit width/height being set sinitial value of `null`) to they were not affected. full screen modal, Based on reading D7900 the reason we were explicitly setting the width/height was so that the spinner for the image would be rendered in the centerso 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.
However, as I waFor the solution we actually don't want to pass investigating the `dimensions` state at all, I throttled my network to slow 3G and I noted that even with the explicit width/height being set the spinner was being rendered to the right of the encrypted image.
{F914552}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.
Since the encrypted image renders pretty much instantly in the full screen multimedia modal, and the only way I was able to get a good view of the spinner (for a fraction of a second) was to throttle my network and to set the playback speed of my screen recording to 0.5x, I think a pragmatic solution here would be to remove the explicit width/height styles of the encrypted images (fixes the stretching issue) and set `invisibleLoad` to true (hides the spinner).
If we think this solution is sufficient for now, I can also create a new Linear task to track bringing back the loading spinner and correctly render it in the center of the image.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
lLinear task: https://linear.app/comm/issue/ENG-5685/imagemodal-on-web-stretches-images