-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Revert "ToolbarItem behavior with ImageSource iOS - fix (#28833)" #31112
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
Conversation
This reverts commit 5860fe6.
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.
Pull Request Overview
This pull request reverts a previous commit (#28833) that attempted to fix ToolbarItem behavior with ImageSource on iOS. The revert is accompanied by new test coverage to validate ToolbarItem color behavior when BarTextColor is changed, and disables a failing test on iOS/Catalyst platforms.
- Reverts changes to ToolbarItem icon rendering logic in
ToolbarItemExtensions.cs - Adds comprehensive test coverage for ToolbarItem color changes with custom BarTextColor
- Disables failing test on iOS/Catalyst to improve test stability
Reviewed Changes
Copilot reviewed 4 out of 9 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/Controls/src/Core/Compatibility/iOS/Extensions/ToolbarItemExtensions.cs |
Reverts icon rendering logic to remove AlwaysOriginal rendering mode handling |
src/Controls/tests/TestCases.HostApp/Issues/Issue30818.cs |
Adds UI test page demonstrating ToolbarItem color changes with BarTextColor |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30818.cs |
Implements automated UI test for ToolbarItem color verification |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28822.cs |
Disables failing test on iOS/Catalyst platforms with preprocessor directives |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30818.cs
Outdated
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30818.cs
Outdated
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30818.cs
Outdated
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28822.cs
Outdated
Show resolved
Hide resolved
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.
This is the blue that is now lost and is a breaking change on SR9 which is why we are reverting this
…818.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/backport to release/9.0.1xx-sr9 |
|
Started backporting to release/9.0.1xx-sr9: https://github.com/dotnet/maui/actions/runs/16888115034 |
| @@ -0,0 +1,39 @@ | |||
| #if IOS | |||
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.
I realize this is just iOS right now, but, I want to get this merged for SR10/SR9.1 and we don't currently need to generate the screen shots for the other platforms in order to merge this.
I'll do a followup PR to get the rest of the platforms baselined.
|
/backport to release/9.0.1xx-sr9 |
|
Started backporting to release/9.0.1xx-sr9: https://github.com/dotnet/maui/actions/runs/16890586009 |
|
…" (dotnet#31112) * Revert "ToolbarItem behavior with ImageSource iOS - fix (dotnet#28833)" This reverts commit 5860fe6. * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30818.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * - fix define on testing --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…" (dotnet#31112) * Revert "ToolbarItem behavior with ImageSource iOS - fix (dotnet#28833)" This reverts commit 5860fe6. * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30818.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * - fix define on testing --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…1112) * Revert "ToolbarItem behavior with ImageSource iOS - fix (#28833)" This reverts commit 5860fe6. * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30818.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * - fix define on testing --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description of Change
This reverts commit 5860fe6 on PR #28833
This pull request addresses issues with the rendering and color of
ToolbarItemicons and text on iOS, specifically when changing the navigation bar text color (BarTextColor). It introduces a new test case and updates the icon rendering logic to ensure consistent behavior. Additionally, it disables a failing test on iOS and Catalyst platforms.Improvements to ToolbarItem rendering and color handling:
UpdateIconAndStyleinToolbarItemExtensions.csto simplify and standardize image assignment for toolbar icons, ensuring icons are always rendered as provided and not altered based on their source type.New test coverage for ToolbarItem color changes:
Issue30818.cs) demonstrating and testing toolbar item icon and bar text color changes via UI buttons, with comments about a known issue and links to follow-up work.Issue30818.cs) for iOS that verifies toolbar item color changes whenBarTextColoris set to red, green, or reset, including screenshot verification for each state.Test stability improvements:
Issue28822.cs) on iOS and Catalyst platforms by wrapping its code in preprocessor directives, referencing the related GitHub issue. [1] [2]Issues Fixed
Fixes #30818