Status Update
Comments
ma...@google.com <ma...@google.com>
as...@google.com <as...@google.com> #2
You can provide your own regex to By.text()
.
For example, By.text(Pattern.compile("All albums.*", Pattern.DOTALL))
should be equivalent to a multi-line startsWith.
ke...@gmail.com <ke...@gmail.com> #3
I'm probably dumb but why would it be the default and wanted behavior if not documented properly?
Every known startWith / contains function in Java/Kotlin are multiline, the javadoc says: A UI element will be considered a match if its text value starts with the substring parameter
Many people will fall into this non standard default behavior and loose tons of time trying to figure out why.
If you still consider this default is the correct one, then please document it.
as...@google.com <as...@google.com> #4
Branch: androidx-main
commit 1625e615b9aed44323029da2726a57390956e4ab
Author: Daniel Peykov <peykov@google.com>
Date: Wed Nov 02 21:46:28 2022
Support multiline text and description matching
* Fixes inconsistency between UiSelector (partial support) and
BySelector, and clarifies the case sensitivity of related methods.
* Also, reorganizes byselector_test_activity to decrease its height
which was right up to the limit on some device types.
Bug: 255787130
Test: ./gradlew :test:uiautomator:integration-tests:t:cAT
Change-Id: Ied9eff43ce4ce6f2ace2889a55b0382e71604b61
M test/uiautomator/integration-tests/testapp/src/androidTest/java/androidx/test/uiautomator/testapp/BySelectorTest.java
M test/uiautomator/integration-tests/testapp/src/main/res/layout/byselector_test_activity.xml
M test/uiautomator/uiautomator/src/main/java/androidx/test/uiautomator/BySelector.java
M test/uiautomator/uiautomator/src/main/java/androidx/test/uiautomator/UiSelector.java
M test/uiautomator/uiautomator/src/main/java/androidx/test/uiautomator/Until.java
as...@google.com <as...@google.com> #5
Will be fixed in version 2.3.0-alpha02.
To clarify
However, looking at this again, it was inconsistent between UiSelector and BySelector, and users are unlikely to be relying on single line matching.
as...@google.com <as...@google.com> #6
Thanks a lot for the change.
I understand legacy and everything, it was just the close without discussion about proper solution (including doc that would have worked too) that was strange.
Seeing the $ in the regexp took me time, and it's good to avoid this to other users when improvement is possible.
ap...@google.com <ap...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.test.uiautomator:uiautomator:2.3.0-alpha02
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 96e2d4dc0289ef5de540198079440c7cafef5f29
Author: Andrei Shikov <ashikov@google.com>
Date: Fri Nov 03 15:37:16 2023
Account for Uncertain param state in intrinsic remember
Previous implementation of intrinsic remember is always expecting `$dirty` mask to contain different or same state for stable params. It is not always the case, however, as some restartable groups don't have the skipping code generated, which causes $dirty to never be updated.
This change accounts for it by delaying $dirty handling until we know that skipping code is going to be generated, applying fixups for intrinsic remember calls in the body.
Test: RememberIntrinsicTransformTests
Bug: 263402091
Change-Id: I7402075693806462be90e1697b8f726f1085a7a6
M compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithUnstableUnused_InInlineLambda[useFir = false].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithUnstableUnused_InInlineLambda[useFir = true].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithUnstable_InInlineLambda[useFir = false].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithUnstable_InInlineLambda[useFir = true].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithUnstable_inLambda[useFir = false].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.RememberIntrinsicTransformTests/testRememberWithUnstable_inLambda[useFir = true].txt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
al...@google.com <al...@google.com> #9
Is this in the correct Buganizer component?
Description
Jetpack Compose version: 1.4.0-alpha03
Jetpack Compose component(s) used: LazyColumn
Android Studio Build: Android Studio Electric Eel | 2022.1.1 RC 1
Kotlin version: 1.7.20
Originally, I asked this question on #compose slack channel but I was asked to report it here.
"Hi. I'm currently using Compose 1.4.0-alpha03 and I'm experiencing a weird behavior where updating bottom padding of
PaddingValue
which is then passed toLazyColumn(contentPadding = ...)
doesn't actually use the new padding inside of therememberLazyListMeasurePolicy
. The bottom padding is updated with the keyboard height everytime it appears/disappears. I'm placing two breakpoints 1. Inside of the internal funLazyList(...)
function onstate.placementAnimator = placementAnimator
line. 2. Inside of the private funrememberLazyListMeasurePolicy()
function oncheckScrollableContainerConstraints()
line. Then I'm clicking a textfield to make the keyboard appear. Once the first breakpoint is hit I first check that the bottom padding is the value I'm expecting to see (~300dp) then I place a new breakpoint inside ofPaddingValuesImpl.equals()
method. Then I resume the app,PaddingValuesImpl.equals()
is getting called a couple of times but it's called not from the place I'm expecting it to get called from. I'm expecting a call fromremember<LazyLayoutMeasureScope.(Constraints) -> MeasureResult>() { ... }
line which is inrememberLazyListMeasurePolicy()
method but it never gets called from that method. Then the second breakpoint which is oncheckScrollableContainerConstraints()
line is getting hit and when I check thecontentPadding
I'm seeing the old value (24dp). So I'm assuming that theremember<LazyLayoutMeasureScope.(Constraints) -> MeasureResult>() { ... }
doesn't work for some reason in this situation so the lambda is not re-remebered in other words it's the previous lambda that captured the previouscontentPadding
. I would really like to see what's going on insideremember<LazyLayoutMeasureScope.(Constraints) -> MeasureResult>() { ... }
but I can't place a breakpoint there because it tells me to download the source code and when I click download it can't find it. I tried installing the compose-runtime dependency but it still won't show me the source code of thatremember<LazyLayoutMeasureScope.(Constraints) -> MeasureResult>() { ... }
function. This feels like a bug in that one remember function. However I also tried to create a new project and copy some of the code to try and reproduce the issue but it works just fine there (same compose version). So I'm kinda lost now. I'm not sure I should report this on the issue tracker because I have no MRE and it also works in a new test project but doesn't work in the main project. The app I'm developing is open-source so I can provide the whole project if needed."STR:
If you do the steps described above (the one with breakpoints) you will see the bug. I'm also attaching a video where I'm doing those steps.
As I have already said above I tried to create a MRE in a new project but was surprised to see that it works there flawlessly. Also I have multiple places in this project where I'm using the same method to set the bottom padding of the LazyColumn when the keyboard shows up and it works in some of those places.