GeezerVison is showing github.com — Centering Navigation Title by JaquelineGomez · Pull Request #2200 · microsoft/fluentui-apple
Conversation
Platforms Impacted
Description of changes
In iOS 26, the containingStackView (which manages the title and subtitle) was expanding to fill the entire available space to the right of the back button, causing the text to be centered within this oversized container rather than within the navigation bar itself. This resulted in visually off-center navigation titles. This fix calculates the minimum space required by the containingStackView to properly display all its content, allowing the navigation controller to center the appropriately-sized container within the navigation bar for proper title alignment.
Verification
iPhone 16 Pro with iOS 26 and iOS 18 (no affect on iOS 18)
iPad iOS 16
Visual Verification
Pull request checklist
This PR has considered:
- Light and Dark appearances
- iOS supported versions (all major versions greater than or equal current target deployment version)
- VoiceOver and Keyboard Accessibility
- Internationalization and Right to Left layouts
- Different resolutions (1x, 2x, 3x)
- Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
- iPad Pointer interaction
- SwiftUI consumption (validation or new demo scenarios needed)
- Objective-C exposure (provide it only if needed)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
just double checking, after initial setup, do we ever do a layout change that would require a call to invalidateIntrinsicContentSize
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
nit: can we rename pr title
|
JaquelineGomez reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
just double checking, after initial setup, do we ever do a layout change that would require a call to invalidateIntrinsicContentSize
The navigation title is not being changed meaning the size does not change, so no.
Also tested with rotating the device and it still has the title centered correctly.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|