Skip to content

Revert "Fix SwipeItem IconImageSource color handling and rendering across platforms (#35632)" - #36887

Merged
kubaflo merged 1 commit into
inflight/candidatefrom
revert-35632-inflight
Jul 28, 2026
Merged

Revert "Fix SwipeItem IconImageSource color handling and rendering across platforms (#35632)"#36887
kubaflo merged 1 commit into
inflight/candidatefrom
revert-35632-inflight

Conversation

@kubaflo

@kubaflo kubaflo commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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 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:

Description of Change

git revert of c78acfe, restoring the previous behavior on all platforms:

  • AndroidSetColorFilter(GetTextColor(), SrcAtop) applied to every drawable again
  • iOS/MacAlwaysTemplate rendering mode on every image again, with TintColor = fontImageSource.Color ?? GetTextColor()
  • WindowsMapSourceAsync 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

…ross platforms (#35632)"

This reverts commit c78acfe38aa0b71b4bb50cdb2b28b95b1c3f5aa8.

PR #35632 removed the automatic icon tinting from SwipeItem across Android,
iOS and Windows so that image icons render with the colors defined in the
source image. While that is a reasonable end state, it is a behavior change
rather than a bug fix, and it regressed existing apps in a servicing release
(see #36766).

Reverting restores the pre-existing tinting behavior on the servicing line.
The new behavior, plus an explicit opt-in SwipeItem.IconColor API, is being
introduced for .NET 11 in #36884.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: cb2a11ab-30ba-4020-836a-3acccb5f58cc
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 28, 2026 17:01 — with GitHub Actions Inactive
@kubaflo
kubaflo merged commit cc90977 into inflight/candidate Jul 28, 2026
5 of 14 checks passed
@kubaflo
kubaflo deleted the revert-35632-inflight branch July 28, 2026 17:02
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 28, 2026 17:02 — with GitHub Actions Inactive
@github-actions github-actions Bot added this to the .NET 10 SR10 milestone Jul 28, 2026
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 28, 2026 17:04 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 28, 2026 17:06 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 28, 2026 17:06 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants