Status Update
Comments
se...@google.com <se...@google.com>
ma...@google.com <ma...@google.com> #2
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
jw...@gmail.com <jw...@gmail.com> #3
Apologies, after re-investigating we've discovered that we can narrow it down to the change from alpha10 to alpha11:
kotlinCompilerExtensionVersion: 1.5.8 +
compose-bom: 2023.10.01 +
material3:1.2.0-alpha05: works
material3:1.2.0-alpha06: works
material3:1.2.0-alpha07: works
material3:1.2.0-alpha08: works
material3:1.2.0-alpha09: works
material3:1.2.0-alpha10: works
material3:1.2.0-alpha11: broken
material3:1.2.0-alpha12: broken
material3:1.2.0-beta01: broken
material3:1.2.0-rc01: broken
kotlinCompilerExtensionVersion: 1.5.8 +
compose-bom: 2024.01.00 +
material3:1.2.0-alpha10: works
material3:1.2.0-alpha11: broken
we have no explicit dependency on compose-ui, just these:
library("androidX.compose.bom", "androidx.compose", "compose-bom").version("2024.01.00")
library("androidX.compose.material3", "androidx.compose.material3", "material3").version("1.2.0-alpha10")
library("androidX.compose.uiToolingPreview", "androidx.compose.ui", "ui-tooling-preview").withoutVersion()
library("androidX.compose.debugUiTooling", "androidx.compose.ui", "ui-tooling").withoutVersion()
Attached is a screenshot of the Appium inspector for this specific screen, after expanding the DropDownMenu on alpha10. The middle column shows an XML representation of the hierarchy of the components on the screen. Note that these talk about Views, but the entire UI is built in Compose.
In tests, we refer to specific elements on the screen by looking up either:
- the xpath:
/hierarchy/android.view.ViewGroup/android.view.View/android.view.View/android.view.View/android.widget.ScrollView/android.view.View[1]
- the resource-id that we set on specific elements, like
HD
in this example.
For each of the 4 scenarios, I've added the XML from the center column. Note that for alpha11 both XMLs are the same, meaning that the elements in the DropDownMenu seem to be not visible to the Appium inspector. Also note that in the expanded state, only the DropDownMenu elements are shown. Not the elements on the screen underneath.
Lastly, I attached 2 screenshots of the Android Studio Layout inspector for the collapsed and expanded state. These were identical between alpha10 and alpha11. I see here that the FrameLayout and the ExposedDropDownMenu are at the same level, and in the alpha10 case, the Appium inspector only shows one of these as XML. Could it then be that there was a change in the ordering of these two, making it so that the first one is now always the background content? (if the Appium inspector always takes the first one, that would explain why it no longer presents/finds the DropDownMenu content)
jw...@gmail.com <jw...@gmail.com> #4
I noticed that a new bom was released today, so I tried it out:
kotlinCompilerExtensionVersion: 1.5.8 +
compose-bom: 2024.02.00 +
material3:1.2.0-alpha10: broken
material3:1.2.0-rc01: broken
kotlinCompilerExtensionVersion: 1.5.9 +
compose-bom: 2024.02.00 +
material3:1.2.0-alpha10: broken
It seems that the change in compose-ui affected the behavior, unfortunately, it now also shows the 'broken' behavior on the 1.2.0-alpha10 version, which worked before.
jw...@gmail.com <jw...@gmail.com> #5
Extra information:
- We use UiAutomator2 for our appium configuration, so its also feasible that uiAutomator2 needs to be fixed.
ja...@gopuff.com <ja...@gopuff.com> #6
Hi, we have the same issue on Appium not seeing exposed menu popup window contents but we are using Material2 version of the exposed APIs:
import androidx.compose.material.ExposedDropdownMenuBox
Additionally we noticed the regression affected also the window focus. Before it broke, you could open the exposed popup window and it would be taking key events in and you could navigate thorugh the DropdownMenuItem
s but after it broke, the focus stays on the screen beneath the popup window.
I hope this helps to narrow down the issue root.
ge...@gmail.com <ge...@gmail.com> #7
Given this is the broken popup window focus, can we give it a higher priority, please?
co...@google.com <co...@google.com> #8
Commenter #6, could you please share what version of Material 2 / compose-bom you are using?
ja...@gopuff.com <ja...@gopuff.com> #9
| Re
We bumped our Compose dependency BOM from 2023.10.01
to 2024.02.00
and then got hit with this regression.
implementation(platform("androidx.compose:compose-bom:${Versions.COMPOSE_BOM}"))
api("androidx.compose.ui:ui")
api("androidx.compose.foundation:foundation")
api("androidx.compose.material:material")
api("androidx.compose.ui:ui-tooling-preview")
api("androidx.compose.material:material-icons-extended")
api("androidx.compose.material3:material3")
api("androidx.compose.runtime:runtime-livedata")
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit e423a650b6b286c120be06f6c905d114403d98ab
Author: Max Alfonso-Ying <maxying@google.com>
Date: Mon Feb 26 21:17:16 2024
Fix EDM flags when TalkBack is off
Follow-up to aosp/2816835. That CL changed the flags to
support when TalkBack was turned on, but accidentally
changed the default when TalkBack was off. This CL
corrects that mistake.
This is only needed for a 1.2.0 cherrypick. EDM will no
longer use this custom popup in 1.3.0 after aosp/2974232.
Test: manual testing with TalkBack turned on and off
Fixes:
Change-Id: Iabcf320c0fa1762463ce2fe2f38bae7ea73fcec1
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/internal/ExposedDropdownMenuPopup.android.kt
ja...@gopuff.com <ja...@gopuff.com> #11
This is only needed for a 1.2.0 cherrypick.
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/internal/ExposedDropdownMenuPopup.android.kt
Commenter
Will this be fixed also for Material2 i.e. androidx.compose.material:material:1.6.2
?
ma...@google.com <ma...@google.com> #12
ja...@gopuff.com <ja...@gopuff.com> #13
What Compose [BOM] version can we expect the fix for M2 and M3 in?
ap...@google.com <ap...@google.com> #14
Branch: androidx-main
commit b3e6ebe4229e10fa0711277b139316d3e6c0e0ed
Author: Max Alfonso-Ying <maxying@google.com>
Date: Tue Feb 27 16:14:27 2024
Revert "Focus EDM popup when opened when TalkBack is on"
This revert is for M2 only. M3 has a fix-forward in
aosp/2977881.
This reverts commit 6d0af84f14057929daa80a4fd8325c258295992c.
Reason for revert: Accidentally changed focusability of popup
when TalkBack is off.
Bug:
Test: manually with TalkBack both on and off
Change-Id: I03e9fb02e232b9626a37db90b1a3ccffb73c2736
M compose/material/material/src/androidMain/kotlin/androidx/compose/material/internal/ExposedDropdownMenuPopup.android.kt
ma...@google.com <ma...@google.com> #15
androidx.compose.material:material:1.6.3
and androidx.compose.material3:material3:1.2.1
. A new BOM should be available when this happens.
ja...@gopuff.com <ja...@gopuff.com> #16
Thank you! That sounds awesome.
ap...@google.com <ap...@google.com> #17
Branch: androidx-main
commit 3170fdd82ffa9cd96883e9446d8f2d0e8b118787
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Feb 22 18:48:18 2024
Add customization parameters to EDM
Most notably, EDM focusability is now customizable.
Also cleaned up some doc wording.
Test: Updated unit tests
Bug:
Fixes:
Relnote: "ExposedDropdownMenu is now implemented using Popup. The
behavior should be the same except focusable menus with editible
text fields may be dismissed when typing on the keyboard."
Relnote: "Added parameters to customize ExposedDropdownMenu.
In particular, menus now have a `focusable` parameter
(default `true`) that should be set to `false` when working
with editable text fields."
Change-Id: I4184c21ee9f6ac3a5dcffceb1014b3e4b26eccb9
M compose/material3/material3/api/current.txt
M compose/material3/material3/api/restricted_current.txt
M compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/ExposedDropdownMenuSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ExposedDropdownMenuTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ExposedDropdownMenu.android.kt
na...@google.com <na...@google.com> #18
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.6.3
androidx.compose.material:material-android:1.6.3
androidx.compose.material:material-desktop:1.6.3
androidx.compose.material:material:1.7.0-alpha04
androidx.compose.material:material-android:1.7.0-alpha04
androidx.compose.material:material-desktop:1.7.0-alpha04
androidx.compose.material3:material3:1.2.1
androidx.compose.material3:material3-android:1.2.1
androidx.compose.material3:material3-desktop:1.2.1
androidx.compose.material3:material3:1.3.0-alpha02
androidx.compose.material3:material3-android:1.3.0-alpha02
androidx.compose.material3:material3-desktop:1.3.0-alpha02
pr...@google.com <pr...@google.com> #19
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.3.0-alpha03
androidx.compose.material3:material3-android:1.3.0-alpha03
androidx.compose.material3:material3-desktop:1.3.0-alpha03
Description
Versions
Kotlin Compiler extension: 1.5.8
Jetpack Compose bom version: 2024.01.00
androidx.compose.material3:material3 version: 1.2.0-alpha06 - 1.2.0-rc01
Jetpack Compose component used: ExposedDropdownMenuBox / ExposedDropdownMenu / DropdownMenuItem
Android Studio Build: Android Studio Hedgehog | 2023.1.1 Patch 2
Kotlin version: 1.9.22
Issue
We use appium to run our instrumented tests on browserstack, which uses the accessibility functionality to find elements on the screen. Up until alpha05 this worked fine for our dropdown text field (also inside the appium layout inspector, this allowed us to see and select the specific dropdown items). To achieve this, we set the semantics modifier on the DropdownMenuItems.
After material3:1.2.0-alpha06 this changed, and the DropDownMenu was no longer selectable through appium. Seen that the changelog of alpha06 specifically mentions the DropDownMenu, maybe something was accidentally removed here?
If there was a change in how we should approach a drop-down text field after alpha06, I'd like to be referred to that documentation. :)
Note that there is no issue in normal user-use of the composable, just the automated ui tests, that rely on the accessibility functionality.
Steps to Reproduce or Code Sample to Reproduce:
Stack trace (if applicable):
Not available.