You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adjusts the navigation bar item and search bar placement to fix iPadOS 26 layout issues.
Any background context you want to provide
When built against the iOS 26 SDK, the search bar moves to the bottom on iOS but causes layout issues on iPadOS.
Screenshots (important for UI changes)
iPadOS Before
iPadOS After
macOS Before
macOS After
iOS Before
iOS After
PR Type
Bug fix
Description
Fixes search bar layout issues on iOS 26 SDK
Implements platform-specific navigation bar handling
Uses stacked search bar placement for iOS 26+
Preserves legacy navigation bar styling for older versions
Diagram Walkthrough
flowchart LR
A["iOS 26+ Detection"] --> B["Use titleView with imageView"]
A --> C["Set stacked search bar placement"]
D["Pre-iOS 26"] --> E["Apply tint to logo image"]
D --> F["Set leftBarButtonItem with logo"]
D --> G["Configure tint colors"]
Objective: To create a detailed and reliable record of critical system actions for security analysis and compliance.
Status: No auditing: The new navigation/title/search bar configuration adds UI state changes without any accompanying audit logging of critical actions, though this UI context may not require audit trails.
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful degradation
Status: Missing guards: New code assumes image loading succeeds and that navigation components exist without handling nil cases or providing fallback behavior.
Add a device-specific check (UIDevice.current.userInterfaceIdiom == .pad) to the existing iOS version check. This will ensure the new navigation bar layout is applied only to iPadOS, preserving the original layout on iPhones.
if #available(iOS 26.0,*){letimageView=UIImageView(image: image)
vc.navigationItem.titleView = imageView
vc.navigationItem.preferredSearchBarPlacement =.stacked
}else{letmenuIconTint= themeManager.currentPalette.menuIconTint
if menuIconTint !=.clear {
image?.applyTintEffectWithColor(menuIconTint)}...(clipped 6 lines)
Solution Walkthrough:
Before:
.introspectViewController(customize:{ vc inletimage=UIImage(named:"provnavicon",...)if #available(iOS 26.0,*){
// This block applies to both iPhone and iPad on iOS 26+
letimageView=UIImageView(image: image)
vc.navigationItem.titleView = imageView
vc.navigationItem.preferredSearchBarPlacement =.stacked
}else{
// Legacy code for older iOS versions
letprovenanceLogo=UIBarButtonItem(image: image)
vc.navigationItem.leftBarButtonItem = provenanceLogo
...}})
After:
.introspectViewController(customize:{ vc inletimage=UIImage(named:"provnavicon",...)
// Check for both iOS version and device type (idiom)
if #available(iOS 26.0,*),UIDevice.current.userInterfaceIdiom ==.pad {
// This block now only applies to iPad on iOS 26+
letimageView=UIImageView(image: image)
vc.navigationItem.titleView = imageView
vc.navigationItem.preferredSearchBarPlacement =.stacked
}else{
// Legacy code used for iPhones and older iOS versions
letprovenanceLogo=UIBarButtonItem(image: image)
vc.navigationItem.leftBarButtonItem = provenanceLogo
...}})
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies that a fix intended for iPadOS introduces a significant UI change on iPhone, and proposes a valid platform-specific check to decouple the behaviors, which is a critical design consideration.
Medium
Possible issue
Apply missing theme tint color
Move the icon tinting logic before the if #available block to ensure it's applied consistently across all iOS versions, fixing a missing tint on iOS 26+.
Why: The suggestion correctly identifies a visual bug where the navigation icon tint is not applied on iOS 26+, and the proposed fix correctly resolves this inconsistency.
Medium
General
Prevent navigation icon distortion
Set the contentMode of the UIImageView to .scaleAspectFit to prevent the navigation icon from being distorted.
Why: The suggestion improves UI robustness by setting the contentMode on the UIImageView, which is a good practice to prevent potential image distortion in the navigation bar.
Low
More
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
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.
User description
What does this PR do
This adjusts the navigation bar item and search bar placement to fix iPadOS 26 layout issues.
Any background context you want to provide
When built against the iOS 26 SDK, the search bar moves to the bottom on iOS but causes layout issues on iPadOS.
Screenshots (important for UI changes)
PR Type
Bug fix
Description
Fixes search bar layout issues on iOS 26 SDK
Implements platform-specific navigation bar handling
Uses stacked search bar placement for iOS 26+
Preserves legacy navigation bar styling for older versions
Diagram Walkthrough
File Walkthrough
SideMenuView.swift
Add iOS 26 conditional navigation bar handlingPVUI/Sources/PVSwiftUI/SideMenu/SideMenuView.swift
setup
titleViewwithUIImageViewand setspreferredSearchBarPlacementto.stackedleftBarButtonItemconfiguration