Status Update
Comments
je...@google.com <je...@google.com> #2
Good catch!
Possibly relevant
je...@google.com <je...@google.com>
kl...@google.com <kl...@google.com> #3
Curious, is it intended that TimeText could have an interact-able composable? Like a Network symbol in leadingCurvedContent that shows network information when clicked?
kl...@google.com <kl...@google.com>
kl...@google.com <kl...@google.com> #4
In the last patch (going out as alpha19) we removed that, since CurvedText is not a compose-ui node anymore, but we will look into adding it back again (with better bounds).
kl...@google.com <kl...@google.com> #5
Branch: androidx-main
commit 29737ba91ffe21e7b3132693094b5484c5cecbe1
Author: Sergio Sancho <ssancho@google.com>
Date: Mon Oct 03 14:18:01 2022
Create compose-ui nodes for curved text elements.
For each curvedText/basicCurvedText we create a compose-ui node that has
as content description the text of the (basic)curved text, and we size
and place it appropiatelly. This enables talkback to work properly with
curved text elements.
Minor change to the internal API for CurvedChild.initializeMeasure
Test: Manual, with and withouth talkback. + ./gradlew :wear:compose:compose-foundation:connectedCheck
Relnote: "curveText and basicCurvedText will now have a properly sized
and placed (but empty) compose-ui node associated with them, using the text as
content description, to properly work with talkback"
Bug: 210721259
Change-Id: I7af7ced923180839eee782fe2e45a1976c7e8ab4
M wear/compose/compose-foundation/samples/src/main/java/androidx/wear/compose/foundation/samples/CurvedWorldSample.kt
M wear/compose/compose-foundation/src/commonMain/kotlin/androidx/wear/compose/foundation/CurvedLayout.kt
M wear/compose/compose-foundation/src/commonMain/kotlin/androidx/wear/compose/foundation/CurvedContainer.kt
M wear/compose/compose-foundation/src/commonMain/kotlin/androidx/wear/compose/foundation/CurvedSize.kt
M wear/compose/compose-foundation/src/commonMain/kotlin/androidx/wear/compose/foundation/BasicCurvedText.kt
M wear/compose/compose-foundation/src/commonMain/kotlin/androidx/wear/compose/foundation/CurvedPadding.kt
M wear/compose/compose-foundation/src/androidAndroidTest/kotlin/androidx/wear/compose/foundation/SpyModifier.kt
M wear/compose/compose-foundation/src/commonMain/kotlin/androidx/wear/compose/foundation/CurvedComposable.kt
M wear/compose/integration-tests/demos/src/main/java/androidx/wear/compose/integration/demos/FoundationDemos.kt
M wear/compose/compose-foundation/src/commonMain/kotlin/androidx/wear/compose/foundation/CurvedModifier.kt
ap...@google.com <ap...@google.com> #6
The following release(s) address this bug:
androidx.wear.compose:compose-foundation:1.1.0-beta01
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit f61c557f4526dfa0e33d070de9c262e788184e8a
Author: Zach Klippenstein <klippenstein@google.com>
Date: Thu Oct 20 10:33:11 2022
Defer dispatching coroutines resumed during animation callbacks in UI tests.
This is a workaround for the fact that we use an unconfined dispatcher
in UI tests (
layout passes for frames in some cases (
TestMonotonicFrameClock gets a continuation interceptor which wraps continuations with
behavior that will usually no-op, but if the continuation is resumed
while frame callbacks are running, it will defer resuming the
underlying continuation until all the frame callbacks have finished.
This matches how continuations are dispatched in non-test code, since
that code does not use an unconfined dispatcher.
In order to preserve test delay skipping, the interceptor implements
Delay and delegates it to the underlying dispatcher, just like
ApplyingContinuationInterceptor is already doing.
This CL also adds a callback that runs after each frame in
TestMonotonicFrameClock. This change was originally in aosp/2121435.
This allows us to perform measure and layout after each frame if
necessary, which aligns the measure/layout timing with production.
Bug:
Bug:
Bug:
Test: PhaseOrderingTest, TestMonotonicFrameClockTest
Relnote: "In UI tests using a Compose rule, continuations resumed during
`withFrameNanos` callbacks will not be dispatched until after all
frame callbacks have finished running. This matches the behavior of
compose when running normally. However, tests that rely on the old
behavior may fail. This should only affect code that calls
`withFrameNanos` or `withFrameMillis` directly, and has logic
outside of callback passed to those functions that may need to be
moved inside the callbacks. See the animation test changes in this
CL for examples."
Relnote: "Added optional `onPerformTraversals: (Long) -> Unit` parameter to
`TestMonotonicFrameClock` constructor and factory function to run
code after `withFrameNanos` callbacks but before resuming callers'
coroutines."
Change-Id: Idb41309445a030c91e8e4ae05daa9642b450505c
M compose/animation/animation-core/src/androidAndroidTest/kotlin/androidx/compose/animation/core/SingleValueAnimationTest.kt
M compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/AnimatedContentTest.kt
M compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/CrossfadeTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableFocusableInteractionTest.kt
M compose/test-utils/src/androidMain/kotlin/androidx/compose/testutils/AndroidComposeTestCaseRunner.android.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt
M compose/ui/ui-test-junit4/src/commonMain/kotlin/androidx/compose/ui/test/ApplyingContinuationInterceptor.kt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/PhaseOrderingTest.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/TestMonotonicFrameClockTest.kt
A compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/internal/DelayPropagatingContinuationInterceptorWrapper.kt
A compose/ui/ui-test/src/jvmMain/kotlin/androidx/compose/ui/test/FrameDeferringContinuationInterceptor.kt
M compose/ui/ui-test/src/jvmMain/kotlin/androidx/compose/ui/test/TestMonotonicFrameClock.jvm.kt
kl...@google.com <kl...@google.com> #8
Since this bug is in the test runtime, you might expect that fixing it would expose actual bugs that tests weren't catching, because they weren't able to. And it did!
- Coroutine continuations were being dispatched immediately even during frame callbacks (
,b/254115946 , aosp/2260389). This was a bug in the test runtime itself, but it's a bug that even external Compose tests would hit so it's still a production bug in a sense.b/255802670 - Intrinsics were writing a state object in applyChanges that was not getting picked up until the next frame, this was a bug in
Recomposer
(aosp/2296013). - The
ConstraintLayout
composable was triggering an additional, unnecessary recomposition whenever a helper changed ( , aosp/2319364).b/261270254
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 9f9434a17870acd76c6c692dab9ffa425d1eab04
Author: Zach Klippenstein <klippenstein@google.com>
Date: Sat Dec 03 08:00:35 2022
Fix ConstraintLayout causing extra recomposition when helper changes.
Fixes:
Bug:
Test: ConstraintLayoutTest
Relnote: "Fixed issue where ConstraintLayout always triggered an
unnecessary extra recomposition when helpers were changed."
Change-Id: Id83ada3e963b20180c324f25b6db7c53f810463f
M constraintlayout/constraintlayout-compose/src/androidAndroidTest/kotlin/androidx/constraintlayout/compose/ConstraintLayoutTest.kt
M constraintlayout/constraintlayout-compose/src/androidMain/kotlin/androidx/constraintlayout/compose/ConstraintLayout.kt
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit 0253b7d395277c6a4669cbcb1ff7bdc5583cb6c6
Author: Zach Klippenstein <klippenstein@google.com>
Date: Tue Nov 22 14:33:04 2022
Make UI tests run layout passes between frames
Checks if a local measure/layout is scheduled after execution of each
frame. With a local measure/layout I mean a layout pass for which an
Android View layout pass has not been scheduled. It is local because it
only affects composables, and not any View outside the host View.
Fixes:
Bug:
Test: AnimatedVisibilityTest (new in ui-test-junit4)
Test: PhaseOrderingTest
Test: TestRuleExecutesLayoutPassesWhenWaitingForIdleTest
Test: BasicCurvedTextTest
Test: this change is also exercised by nearly all tests
Relnote: "Android Compose UI tests will now run layout passes for each frame when
executing frames to get to idle (e.g. via `waitForIdle`). This may
affect tests that assert on individual frames of layout animations."
Change-Id: I8ea08728a395665f9ec7965579797e537b2c35e5
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/BackdropScaffoldTest.kt
M compose/ui/ui-test-junit4/build.gradle
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/ComposeUiTest.android.kt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/PhaseOrderingTest.kt
M compose/ui/ui/api/public_plus_experimental_current.txt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/TestRuleExecutesLayoutPassesWhenWaitingForIdleTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/RootForTest.kt
M wear/compose/compose-foundation/src/androidAndroidTest/kotlin/androidx/wear/compose/foundation/BasicCurvedTextTest.kt
ju...@google.com <ju...@google.com> #11
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.animation:animation:1.4.0-alpha03
androidx.compose.animation:animation-core:1.4.0-alpha03
androidx.compose.foundation:foundation:1.4.0-alpha03
androidx.compose.runtime:runtime:1.4.0-alpha03
androidx.compose.ui:ui:1.4.0-alpha03
androidx.compose.ui:ui-test:1.4.0-alpha03
androidx.compose.ui:ui-test-junit4:1.4.0-alpha03
na...@google.com <na...@google.com> #12
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.4.0-alpha04
androidx.compose.ui:ui:1.4.0-alpha04
androidx.compose.ui:ui-test:1.4.0-alpha04
androidx.compose.ui:ui-test-junit4:1.4.0-alpha04
androidx.wear.compose:compose-foundation:1.2.0-alpha02
pr...@google.com <pr...@google.com> #13
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha06
Description
When we're awaiting idleness, we forward ("pump") the clock to reach quiescence faster. But in many cases we also have to wait for measure/layout, which is still driven by the Choreographer. If we can perform a measure/layout pass ourselves when we detect that's the thing we're waiting for, we can potentially reach idleness faster.