Skip to content

[Net11] Revert Improve label mapping performance and ensure complete coverage including ToPlatform and subsequent property changes - #37087

Merged
kubaflo merged 1 commit into
dotnet:release/11.0.1xx-preview7from
devanathan-vaithiyanathan:revert-net11-label-per-impr
Aug 4, 2026
Merged

[Net11] Revert Improve label mapping performance and ensure complete coverage including ToPlatform and subsequent property changes#37087
kubaflo merged 1 commit into
dotnet:release/11.0.1xx-preview7from
devanathan-vaithiyanathan:revert-net11-label-per-impr

Conversation

@devanathan-vaithiyanathan

Copy link
Copy Markdown
Contributor

Issue Details

After merging PR #35892 into the .NET 11 Preview 7 branch, several UITests and device tests started failing in CI. The failures were observed across multiple test runs and were not consistently reproducible during manual verification. Based on the CI results, the failures appear to be introduced by the changes included in PR #35892.

Description of Changes

Reverted the changes introduced by PR #35892 from the .NET 11 Preview 7 branch.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37087

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37087"

@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.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Aug 4, 2026
@sheiksyedm
sheiksyedm marked this pull request as ready for review August 4, 2026 15:03
Copilot AI review requested due to automatic review settings August 4, 2026 15:03
@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.

@sheiksyedm sheiksyedm changed the title [Net11] Revert PR #35892 due to UITest and device test failures [Net11] Revert Improve label mapping performance and ensure complete coverage including ToPlatform and subsequent property changes Aug 4, 2026
@PureWeen

PureWeen commented Aug 4, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to revert the behavioral and test changes introduced by PR #35892 on release/11.0.1xx-preview7, primarily around iOS text formatting/mapper behavior (Label/Entry/Editor/SearchBar/Button) and FeatureMatrix UI tests that validate screenshot baselines.

Changes:

  • Reverts/adjusts iOS handler/platform text formatting flows (including when formatting is re-applied after text changes).
  • Updates Controls FeatureMatrix HostApp pages and Shared UI tests to align with the reverted behavior and reduce flakiness.
  • Removes prior “recreate page to verify initial mappers” tap handlers and related UI toggles used by the tests.

Reviewed changes

Copilot reviewed 40 out of 136 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Core/src/Platform/iOS/TextFieldExtensions.cs Updates Entry placeholder formatting logic (includes character-spacing application).
src/Core/src/Platform/iOS/SearchBarExtensions.cs Updates SearchBar placeholder formatting logic (includes character-spacing application).
src/Core/src/Handlers/SearchBar/SearchBarHandler.iOS.cs Adjusts iOS SearchBar text/formatting mapping behavior.
src/Core/src/Handlers/SearchBar/SearchBarHandler.cs Reorders SearchBar mapper entries.
src/Core/src/Handlers/Label/LabelHandler.iOS.cs Adjusts iOS Label text mapping to re-apply formatting on text updates.
src/Core/src/Handlers/Label/LabelHandler.cs Restructures Label mapper ordering/contents.
src/Core/src/Handlers/Entry/EntryHandler.iOS.cs Adjusts iOS Entry text mapping to re-apply formatting on text updates.
src/Core/src/Handlers/Entry/EntryHandler.cs Restructures Entry mapper ordering/priority mapper usage.
src/Core/src/Handlers/Editor/EditorHandler.iOS.cs Adjusts iOS Editor text mapping to re-apply formatting on text updates.
src/Core/src/Handlers/Editor/EditorHandler.cs Reorders Editor mapper entries.
src/Core/src/Handlers/Button/ButtonHandler.iOS.cs Adjusts iOS Button text mapping to re-apply formatting on text updates.
src/Core/src/Handlers/Button/ButtonHandler.cs Reorders Button text mapper entries.
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/Material3LabelFeatureTests.cs Updates Material3 Label FeatureMatrix UI test steps (options navigation/taps/screenshots).
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/LabelFeatureTests.cs Updates Label FeatureMatrix UI test steps (removes extra tap/screenshot sequences).
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/EntryFeatureTests.cs Updates Entry FeatureMatrix UI test steps and removes focus-clearing helper usage.
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs Updates Button FeatureMatrix UI test steps (removes extra tap/screenshot sequences).
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Label/LabelViewModel.cs Changes default Label FeatureMatrix VM state (FormattedText + LineHeight defaults).
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Label/LabelOptionsPage.xaml.cs Removes “SimpleFormattedText” checkbox handler.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Label/LabelOptionsPage.xaml Removes “SimpleFormattedText” checkbox UI.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Label/LabelControlPage.xaml.cs Removes “tap to recreate page” handler.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Label/LabelControlPage.xaml Removes tap gesture recognizer and re-indents markup.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryOptionsPage.xaml Removes a FontSize override on an alignment option button.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryControlPage.xaml.cs Removes “tap to recreate page” handler and internals usage.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryControlPage.xaml Removes MainLabel automation/tap gesture used for page recreation.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Button/ButtonControlPage.xaml.cs Removes “tap to recreate page” handler and internals usage.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Button/ButtonControlPage.xaml Removes MainLabel automation/tap gesture used for page recreation.
src/Controls/src/Core/SearchBar/SearchBar.Mapper.cs Changes TextTransform mapping to reuse MapText and removes dedicated MapTextTransform.
src/Controls/src/Core/SearchBar/SearchBar.iOS.cs Ensures MapText always triggers formatting refresh on iOS.
src/Controls/src/Core/SearchBar/SearchBar.Android.cs Removes Material3-specific MapTextTransform overload.
src/Controls/src/Core/Platform/iOS/Extensions/FormattedStringExtensions.cs Adjusts overloads/parameter ordering for ToNSAttributedString and line-break handling.
src/Controls/src/Core/Label/Label.Mapper.cs Adjusts formatted-text/text-color mapping behavior during handler connection.
src/Controls/src/Core/Label/Label.iOS.cs Ensures MapText always triggers formatting refresh on iOS.
src/Controls/src/Core/Entry/Entry.Mapper.cs Changes TextTransform mapping to reuse MapText and removes dedicated MapTextTransform.
src/Controls/src/Core/Entry/Entry.iOS.cs Ensures MapText always triggers formatting refresh on iOS.
src/Controls/src/Core/Entry/Entry.Android.cs Removes Material3-specific MapTextTransform overload.
src/Controls/src/Core/Editor/Editor.Mapper.cs Changes TextTransform mapping to reuse MapText and removes dedicated MapTextTransform.
src/Controls/src/Core/Editor/Editor.iOS.cs Always re-applies CharacterSpacing after text updates on iOS.
src/Controls/src/Core/Editor/Editor.Android.cs Removes Material3-specific MapTextTransform overload.
src/Controls/src/Core/Button/Button.Mapper.cs Changes TextTransform mapping to reuse MapText and removes dedicated MapTextTransform.
src/Controls/src/Core/Button/Button.iOS.cs Removes formatting refresh call during iOS Button MapText.
Suppressed comments (1)

