-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 for [iOS] Use non-overridden traits in AppInfoImplementation.RequestTheme #25497
base: main
Are you sure you want to change the base?
Conversation
The fix ensures the theme updates correctly on the current page, but the main page still retains the previously requested theme, even when updating the application's current theme. @filipnavara, do you have any thoughts on this? |
I'll have to check again what is going on in the test app. That sounds like the exact behavior this was trying to fix... |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Application.Current.UserAppTheme = AppTheme.Dark; | ||
} | ||
|
||
private void OnModalPage(object sender, EventArgs e) |
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.
The EventHandler is only created for iOS and failing in the rest of the platforms.
D:\a\_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Issue23411.xaml(30,17): XamlC error XC0002: EventHandler "OnModalPage" with correct signature not found in type "Maui.Controls.Sample.Issues.Issue23411". [D:\a\_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net9.0-windows10.0.20348.0]
5 Error(s)
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.
@jsuarezruiz ,Thank you for sharing your concerns with us. We are actively working to resolve the issue and optimize the code for all platforms. We will provide you with an update on the latest fix as soon as possible.
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.
@jsuarezruiz ,Since PageSheet functionality is available only on iOS, we have modified the test cases to ensure proper functionality.Please review and let me know if there are any additional concerns.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Root Cause
While updating the requested theme, the default TrailCollection is obtained, which does not return non-overridden traits and does not take the system theme into account.
Description of Change
UIScreen.MainScreen.TraitCollection is obtained , which will return non overridden traits based on the system theme
Issues Fixed
Fixes #23411
Output Video
BeforeFix.mov
AfterFix.mov