Repository navigation
fix(mobile): video previews keep their fit on iOS - #32195
bartlomiejbloniarz wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Video thumbnails now receive their frame after layout so iOS preserves the intended fit. The change is limited to preview rendering and leaves loading behavior and product defaults unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
On iOS, an inline video preview is sometimes drawn zoomed in and cropped instead of letterboxed. It stays that way until the view is recreated. This happens on
main, for example in PR descriptions with portrait recordings.expo-image draws a frame object as soon as it is set, with the
contentFitthe view has at that moment. A preview frame that arrives in the same update that mounts the image view is drawn with the defaultcoverfit, even though the view asks forcontain.Change
VideoThumbnailImagekeeps its image view mounted and passes the frame only after the view's first layout. By thencontentFitis applied, so the frame is drawn with the requested fit.Related PRs
This follows #25988, which kept before/after video tables intact in PR descriptions. #32196 fixes a separate bug where previews never load on mobile; the two PRs are independent. A fix for videos keeping their own aspect ratio will follow once these merge.
Scope and approval
A small fix of a visible bug: portrait previews are shown zoomed in. It changes only
VideoThumbnailImage.Verification
vp test run src/lib/videoThumbnails.test.ts src/lib/filePreview.test.ts src/componentsinapps/mobile: passes.vp run typecheckinapps/mobile,vp lintandvp fmt --checkon the changed file: pass.mainand with this change: the same portrait recording's preview is cropped before and letterboxed after.iOS — preview of a portrait recording in a PR description
Claude Opus 5.5 in Claude Code, running in T3 Code.