-
Notifications
You must be signed in to change notification settings - Fork 1.9k
LineHeight and decorations for HTML Label - fix #31202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||||||||||||||||||||||||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||||||||||||||||||||||||||
| <ContentPage | ||||||||||||||||||||||||||||
| xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||||||||||||||||||||||||||||
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||||||||||||||||||||||||||||
| xmlns:local="clr-namespace:Maui.Controls.Sample.Issues" | ||||||||||||||||||||||||||||
| x:Class="Maui.Controls.Sample.Issues.Issue22197"> | ||||||||||||||||||||||||||||
| <VerticalStackLayout> | ||||||||||||||||||||||||||||
| <Label | ||||||||||||||||||||||||||||
| TextType="Html" | ||||||||||||||||||||||||||||
| FontSize="15" | ||||||||||||||||||||||||||||
| TextDecorations="Underline" | ||||||||||||||||||||||||||||
| CharacterSpacing="5" | ||||||||||||||||||||||||||||
| Text="Etiam sodales sollicitudin diam, vel tincidunt libero eleifend id. Vestibulum vehicula congue velit, id egestas nulla pellentesque at." | ||||||||||||||||||||||||||||
| LineHeight="2"> | ||||||||||||||||||||||||||||
| </Label> | ||||||||||||||||||||||||||||
| <Label | ||||||||||||||||||||||||||||
| AutomationId="label" | ||||||||||||||||||||||||||||
| Text="HTML Text type"/> | ||||||||||||||||||||||||||||
| <Label | ||||||||||||||||||||||||||||
| TextDecorations="Underline" | ||||||||||||||||||||||||||||
| FontSize="15" | ||||||||||||||||||||||||||||
| CharacterSpacing="5" | ||||||||||||||||||||||||||||
| LineHeight="2" | ||||||||||||||||||||||||||||
| Text="Etiam sodales sollicitudin diam, vel tincidunt libero eleifend id. Vestibulum vehicula congue velit, id egestas nulla pellentesque at."/> | ||||||||||||||||||||||||||||
| <Label Text="Plain Text type"/> | ||||||||||||||||||||||||||||
| </VerticalStackLayout> | ||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would exercise the line height feature more:
Suggested change
See comment #24520 (comment)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm but this pr is not about lineHeight in this sense. It is about the line Height for HTML labels
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. I moved the comment to #31219. |
||||||||||||||||||||||||||||
| </ContentPage> | ||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| namespace Maui.Controls.Sample.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, 22197, "LineHeight with HTML Label not working")] | ||
| public partial class Issue22197 : ContentPage | ||
| { | ||
| public Issue22197() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue22197 : _IssuesUITest | ||
| { | ||
| public Issue22197(TestDevice testDevice) : base(testDevice) { } | ||
|
|
||
| public override string Issue => "LineHeight with HTML Label not working"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Label)] | ||
| public void LineHeightWithHTMLLabelShouldWork() | ||
| { | ||
| App.WaitForElement("label"); | ||
| VerifyScreenshot(); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AutomationId 'label' is too generic and could conflict with other elements. Consider using a more specific identifier like 'htmlTextTypeLabel' to ensure uniqueness across all test cases.