Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
an...@google.com <an...@google.com> #2
The recognition of links is a separate ticket that is categorized under category 3 - could have.
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com> #3
bulk comment, fyi: we have added icebox to all the tickets because it was suggested by blintz in order to prevent auto-close tickets. we want to keep our Compose tickets to remain opened.
see b/123001228#comment6
see
an...@google.com <an...@google.com> #4
temporary releasing my bugs to team, since I need to focus on conference and may not be able to work 100% for next 2 weeks
lp...@google.com <lp...@google.com> #5
Talked with Nona, in order to prioritize the quality of other features he added we will take over this feature from Nona.
lp...@google.com <lp...@google.com> #6
removed from June release since we will not be able to finish these tasks until June.
bv...@gmail.com <bv...@gmail.com> #7
ma...@google.com <ma...@google.com> #8
Any progress here?
ma...@google.com <ma...@google.com> #10
Related issue regarding styled string resources:
In particular, internationalization concerns described in
lp...@google.com <lp...@google.com> #11
If this ever does get implemented, note that it would be nice to have the cursor icon change when hovering over a link.
bv...@gmail.com <bv...@gmail.com> #12
@#8 They said it's due to be finished in June. What year is anyone's guess.
lp...@google.com <lp...@google.com> #13
Project: platform/frameworks/support
Branch: androidx-main
commit f87f07f58309f38933b32309e93a944420a185be
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Mar 28 15:06:28 2024
Implement links interactiom listeners and styling through annotation only
LinkInteractionListener is set on LinkAnnotation. Currently only has a click function but is a fun interface. In the future can be extended to support onHover or other interactions that are needed. Note that Clickable should ideally have it non-null but this wouldn't work as we need to restore it.
LinkAnnotation now takes the style, focusStyle and hoverStyle.
Test: ui:ui-text:test, ui:ui-text:cC, f:f:cC in text folder
Relnote: "LinkAnnotation now takes the state-based styling arguments and a LinkInteractionListener. Add this annotation to the AnnotatedString to get a hyperlink. By passing focusedState and/or hoveredState you can define the visual conficuration for links when they are focused and/or hovered."
Bug: 139312671
Change-Id: I81ce4350b8a1e37881000fd82f081b7afb8e0f42
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/ui/ui-text/api/api_lint.ignore
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/samples/src/main/java/androidx/compose/ui/text/samples/AnnotatedStringBuilderSamples.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AnnotatedStringFromHtmlTest.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextFieldValueTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkInteractionListener.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
https://android-review.googlesource.com/3008514
Branch: androidx-main
commit f87f07f58309f38933b32309e93a944420a185be
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Mar 28 15:06:28 2024
Implement links interactiom listeners and styling through annotation only
LinkInteractionListener is set on LinkAnnotation. Currently only has a click function but is a fun interface. In the future can be extended to support onHover or other interactions that are needed. Note that Clickable should ideally have it non-null but this wouldn't work as we need to restore it.
LinkAnnotation now takes the style, focusStyle and hoverStyle.
Test: ui:ui-text:test, ui:ui-text:cC, f:f:cC in text folder
Relnote: "LinkAnnotation now takes the state-based styling arguments and a LinkInteractionListener. Add this annotation to the AnnotatedString to get a hyperlink. By passing focusedState and/or hoveredState you can define the visual conficuration for links when they are focused and/or hovered."
Bug: 139312671
Change-Id: I81ce4350b8a1e37881000fd82f081b7afb8e0f42
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextLinkTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/ui/ui-text/api/api_lint.ignore
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/samples/src/main/java/androidx/compose/ui/text/samples/AnnotatedStringBuilderSamples.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/AnnotatedStringFromHtmlTest.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/input/TextFieldValueTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkAnnotation.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/LinkInteractionListener.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #14
Project: platform/frameworks/support
Branch: androidx-main
commit efd00b74fb310a1dc2ec3881c1539fb9a447eaef
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 03 18:16:26 2024
Add TextDefaults object to material and material3
It provides methods to construct AnnotatedString from the html string and LinkAnnotation where links will get their styling according to the Material theme
TextDefaults.Url() and TextDefaults.Clickable() composable functions that don't return Unit should normally start with lower case letter. But these are factory methods, they are upper-cased to imitate the LinkAnnotation.Url constructor.
Test: TextTest
Test: demo
Bug: 139312671
Relnote: "Added a TextDefaults object that contains methods to construct a LinkAnnotation and parse HTML-tagged string which apply MaterialTheme to the links"
Change-Id: I98532f3512d1930416f66dd195746eeeba884497
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/material/material/api/api_lint.ignore
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/build.gradle
M compose/material/material/lint-baseline.xml
A compose/material/material/samples/src/main/java/androidx/compose/material/samples/TextSamples.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/TextTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Text.kt
M compose/material3/material3/api/api_lint.ignore
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/lint-baseline.xml
A compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/TextSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/TextTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Text.kt
https://android-review.googlesource.com/3024605
Branch: androidx-main
commit efd00b74fb310a1dc2ec3881c1539fb9a447eaef
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Apr 03 18:16:26 2024
Add TextDefaults object to material and material3
It provides methods to construct AnnotatedString from the html string and LinkAnnotation where links will get their styling according to the Material theme
TextDefaults.Url() and TextDefaults.Clickable() composable functions that don't return Unit should normally start with lower case letter. But these are factory methods, they are upper-cased to imitate the LinkAnnotation.Url constructor.
Test: TextTest
Test: demo
Bug: 139312671
Relnote: "Added a TextDefaults object that contains methods to construct a LinkAnnotation and parse HTML-tagged string which apply MaterialTheme to the links"
Change-Id: I98532f3512d1930416f66dd195746eeeba884497
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/material/material/api/api_lint.ignore
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/build.gradle
M compose/material/material/lint-baseline.xml
A compose/material/material/samples/src/main/java/androidx/compose/material/samples/TextSamples.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/TextTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Text.kt
M compose/material3/material3/api/api_lint.ignore
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/lint-baseline.xml
A compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/TextSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/TextTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Text.kt
lp...@google.com <lp...@google.com> #15
Project: platform/frameworks/support
Branch: androidx-main
commit c70a4c6be82ef1bcc338b20d663b55545caebdf9
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Apr 04 14:47:32 2024
Update LinkAnnotation savers to save/restore styles
Added demo that creates a custom listener. We should eventually add some edit/replace methods to the AnnotatedString
to make things like this easier to implement.
Bug: 139312671
Test: SaversTest
Test: demo
Change-Id: I3613a30733ba87321e4cb72a3414c0f9522ad529
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
https://android-review.googlesource.com/3027704
Branch: androidx-main
commit c70a4c6be82ef1bcc338b20d663b55545caebdf9
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Apr 04 14:47:32 2024
Update LinkAnnotation savers to save/restore styles
Added demo that creates a custom listener. We should eventually add some edit/replace methods to the AnnotatedString
to make things like this easier to implement.
Bug: 139312671
Test: SaversTest
Test: demo
Change-Id: I3613a30733ba87321e4cb72a3414c0f9522ad529
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/ui/ui-text/src/androidUnitTest/kotlin/androidx/compose/ui/text/SaversTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
lp...@google.com <lp...@google.com> #16
Project: platform/frameworks/support
Branch: androidx-main
commit 703f585278dc1f9343659fd2ffa1b415e4366ba7
Author: Anastasia Soboleva <soboleva@google.com>
Date: Fri Apr 05 15:45:22 2024
Update a11y support for links in text
Fixes: 139312671
Test: demo with Talkback on
Test: AndroidAccessibilitySpannableStringTest
Change-Id: I11ef6b96dc1f791dd266e6cb5100f265ac6c2456
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/URLSpanCache.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
https://android-review.googlesource.com/3027712
Branch: androidx-main
commit 703f585278dc1f9343659fd2ffa1b415e4366ba7
Author: Anastasia Soboleva <soboleva@google.com>
Date: Fri Apr 05 15:45:22 2024
Update a11y support for links in text
Fixes: 139312671
Test: demo with Talkback on
Test: AndroidAccessibilitySpannableStringTest
Change-Id: I11ef6b96dc1f791dd266e6cb5100f265ac6c2456
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/Hyperlinks.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLinkScope.kt
M compose/ui/ui-text/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/URLSpanCache.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
jo...@gmail.com <jo...@gmail.com> #17
Comment has been deleted.
Description
Solution: use ViewConfiguration.getTapTimeout() to delay drawing the effect and ViewConfiguration.getScaledTouchSlop() to cancel the effect when the touches move.
A sample project and a screenrecord is attached.
Component used: Box, Text, Any (modifier)
Version used: 1.0.0-alpha02
Devices/Android versions reproduced on: Pixel 3A emulator API 29