src/Controls/tests/TestCases.HostApp/FeatureMatrix/Label/LabelViewModel.cs:66

  • LineHeight for Label defaults to -1 (unset). Initializing the view model field to 0 will cause the sample Label to always apply a 0 line-height multiplier via binding, which can collapse text/layout and skew feature-matrix screenshots.

Comment on lines +108 to +112
textField.AttributedPlaceholder = foregroundColor == null
? new NSAttributedString(placeholder)
: new NSAttributedString(str: placeholder, foregroundColor: foregroundColor.ToPlatform());

textField.AttributedPlaceholder = attrPlaceholder.WithCharacterSpacing(entry.CharacterSpacing) ?? attrPlaceholder;
textField.AttributedPlaceholder.WithCharacterSpacing(entry.CharacterSpacing);
Comment on lines 81 to 85
var placeholder = searchBar.Placeholder ?? string.Empty;
var placeholderColor = searchBar.PlaceholderColor is Color color ? color.ToPlatform() : ColorExtensions.PlaceholderColor;
var attributed = new NSAttributedString(str: placeholder, foregroundColor: placeholderColor);
textField.AttributedPlaceholder = attributed.WithCharacterSpacing(searchBar.CharacterSpacing) ?? attributed;
textField.AttributedPlaceholder = new NSAttributedString(str: placeholder, foregroundColor: placeholderColor);
textField.AttributedPlaceholder.WithCharacterSpacing(searchBar.CharacterSpacing);
}

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review verdict: READY TO MERGE

Compatibility baseline: whether this PR breaks behavior that worked in .NET 11 Preview 6.

After comparing PR head 7d29cfaa4ae492f47ada286a47eb249c702a2ee8 directly with Preview 6 commit/tag e7264838d83d55430b219a23cc0e5da6e8b04e9a, there are no actionable code/test correctness findings under that baseline:

  • The placeholder CharacterSpacing implementation is identical to Preview 6.
  • The direct MapFormatting platform calls are identical to Preview 6.
  • The single-pass Button/Entry/Label feature tests are identical to Preview 6.
  • The iOS FormattedString/LineBreakMode implementation is identical to Preview 6.

The earlier candidates are real behavior differences versus Preview 7 after #35892 landed on August 1, but they are improvements/coverage introduced by #35892—not behavior that worked in Preview 6. This PR restores the Preview 6 behavior as intended.

What looks right: the rollback is tightly scoped as the 136-file inverse of #35892 while preserving intervening public API modifier changes.

Prior review status: the earlier Copilot placeholder-spacing comments describe the loss relative to post-#35892 Preview 7, but do not represent Preview 6 compatibility regressions.

Methodology: 3 independent reviewers with adversarial consensus + repo domain specialist, reconciled against the explicit Preview 6 compatibility baseline.

@kubaflo
kubaflo merged commit 8a58e7c into dotnet:release/11.0.1xx-preview7 Aug 4, 2026
137 of 150 checks passed
@github-actions github-actions Bot added this to the .NET 11.0-preview7 milestone Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-label Label, Span partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android platform/ios platform/macos macOS / Mac Catalyst platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants