Status Update
Comments
si...@google.com <si...@google.com> #2
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
si...@google.com <si...@google.com>
so...@google.com <so...@google.com>
64...@gmail.com <64...@gmail.com> #3
gl...@gmail.com <gl...@gmail.com> #4
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
al...@gmail.com <al...@gmail.com> #5
I'm also curious the status of this feature and whether it is still on the roadmap?
so...@google.com <so...@google.com> #6
This is a tracking bug for a feature that's going to be Muhammad's main project hence reassigning.
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit aad20b6ccc65dac68c4a9b94efd75837e28fd73f
Author: Muhammad Ali Shah <muhammadalis@google.com>
Date: Tue Aug 27 13:50:27 2024
AutoSize: Create API
See design doc go/autosize
Test: Tested equals(), checked that the stepBased implementation was falling back to minFontSize = maxFontSize if minFontSize > maxFontSize and throwing IllegalArgumentExceptions with all other potential combinations of illegal arguments, checked if getFontSize() acts as intended including edge cases like when overflow always and never occurs.
Bug: 139320827
Change-Id: I3f24abe306ed832876bbfc9cb5d5a1aa3b25edb0
A compose/foundation/foundation/src/androidUnitTest/kotlin/androidx/compose/foundation/text/AutoSizeTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/AutoSize.kt
jo...@google.com <jo...@google.com> #8
Please note that the above change is part of a chain of changes. We will publish the API at a later time and provide updates on this tracking bug.
mu...@google.com <mu...@google.com>
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 786f64663f1da5efe7c98344ac7c7ad90724acbc
Author: Muhammad Ali Shah <muhammadalis@google.com>
Date: Tue Sep 03 16:08:00 2024
AutoSize: Implement ParagraphLayoutCache logic
Also add autoSize parameter to TextAnnotatedStringElement and TextAnnotatedStringNode
Test: Checked valid and invalid sequences of font sizes, different constraints, different texts, Ellipsis/Visual overflow behavior, compatibility with the em unit and behavior when minLines is greater than 1. All works as intended.
Bug: 139320827
Change-Id: If73d75ef8555132f221cdefc2242eb56228ab292
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCacheTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleNodeInvalidationTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCache.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleElement.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleNode.kt
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit 5d923a5049d9f073055745cb2d2563066cc9d996
Author: Muhammad Ali Shah <muhammadalis@google.com>
Date: Thu Sep 12 13:26:43 2024
AutoSize: Implement MultiParagraphLayoutCache logic
Test: Checked valid and invalid sequences of font sizes, different constraints, different texts, Ellipsis/Visual overflow behavior, compatibility with the em unit and behavior when minLines is greater than 1. All works as intended.
Bug: 139320827
Change-Id: I38196267ae1d2b7605c64c1741d19883747f35b2
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCacheTest.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNodeInvalidationTest.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/modifiers/MultiParagraphLayoutCache.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringElement.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringElement.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt
mu...@google.com <mu...@google.com>
lp...@google.com <lp...@google.com>
ap...@google.com <ap...@google.com> #11
Project: platform/frameworks/support
Branch: androidx-main
Author: Jossi Wolf <
Link:
Publish AutoSize Text
Expand for full commit details
Publish AutoSize Text
AutoSize is now public and sealed and does not expose any API. All methods are moved to the internal TextAutoSize, which will let us publish the API for custom AutoSize implementations in the future if needed.
Test: Existing
Bug: 139320827
Relnote: "Support for auto-sizing text. Pass an AutoSize instance (e.g. AutoSize.StepBased) to your favorite text composable (like BasicText) and see your text size adapt to the available space!"
Change-Id: Ice7e09b9cac7be10ab5e681ec57d994d50102583
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeText.kt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/AutoSizeTestUtils.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCacheTest.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCacheTest.kt
- M
compose/foundation/foundation/src/androidUnitTest/kotlin/androidx/compose/foundation/text/AutoSizeTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/AutoSize.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
- A
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/AutoSizeTextLayoutScope.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCache.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCache.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringElement.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringElement.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextAnnotatedStringNode.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleElement.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleNode.kt
Hash: 54dd40666510382dd44ed84ec92903dba3af5df8
Date: Mon Oct 14 16:43:38 2024
jo...@google.com <jo...@google.com>
eb...@netflix.com <eb...@netflix.com> #12
Hello, out of curiosity, is is something for compose 1.8 or later?
jo...@google.com <jo...@google.com> #13
This will land in 1.8, pending possible API refinements. We will comment on this issue when the change is included in a release.
pr...@google.com <pr...@google.com> #14
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha05
androidx.compose.foundation:foundation-android:1.8.0-alpha05
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha05
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha05
an...@justdice.io <an...@justdice.io> #15
I tested out androidx.compose.foundation:foundation:1.8.0-alpha05
and noticed that BasicText
with an autoSize
argument just cuts off the text with maxLines
set to 1.
On Android Views, when using android:autoSizeTextType="uniform"
and android:maxLines="1"
, the TextView
properly sizes down until the min text size is reached.
<LinearLayout
android:layout_width="15dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="2sp"
android:autoSizeMaxTextSize="14sp"
android:maxLines="1"
android:text="Test" />
</LinearLayout>
Box(Modifier.width(15.dp)) {
BasicText("Test", autoSize = AutoSize.StepBased(2.sp, 14.sp), maxLines = 1)
}
jo...@google.com <jo...@google.com> #16
Thanks for the report! Please file a new bug in this component for tracking purposes. Thank you!
an...@justdice.io <an...@justdice.io> #17
Linked issue:
Description