Fix stuck landscape orientation in depth profile fullscreen (PRO-65) - #165
Merged
shaheinm merged 2 commits intoJun 11, 2026
Conversation
Extract shared landscapeFullscreen() modifier used by both fullscreen chart views. DepthProfileFullscreenView previously reset the orientation lock without calling setNeedsUpdateOfSupportedInterfaceOrientations(), which UIKit requires to re-query supported orientations — leaving the phone stuck in landscape after closing. Also gains the portrait snap-back and swipe-to-dismiss for parity with ReplayChartFullscreenView, which now uses the shared modifier instead of its own copy. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- requestOrientation prefers the foreground-active window scene instead of connectedScenes.first, which can be the wrong scene under iPad multitasking / Stage Manager - Swipe-to-dismiss requires the vertical translation to dominate, so a diagonal chart scrub exceeding 80pt vertically no longer dismisses Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
Second-opinion review (gpt-5.3-codex) — no blockers → addressed in latest commitShould-fixes (both addressed):
Nit (not addressed): Confirmed correct by review: orientation lock/restore + SwiftLint clean, macOS + iOS device builds green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DepthProfileFullscreenViewhad the identical stuck-orientation bug fixed for the replay chart in Add replay chart v2 with ceiling/GF overlays and fullscreen (PRO-51) #163: it resetAppDelegate.orientationLockon dismiss but never calledsetNeedsUpdateOfSupportedInterfaceOrientations(), which UIKit requires to re-query supported orientations — so the phone stayed locked in landscape after closing the fullscreen chart.landscapeFullscreen(onSwipeDismiss:)view modifier (Helpers/LandscapeFullscreenModifier.swift) and adopts it in bothDepthProfileFullscreenViewandReplayChartFullscreenView, removing the duplicated orientation-lock pattern.Closes PRO-65. Fixes #164.
Test plan
Validation
Made with Cursor