Fixed
Status Update
Comments
si...@google.com <si...@google.com>
so...@google.com <so...@google.com>
si...@google.com <si...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
jb...@google.com <jb...@google.com> #3
si...@google.com <si...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically ( b/140759491 ).
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
https://android-review.googlesource.com/1288456
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 1d8c2ebb9df3d871636c8cb98da5e6be182bffef
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Apr 07 12:03:22 2022
Add height knowledge into Paragraph
Replaced width with the Size to pass both width and height limiting the
text.
Bug: 168720622
Test: compose:ui:ui-text:cC, compose:foundation:foundation:cC
Relnote: "Paragragh and MultiParagragh are now accepting Constraints
parameter. Passing Constraints.maxHeight is a no-op at the momemt but will allow to
do some calculation in the future, like ellipsizing based on the height."
Change-Id: I6afeecb15d34ade2e82cad0381018f0736a167c1
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextDelegate.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/platform/PlatformParagraph.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphBenchmark.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphMethodBenchmark.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLayoutHelper.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphIntrinsics.android.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/CursorAnchorInfoBuilderTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTextDirectionTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphPlaceholderIntegrationTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextLayoutHelperTest.kt
M compose/ui/ui-text/src/desktopTest/kotlin/androidx/compose/ui/text/DesktopParagraphTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTextDirectionTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDelegate.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphFillBoundingBoxesTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/ui/ui-text/api/current.txt
https://android-review.googlesource.com/2057632
Branch: androidx-main
commit 1d8c2ebb9df3d871636c8cb98da5e6be182bffef
Author: Anastasia Soboleva <soboleva@google.com>
Date: Thu Apr 07 12:03:22 2022
Add height knowledge into Paragraph
Replaced width with the Size to pass both width and height limiting the
text.
Bug: 168720622
Test: compose:ui:ui-text:cC, compose:foundation:foundation:cC
Relnote: "Paragragh and MultiParagragh are now accepting Constraints
parameter. Passing Constraints.maxHeight is a no-op at the momemt but will allow to
do some calculation in the future, like ellipsizing based on the height."
Change-Id: I6afeecb15d34ade2e82cad0381018f0736a167c1
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextDelegate.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/platform/PlatformParagraph.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphBenchmark.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphMethodBenchmark.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLayoutHelper.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphIntrinsics.android.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/CursorAnchorInfoBuilderTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTextDirectionTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphPlaceholderIntegrationTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextLayoutHelperTest.kt
M compose/ui/ui-text/src/desktopTest/kotlin/androidx/compose/ui/text/DesktopParagraphTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTextDirectionTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDelegate.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphFillBoundingBoxesTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/ui/ui-text/api/current.txt
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"