-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixed - Shell content title not rendering in Full-Screen Mode on MacCatalyst #28468
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
base: main
Are you sure you want to change the base?
Conversation
| public void ShellContentTitleNotRendering() | ||
| { | ||
| App.WaitForElement("Settings"); | ||
| App.EnterFullScreen(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are removing some system animations running the UITests on macOS, but still, the change to full screen is not something immediate. Here, we need to wait a little bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are removing some system animations running the UITests on macOS, but still, the change to full screen is not something immediate. Here, we need to wait a little bit.
I have added a 500-millisecond delay after switching to full screen. Please let me know if you have any concerns regarding this change.
| @@ -0,0 +1,41 @@ | |||
| namespace Maui.Controls.Sample.Issues | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super-nit: After #28040, you can convert this to file-scope namespace by CTRL+. in Visual Studio (I believe it's the same in VS Code).
If it is converted, then new files will use file-scope namespaces more and more as people IMO copy old files to create new code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super-nit: After #28040, you can convert this to file-scope namespace by CTRL+. in Visual Studio (I believe it's the same in VS Code).
If it is converted, then new files will use file-scope namespaces more and more as people IMO copy old files to create new code.
@MartyIX I've made the changes to the file as per your suggestion. Please let me know if you have any concerns regarding this update.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| CGRect frame = new CGRect(View.Bounds.X, headerTop, View.Bounds.Width, HeaderHeight); | ||
| _blurView.Frame = frame; | ||
| _header.ViewController.View.Frame = frame; | ||
| #if MACCATALYST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On iOS, it's not necessary, right? If, for example, the device changes orientation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On iOS, it's not necessary, right? If, for example, the device changes orientation.
Yes, On iOS it's not necessary.
| var layoutIfNeed = layout.ShouldInvalidateLayoutForBoundsChange(frame); | ||
| if (layoutIfNeed) | ||
| { | ||
| layout.InvalidateLayout(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance-wise, can you check if it is invalidated with each window resize?
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Issue Details:
ShellContent title not rendering in when maximize the window on MacCatalyst
Root Cause:
The issue was caused by a layout rendering problem when the window was maximized. When the window size changed (e.g., when maximized), some items in the UICollectionView were not displayed correctly. This occurred because the collectionview layout was not being invalidated when the size of the collection view changed, leading to improper recalculation of the collection view's item layouts, especially when resizing the window.
Description of Change:
The layout of the collection view is invalidated if there is a change in its bounds (such as size or position). When this occurs, the collection view's layout is recalculated, ensuring that its items are repositioned and arranged according to the new dimensions.
Tested the behavior in the following platforms.
Reference:
N/A
Issues Fixed:
Fixes #26864
Fixes #15057
Screenshots
399403752-4a58e5a0-4ed9-4a0b-bdd7-20e3d30e1648.mov
Screen.Recording.2025-03-14.at.11.34.40.AM.mov