Fixed
Status Update
Comments
si...@google.com <si...@google.com>
so...@google.com <so...@google.com>
si...@google.com <si...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
jb...@google.com <jb...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
si...@google.com <si...@google.com> #4
deleted
ap...@google.com <ap...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 9c58ad1feff754bbbdceb91c8bfc54fd9ada2917
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Mar 31 13:21:41 2022
Add benchmark to measure ellipsized text with restricted height
Bug: 168720622
Test: new bechmarks
Change-Id: Ib679c3bd05465662964e8c1d9e3cb42ff5e66585
A compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/text/TextEllipsisBenchmark.kt
A compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/text/TextWithEllipsisTestCase.kt
https://android-review.googlesource.com/2054025
Branch: androidx-main
commit 9c58ad1feff754bbbdceb91c8bfc54fd9ada2917
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Mar 31 13:21:41 2022
Add benchmark to measure ellipsized text with restricted height
Bug: 168720622
Test: new bechmarks
Change-Id: Ib679c3bd05465662964e8c1d9e3cb42ff5e66585
A compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/text/TextEllipsisBenchmark.kt
A compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/text/TextWithEllipsisTestCase.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit cb8f4b9085e9e385519fc1317300046a1f5ec825
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Apr 07 12:12:49 2022
Support ellipsis with limited height
It does so by creating the TextLayout twice: second time with the
correct maxLines based on the height.
Bechmark: go/ellipsis-with-limited-height-bechmark
Test: new tests
Bug: 168720622
Relnote: "Support ellipsis when height is limited and doesn't fit all
text lines"
Change-Id: Ie528c603d4c76c31ea71524a8381000d43d1cf42
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextDelegateIntegrationTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphPlaceholderIntegrationTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeText.kt
https://android-review.googlesource.com/2057633
Branch: androidx-main
commit cb8f4b9085e9e385519fc1317300046a1f5ec825
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Apr 07 12:12:49 2022
Support ellipsis with limited height
It does so by creating the TextLayout twice: second time with the
correct maxLines based on the height.
Bechmark: go/ellipsis-with-limited-height-bechmark
Test: new tests
Bug: 168720622
Relnote: "Support ellipsis when height is limited and doesn't fit all
text lines"
Change-Id: Ie528c603d4c76c31ea71524a8381000d43d1cf42
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextDelegateIntegrationTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphPlaceholderIntegrationTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeText.kt
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 85cdc2413200fca1ff64049bf534b89046e386ab
Author: Anastasia Soboleva <soboleva@google.com>
Date: Fri May 06 17:30:51 2022
Throw if minWidth/minHeight set to contraints of the Paragraph
Also update the documentation of the Constraints parameter of the
Paragraph/MultiParaghraph
Fixes: 229622144
Bug: 168720622
Test: N/A
Change-Id: I70ac364efd2da37bb599d44b5483e803c7368300
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
https://android-review.googlesource.com/2090028
Branch: androidx-main
commit 85cdc2413200fca1ff64049bf534b89046e386ab
Author: Anastasia Soboleva <soboleva@google.com>
Date: Fri May 06 17:30:51 2022
Throw if minWidth/minHeight set to contraints of the Paragraph
Also update the documentation of the Constraints parameter of the
Paragraph/MultiParaghraph
Fixes: 229622144
Bug: 168720622
Test: N/A
Change-Id: I70ac364efd2da37bb599d44b5483e803c7368300
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
so...@google.com <so...@google.com> #9
Open items
If calculatedMaxLines < 1
, currently we do nothing, i.e. return the original layout. Should we instead coerce calculated lines to at least 1? What will happen if we pass maxLines = 0?
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
commit bb1e72bfb09effe3250060143d6fe7e26f375b24
Author: Anastasia Soboleva <soboleva@google.com>
Date: Fri Jul 29 15:49:00 2022
Ellipsizing when height allows for 0 lines
When implementing 'ellipsis with height' we skipped the case when calculatedMaxLines was zero (which is when there's no vertical space to fit even a single line). With this change we will remeasure such a case with maxLines = 1 allowing for the first line to be ellipsized. In this case even if there's only a tiny little difference between the maxHeight and height of one line, we can show the ellipsized line.
Also changed how paragraph is drawn for Ellipsis overflow - now it will clip. This doesn't change behaviour for most cases, but it fixes the case when the height allows for less than one line.
Bug: 168720622
Test: new test in AndroidParagraphTest.kt
Test: demo -> Text -> Ellipsize
Change-Id: I92a7a5b92c729cd17bdc307ddb85fa902807339f
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextPainterTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextPainter.kt
M text/text/src/main/java/androidx/compose/ui/text/android/TextLayout.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidParagraph.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt
https://android-review.googlesource.com/2170326
Branch: androidx-main
commit bb1e72bfb09effe3250060143d6fe7e26f375b24
Author: Anastasia Soboleva <soboleva@google.com>
Date: Fri Jul 29 15:49:00 2022
Ellipsizing when height allows for 0 lines
When implementing 'ellipsis with height' we skipped the case when calculatedMaxLines was zero (which is when there's no vertical space to fit even a single line). With this change we will remeasure such a case with maxLines = 1 allowing for the first line to be ellipsized. In this case even if there's only a tiny little difference between the maxHeight and height of one line, we can show the ellipsized line.
Also changed how paragraph is drawn for Ellipsis overflow - now it will clip. This doesn't change behaviour for most cases, but it fixes the case when the height allows for less than one line.
Bug: 168720622
Test: new test in AndroidParagraphTest.kt
Test: demo -> Text -> Ellipsize
Change-Id: I92a7a5b92c729cd17bdc307ddb85fa902807339f
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextPainterTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextPainter.kt
M text/text/src/main/java/androidx/compose/ui/text/android/TextLayout.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidParagraph.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt
Description
Ellipsis only respects maxLine right now.
Ideally we should support ellipsis with height.
If not possible we should fallback to "cut the overflowing lines"