Skip to content

Implement orientation forwarding#402

Merged
MaatheusGois merged 4 commits into
DebugSwift:mainfrom
DominatorVbN:feature/orientation_forwarding
Jul 13, 2026
Merged

Implement orientation forwarding#402
MaatheusGois merged 4 commits into
DebugSwift:mainfrom
DominatorVbN:feature/orientation_forwarding

Conversation

@DominatorVbN

@DominatorVbN DominatorVbN commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request introduces a new OrientationForwardingNavigationController to ensure that custom windows in the app (such as measurement and debug windows) properly forward orientation and rotation behaviors to match the main app's root view controller. The new navigation controller replaces standard UINavigationController instances in relevant window managers.

Orientation Handling Improvements:

  • Added a new OrientationForwardingNavigationController class that overrides rotation and orientation properties to forward them from the app's root view controller, ensuring consistent interface orientation across custom windows.

Integration into Window Managers:

  • Updated MeasurementWindowManager to use OrientationForwardingNavigationController instead of UINavigationController for its measurement window.
  • Updated WindowManager to use OrientationForwardingNavigationController instead of UINavigationController for its alert-level window.

Type of change

  • Fix
  • Feature
  • Refactor
  • Docs
  • CI/CD

Test plan

  • Unit tests updated
  • Manual testing completed
  • CI passing

Manual test steps

Screenshots / recordings (if applicable)

Checklist

  • I reviewed my own changes
  • I updated docs when needed
  • I considered backward compatibility

@DominatorVbN DominatorVbN force-pushed the feature/orientation_forwarding branch from dfbffe1 to 3940c8e Compare July 7, 2026 08:58
Overlay windows (CustomWindow, MeasurementWindow) now mirror the host
app's orientation constraints instead of rotating independently.

- Add OrientationForwardingNavigationController: delegates shouldAutorotate,
  supportedInterfaceOrientations, preferredInterfaceOrientationForPresentation,
  and prefersInterfaceOrientationLocked (iOS 26+) to the app's top VC
- Swizzle UIWindowScene.requestGeometryUpdate (iOS 16+) to trigger
  setNeedsUpdateOfSupportedInterfaceOrientations on DebugSwift windows
- Wire both overlay windows to use OrientationForwardingNavigationController
- Add orientationForwarding to DebugSwiftSwizzleFeature for opt-out support
@DominatorVbN DominatorVbN force-pushed the feature/orientation_forwarding branch from 3940c8e to be1abee Compare July 7, 2026 09:09
@MaatheusGois

Copy link
Copy Markdown
Member

@DominatorVbN can u review the CI?

@DominatorVbN

Copy link
Copy Markdown
Contributor Author

@MaatheusGois Please help adding run-ci label to check my fix against CI.

@DominatorVbN

Copy link
Copy Markdown
Contributor Author

There was another test failure missed by my previous commit, in FeatureBaseTests::testDebugSwiftSwizzleFeature_allCases.

My latest commit fixes that, i have verified running the the test just in case, should resolve the CI pipeline now.

@github-actions

Copy link
Copy Markdown
Messages
📖 Project coverage: 49.97%
📖 The PR added 102 and removed 3 lines. 7 file(s) changed.

ExampleTests.xctest: Coverage: 97.14

File Coverage
FeatureBaseTests.swift 92.31%

Generated by 🚫 Danger Swift against 9636c77

@MaatheusGois MaatheusGois merged commit 8862d35 into DebugSwift:main Jul 13, 2026
2 checks passed
@DominatorVbN DominatorVbN deleted the feature/orientation_forwarding branch July 14, 2026 03:05
@DominatorVbN DominatorVbN restored the feature/orientation_forwarding branch July 14, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants