Skip to content

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented May 27, 2025

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!

Description of Change

Issues Fixed

Fixes #29673

Before After
Screen.Recording.2025-05-28.at.00.57.18.mov
Screen.Recording.2025-05-28.at.00.56.12.mov

I was curious how the text would behave if we used something like:

"<b>HTML <span style=\"text-transform:uppercase\">Lorem ipsum dolor sit amet</span>, consectetur adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus</b>";

It turned out that the label property was overridden by the CSS style, which I believe is the correct and expected behavior. This applies to iOS, where the text-transform: uppercase style works as intended. However, on Android, the has no effect — the text remains unchanged.

Copilot AI review requested due to automatic review settings May 27, 2025 22:57
@kubaflo kubaflo requested a review from a team as a code owner May 27, 2025 22:57
@kubaflo kubaflo self-assigned this May 27, 2025
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label May 27, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@kubaflo kubaflo added platform/ios area-controls-label Label, Span and removed community ✨ Community Contribution labels May 27, 2025
Copy link
Contributor

Copilot AI left a 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 PR fixes an issue where the TextTransform property is not applied at runtime when TextType="Html" is set on a Label in iOS. Key changes include updating the method signature of UpdateTextHtml to accept a string parameter and ensuring that the transformed text is passed consistently in platform-specific extension calls.

  • Change UpdateTextHtml’s signature to accept a string.
  • Update call sites in the iOS extension to pass the transformed text.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Core/src/Platform/iOS/LabelExtensions.cs Updated internal method signature to accept a string instead of an ILabel instance.
src/Controls/src/Core/Platform/iOS/Extensions/LabelExtensions.cs Modified calls to UpdateTextHtml to pass the locally transformed text and simplified text assignment.
Comments suppressed due to low confidence (1)

src/Controls/src/Core/Platform/iOS/Extensions/LabelExtensions.cs:19

  • [nitpick] Passing the transformed text directly streamlines the processing. Confirm that no additional in-method transformations are expected in UpdateTextHtml.
platformLabel.UpdateTextHtml(text);

}

internal static void UpdateTextHtml(this UILabel platformLabel, ILabel label)
internal static void UpdateTextHtml(this UILabel platformLabel, string text)
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

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

The method signature for UpdateTextHtml has been updated to take a string instead of an ILabel. Please ensure that all internal calls pass the correctly transformed text to avoid inconsistencies.

Copilot uses AI. Check for mistakes.
@kubaflo kubaflo changed the title [iOS] TextTransform Property Does Not Apply at Runtime When TextType="Html" Is Set on Label - fix [iOS, Android] TextTransform Property Does Not Apply at Runtime When TextType="Html" Is Set on Label - fix May 27, 2025
@mattleibow
Copy link
Member

mattleibow commented May 27, 2025

FYI #29685

Nothing actionable here, just cross-linking.

@kubaflo kubaflo changed the title [iOS, Android] TextTransform Property Does Not Apply at Runtime When TextType="Html" Is Set on Label - fix [iOS, Android, Windows] TextTransform Property Does Not Apply at Runtime When TextType="Html" Is Set on Label - fix May 27, 2025
Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Looks good.

This probably can do with just a device test as there is not a feature in the OS so the actual text is different.

Just a nit on the public method looking like it has changed.

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

Looking good but, could include a test?

@kubaflo
Copy link
Contributor Author

kubaflo commented May 29, 2025

Looking good but, could include a test?

added

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

mattleibow
mattleibow previously approved these changes May 29, 2025
@PureWeen
Copy link
Member

@kubaflo can you rebase when you get a chance

@PureWeen PureWeen changed the base branch from main to inflight/current August 15, 2025 23:26
@PureWeen PureWeen merged commit e27ae6b into dotnet:inflight/current Aug 15, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Aug 19, 2025
kubaflo added a commit to kubaflo/maui that referenced this pull request Aug 19, 2025
Eliminates an unnecessary call to _scalingCanvas.Scale in PlatformGraphicsView. The scaling is already handled by adjusting the dirtyRect dimensions, preventing double scaling.

TextTransform Property Does Not Apply at Runtime When TextType="Html" Is Set on Label (dotnet#29700)
github-actions bot pushed a commit that referenced this pull request Aug 22, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextTransform Property Does Not Apply at Runtime When TextType="Html" Is Set on Label

4 participants