Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes: b/307694651
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
https://android-review.googlesource.com/3046833
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes:
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit dfbfcd90a67d66d7eab8a7381e85ae9f831cea4a
Author: Matvei Malkov <malkov@google.com>
Date: Wed Mar 31 17:25:02 2021
Add experimental support for a version of Surface that handles click and make a regular Surface to block touches behind it.
Clickable Surface allows us to handle many issues at once:
1. Allows to define clicks on the Surface layout node, making a11y to be correct
2. Allows to define clicks in the single layout node without the need to transfer indication hnadling to the node below (because of the clipping inside the surface)
3. Allows for a desired default behaviour in a non-clickable Surface when we block pointer events from going under the surface. Throughout the many components it is seens like a desiged behaviour and often leads to bugs (snackbar, Drawer, modal sheet & card being norable examples of surfaces that shouldn't allow touches behind it).
To make this work properly, I refactored ModalBottomSheetLayout to work with the sheet-based swipeable (instead of content-based), since sheet is not blocking clicks.
With this one overload we solve many issues so it seems like a worthy experiment.
Relnote: BEHAVIOUR-BREAKING: Surface now consumes clicks, making clicks added via Surface(Modifier.clickable) to be a no-op. Please, use new experimental overload of Surface that accepts onClick.
Relnote: Added a new Surface overload that handles clicks as well as other clickable functionality: indication, interactionSource, enabled/disabled. It wasn't possible to use a regular non-clickable Surface with the Modifier.clickable because the Surface will not clip the ripple indication in those cases.
Test: Added new for an overload
Fixes: 183775620
Change-Id: I73e6c76ed6389040d824a5dcc82dc84dc4fea0c7
M compose/material/material/api/public_plus_experimental_1.0.0-beta08.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ModalBottomSheetTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SnackbarHostTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SurfaceTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Button.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/FloatingActionButton.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Surface.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
https://android-review.googlesource.com/1660323
Branch: androidx-main
commit dfbfcd90a67d66d7eab8a7381e85ae9f831cea4a
Author: Matvei Malkov <malkov@google.com>
Date: Wed Mar 31 17:25:02 2021
Add experimental support for a version of Surface that handles click and make a regular Surface to block touches behind it.
Clickable Surface allows us to handle many issues at once:
1. Allows to define clicks on the Surface layout node, making a11y to be correct
2. Allows to define clicks in the single layout node without the need to transfer indication hnadling to the node below (because of the clipping inside the surface)
3. Allows for a desired default behaviour in a non-clickable Surface when we block pointer events from going under the surface. Throughout the many components it is seens like a desiged behaviour and often leads to bugs (snackbar, Drawer, modal sheet & card being norable examples of surfaces that shouldn't allow touches behind it).
To make this work properly, I refactored ModalBottomSheetLayout to work with the sheet-based swipeable (instead of content-based), since sheet is not blocking clicks.
With this one overload we solve many issues so it seems like a worthy experiment.
Relnote: BEHAVIOUR-BREAKING: Surface now consumes clicks, making clicks added via Surface(Modifier.clickable) to be a no-op. Please, use new experimental overload of Surface that accepts onClick.
Relnote: Added a new Surface overload that handles clicks as well as other clickable functionality: indication, interactionSource, enabled/disabled. It wasn't possible to use a regular non-clickable Surface with the Modifier.clickable because the Surface will not clip the ripple indication in those cases.
Test: Added new for an overload
Fixes: 183775620
Change-Id: I73e6c76ed6389040d824a5dcc82dc84dc4fea0c7
M compose/material/material/api/public_plus_experimental_1.0.0-beta08.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ModalBottomSheetTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SnackbarHostTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SurfaceTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Button.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/FloatingActionButton.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Surface.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
Description
Compose version: 1.0.0-beta03
Steps to reproduce:
Demo
composableActual behavior: Box behind receives input events (we can see a ripple effect)
Expected behavior: Box behind doesn't receive input events