Skip to content

[Testing] Fixed Test case failure in PR 35716 - [06/08/2026] Candidate - 3 - #36202

Merged
kubaflo merged 3 commits into
dotnet:inflight/candidatefrom
TamilarasanSF4853:candidate-fix-35716-3
Jun 29, 2026
Merged

[Testing] Fixed Test case failure in PR 35716 - [06/08/2026] Candidate - 3#36202
kubaflo merged 3 commits into
dotnet:inflight/candidatefrom
TamilarasanSF4853:candidate-fix-35716-3

Conversation

@TamilarasanSF4853

@TamilarasanSF4853 TamilarasanSF4853 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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:

  • Re-saved SliderFeatureTests, TabTitlesShouldNotBeTruncated, VerifyCollectionViewContentWithIconImageSwipeItem, VerifyRadioButtonBackgroundUpdatesFromGradientToSolidColor, ItemShouldbeScrolledbasedOnGroupHeader test images for the iOS 18 platform.

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)

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Jun 29, 2026
@dotnet-policy-service

Copy link
Copy Markdown
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.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 29, 2026
@vishnumenon2684
vishnumenon2684 marked this pull request as ready for review June 29, 2026 10:14
@sheiksyedm
sheiksyedm requested a review from kubaflo June 29, 2026 10:27
@kubaflo
kubaflo merged commit 40d91da into dotnet:inflight/candidate Jun 29, 2026
7 of 36 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jun 29, 2026
@PureWeen PureWeen mentioned this pull request Jul 7, 2026
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
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants