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