[Testing] Fixed Test case failure in PR 35716 - [06/08/2026] Candidate - 3 - #36202
Merged
kubaflo merged 3 commits intoJun 29, 2026
Merged
Conversation
Contributor
|
Hey there @@TamilarasanSF4853! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
TamilarasanSF4853
temporarily deployed
to
gh-aw-agents
June 29, 2026 08:46 — with
GitHub Actions
Inactive
TamilarasanSF4853
temporarily deployed
to
gh-aw-agents
June 29, 2026 08:47 — with
GitHub Actions
Inactive
vishnumenon2684
marked this pull request as ready for review
June 29, 2026 10:14
Merged
kubaflo
added a commit
that referenced
this pull request
Jul 28, 2026
…ross platforms (#35632)" (#36887) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! > Supersedes #36883, which was branched off `main` while targeting `inflight/candidate`. That mismatch dragged in 42 unrelated `main`-only commits and produced four spurious conflicts in files that have nothing to do with `SwipeItem`. This branch is built directly on `inflight/candidate`, so it is a clean single-commit diff. ### Issue Details This reverts #35632 ("Fix SwipeItem IconImageSource color handling and rendering across platforms") from the .NET 10 servicing line. #35632 stopped auto-tinting `SwipeItem.IconImageSource` for PNG/SVG sources, so those icons now render in their own colors instead of a contrast color derived from the item background. It shipped in 10.0.90 (SR9) and is causing #36766 — an SVG icon whose fill is `#212121` now renders black on a black swipe item in dark mode, i.e. effectively invisible. The change is a reasonable direction, but it is too breaking for a servicing release: - **It removes a legibility guarantee with no replacement.** `GetTextColor()` picks white or black from background luminosity. #35632 removed that for PNG/SVG but left it in place for the item's label text, so the text is still contrast-corrected while the icon is not. - **There is no opt-in.** #23074 was labelled `proposal/open` and asked for *more configuration*; what shipped was a behavior change with none. An affected app's only options today are pinning to 10.0.80 or re-authoring every SVG per theme. - **It compounds with #36271** (also SR9), which makes `BackgroundColor` correctly follow `AppThemeBinding`. Before SR9 the stale light background accidentally preserved contrast; together the two changes produce black-on-black. - **The prior behavior was the Xamarin.Forms behavior**, not an inconsistency — Xamarin tinted every icon unconditionally on both Android ([`SwipeViewRenderer.cs#L858`](https://github.com/xamarin/Xamarin.Forms/blob/main/Xamarin.Forms.Platform.Android/Renderers/SwipeViewRenderer.cs#L858)) and iOS ([`SwipeViewRenderer.cs#L713`](https://github.com/xamarin/Xamarin.Forms/blob/main/Xamarin.Forms.Platform.iOS/Renderers/SwipeViewRenderer.cs#L713)). ### Description of Change `git revert` of c78acfe, restoring the previous behavior on all platforms: - **Android** — `SetColorFilter(GetTextColor(), SrcAtop)` applied to every drawable again - **iOS/Mac** — `AlwaysTemplate` rendering mode on every image again, with `TintColor = fontImageSource.Color ?? GetTextColor()` - **Windows** — `MapSourceAsync` back to `ToIconSource()` (`BitmapIconSource`, whose `ShowAsMonochrome` defaults to `true`); the `LoadFileIconAsync` helper is removed The `Issue23074` host-app page, shared test, `cancel_red.svg` and the `SwipeItemFontAndSvgIconsRenderCorrectly` snapshots are removed with it, and the SwipeView snapshots are restored to their pre-#35632 baselines. The revert is scoped strictly to #35632. `MapVisibility` on the Windows handler — added on `inflight/candidate` after #35632 — is untouched. **Conflict resolution note:** `TestCases.iOS.Tests/snapshots/ios/VerifyCollectionViewContentWithIconImageSwipeItem.png` conflicted because #36202 re-saved it for iOS 18 after #35632 landed. That test's swipe item has `BackgroundColor = #6A5ACD` (luminosity ≈ 0.40 → white), so with this revert `groceries.png` is tinted solid white again and the pre-#35632 baseline is the correct content. If iOS 18 CI shows drift unrelated to the tint, this one snapshot may need a re-save from the CI artifact. ### Follow-up The behavior change itself is good and should ship — just in .NET 11 rather than servicing, paired with an explicit opt-in API so users get a real migration path instead of a silent rendering change in a patch release. That is #36884, which keeps the #35632 behavior and adds `SwipeItem.IconColor`. ### Issues Fixed Fixes #36766 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb2a11ab-30ba-4020-836a-3acccb5f58cc
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR addresses the test failures that occurred in the inflight/candidate branch: #35716, and includes updates to improve rendering and test stability across platforms.
Images:
Note: The iOS 18 CI is not running on sub-branches created, hence we can't verify the changes in the current PR. Once merged, we can confirm this in the (Candidate PR - #35716)