-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix: Support Clickable Hyperlinks in Labels with TextType HTML (iOS & Android) #27907
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
Closed
Closed
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
8561232
fix
bhavanesh2001 44a8f0f
adding snapshots
bhavanesh2001 2bd7db6
Revert "[ci] Run provisionator devdiv (#28056)" (#28079)
rmarinho 7b29dda
[create-pull-request] automated change (#28068)
github-actions[bot] 594e1d5
Impl (#28040)
MartyIX 1ef5c16
[Testing] Implement the option to change system theme on Appium (#28025)
jsuarezruiz 7cfead1
[MacCatalyst] Picker focus events (#27973)
kubaflo 9574d1a
[Testing] Resolved Shell TabBar DeviceTests CI failures on macOS (#28…
42ce89b
[Android] Fixed the ScrollbarVisibility issues (#27613)
Ahamed-Ali 0119d31
Fixed FontImageSource icon color does not change in the TabbedPage wh…
NirmalKumarYuvaraj 56cab2f
Update SkiaSharp (#26373)
mattleibow c2a9031
[iOS] Fixed ImageButton not honoring Padding value. (#26785)
NirmalKumarYuvaraj 4aabe67
Optimize (#28073)
MartyIX bd8bdf4
IsNullOrEmpty for Paint not returning true if Color(s) are not set (#…
mos379 718f306
Fix broken/unreliable UI tests (#28125)
albyrock87 a8eba91
Add test run message to device tests logs (#27993)
albyrock87 487f868
Bump Microsoft.Web.WebView2 from 1.0.2739.15 to 1.0.2903.40 (#24329)
MartyIX c42508e
[Android] [Shell] Ensure `AnimationFinished` is called when app backg…
albyrock87 9988566
[Testing] Enabling UITest Stepper actions for Maccatalyst (#28055)
LogishaSelvarajSF4525 9e5d0d9
[ci] Publish VS workload zips (#28145)
pjcollins 5cb9a87
[Testing] Fix for flaky UITests in CI that occasionally fail - 4 (#28…
HarishKumarSF4517 89b3e70
2025-3-3-docs-UiTesting.md-improvements (#28143)
BrayanKhosravian b871c3c
Improve the performance of provisioning and running of device tests (…
mattleibow 7ca7553
Start shipping WorkloadDependencies.json (#28149)
Redth da1eba0
Change iOS SetNeedsLayout propagation mechanism (#26629)
albyrock87 07386b9
Fixed the CollectionView scroll the content inside Editor when tappin…
NanthiniMahalingam 1c11de3
[android] add AOT profile for `dotnet new maui -sc` (#28172)
jonathanpeppers b10b92e
[Bindings SG] Filter out false positive Binding.Create matches (#28138)
jkurdek 42bdc83
Fix CSS Hot Reload on iOS device (#27812)
spadapet 28e278d
[test] Run Android device tests on linux (#28192)
rmarinho 2847ecc
[Testing] Enabling more UI Tests by removing platform specific condit…
TamilarasanSF4853 7b57726
[Testing] Enabling more UI Tests by removing platform specific condit…
HarishKumarSF4517 c5afea1
[Testing] Migration of Compatibility.Core platform-specific unit test…
TamilarasanSF4853 9956f41
Fix Crashing issue with keyboard scrolling iOS (#28148)
tj-devel709 5878152
Revert "Fix FlyoutPage ShouldShowToolbarButton when overridden to ret…
NirmalKumarYuvaraj 874be34
Fixed-ToolBar-Visibility-FlyoutPage (#28209)
prakashKannanSf3972 8f744e3
Use only major JDK version to install via homebrew (#28224)
Redth b157e5a
Update the version of SkiaSharp used by SVG (#28233)
mattleibow a53e4f7
[CollectionView] Crash occurs when switching CollectionView.IsVisible…
kubaflo 52f119d
improve iOS Tapgesture
bhavanesh2001 440af19
Merge branch 'dotnet:main' into fix_21328_android
bhavanesh2001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+117 KB
...sts/TestCases.Android.Tests/snapshots/android/HtmlTextLinkShouldBeClickable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions
18
src/Controls/tests/TestCases.HostApp/Issues/Issues21328.xaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <?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" | ||
| x:Class="Controls.TestCases.HostApp.Issues.Issues21328" | ||
| Title="Issues21328"> | ||
| <VerticalStackLayout VerticalOptions="Center" | ||
| HorizontalOptions="Fill" | ||
| Spacing="20"> | ||
| <Label x:Name="label" HorizontalOptions="Center" | ||
| AutomationId="HtmlLinkLabel" | ||
| TextType="Html" > | ||
| </Label> | ||
| <Label x:Name="label2" HorizontalOptions="Center" | ||
| TextType="Html" /> | ||
|
|
||
| <Button Text="Change 2nd lable text" Clicked="Button_Clicked" /> | ||
| </VerticalStackLayout> | ||
| </ContentPage> |
16 changes: 16 additions & 0 deletions
16
src/Controls/tests/TestCases.HostApp/Issues/Issues21328.xaml.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| namespace Controls.TestCases.HostApp.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, 21328, "Link in Label with TextType HTML is not clickable", PlatformAffected.iOS | PlatformAffected.Android)] | ||
| public partial class Issues21328 : ContentPage | ||
| { | ||
| public Issues21328() | ||
| { | ||
| InitializeComponent(); | ||
| label.Text = @"<a href=""https://www.example.com"">Example HTML link</a>"; | ||
| label2.Text = @"Normal Text and <a href=""https://www.example.com"">Example HTML link</a> here"; | ||
| } | ||
| private void Button_Clicked(object sender, EventArgs e) | ||
| { | ||
| label2.Text = @"Visit dotnet from <a href=""https://dotnet.microsoft.com/en-us/""> here </a>"; | ||
| } | ||
| } |
Binary file added
BIN
+25.5 KB
...trols/tests/TestCases.Mac.Tests/snapshots/mac/HtmlTextLinkShouldBeClickable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions
28
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21328.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| using System; | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Tests.Issues; | ||
|
|
||
| public class Issue21328 : _IssuesUITest | ||
| { | ||
| public Issue21328(TestDevice device) : base(device) | ||
| { | ||
| } | ||
|
|
||
| public override string Issue => "Link in Label with TextType HTML is not clickable"; | ||
|
|
||
| #if !WINDOWS | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Label)] | ||
| public void HtmlTextLinkShouldBeClickable() | ||
| { | ||
| App.WaitForElement("HtmlLinkLabel"); | ||
| App.Tap("HtmlLinkLabel"); | ||
| Thread.Sleep(3000); | ||
| VerifyScreenshot(); | ||
| } | ||
| #endif | ||
| } | ||
Binary file added
BIN
+150 KB
...trols/tests/TestCases.iOS.Tests/snapshots/ios/HtmlTextLinkShouldBeClickable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.