Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix navigation bars inside of VectorHostingController. #6799

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Oct 4, 2022

When building with Xcode 13, Element iOS running on iOS 16 has had some issues with the navigation bars not behaving as expected from SwiftUI. This appears to be twofold:

  1. The .navigationBarHidden(true) modifier doesn't appear to work inside of VectorHostingController on presentation (it does however work when popping back to a screen with the modifier.
  2. Using viewWillAppear to update the navigation controller with the custom isNavigationBarHidden appears to now occur before the hosting controller has been added to the navigation controller.

This PR sets the isNavigationBarHidden on screens that weren't using it and uses this property in viewWillLayoutSubviews.

The changelog is included in CHANGES.md ready for the release branch. Fixes #6738

Splash Screen Before Splash Screen After Congratulations Before Congratulations After Create Space Before Create Space After
IMG_5C6ED1C8BA41-1 IMG_0474 IMG_0472 IMG_0475 IMG_0009 IMG_0476

@pixlwave pixlwave force-pushed the doug/fix-swiftui-navigation-bars branch from 2bf69cd to aa46a20 Compare October 4, 2022 15:05
@stefanceriu stefanceriu self-requested a review October 4, 2022 15:10
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍 ¯_(ツ)_/¯

@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Base: 10.60% // Head: 10.58% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (aa46a20) compared to base (eda5861).
Patch coverage: 72.72% of modified lines in pull request are covered.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           release/1.9.8/release    #6799      +/-   ##
=========================================================
- Coverage                  10.60%   10.58%   -0.02%     
=========================================================
  Files                       1504     1504              
  Lines                     151609   151613       +4     
  Branches                   61162    61163       +1     
=========================================================
- Hits                       16074    16053      -21     
- Misses                    134965   134991      +26     
+ Partials                     570      569       -1     
Impacted Files Coverage Δ
...rompt/Coordinator/AnalyticsPromptCoordinator.swift 0.00% <0.00%> (ø)
...Coordinator/OnboardingCelebrationCoordinator.swift 0.00% <0.00%> (ø)
...dinator/OnboardingCongratulationsCoordinator.swift 0.00% <0.00%> (ø)
...dules/Common/SwiftUI/VectorHostingController.swift 75.00% <100.00%> (+2.63%) ⬆️
...oordinator/OnboardingSplashScreenCoordinator.swift 48.64% <100.00%> (+1.42%) ⬆️
Riot/Managers/Call/CallPresenter.swift 1.08% <0.00%> (-5.14%) ⬇️
Config/CommonConfiguration.swift 85.18% <0.00%> (-2.97%) ⬇️
Riot/Modules/Application/LegacyAppDelegate.m 13.40% <0.00%> (-0.34%) ⬇️
...xKit/Controllers/MXKAuthenticationViewController.m 18.95% <0.00%> (+1.91%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Oct 4, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/4Wwwj6

@pixlwave pixlwave merged commit 9afa3dd into release/1.9.8/release Oct 4, 2022
@pixlwave pixlwave deleted the doug/fix-swiftui-navigation-bars branch October 4, 2022 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants