Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug: b/161809385
Bug: b/161807956
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
https://android-review.googlesource.com/1394868
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug:
Bug:
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.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