Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit c0cd83c30b2ac4824b416769a6bcfade2b555ff1
Author: Max Alfonso-Ying <maxying@google.com>
Date: Sat Mar 16 01:13:18 2024
Update SearchBar to use a custom layout
To support inputField becoming a slot, SearchBar needs to
measure the component rather than relying on internal
knowledge of its size.
The Surface that used to wrap the entire layout has been
changed to a child of the Layout to simplify calculations.
This also means we can directly calculate insets/paddings
in the layout lambda rather than relying on modifiers.
Also fixes a predictive back bug for RTL.
Bug: b/326627700
Test: unit tests and screenshots still pass
Change-Id: If036829758665c3c2bda4582caa2ebc4007cd7c6
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarScreenshotTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/SearchBar.android.kt
https://android-review.googlesource.com/3006009
Branch: androidx-main
commit c0cd83c30b2ac4824b416769a6bcfade2b555ff1
Author: Max Alfonso-Ying <maxying@google.com>
Date: Sat Mar 16 01:13:18 2024
Update SearchBar to use a custom layout
To support inputField becoming a slot, SearchBar needs to
measure the component rather than relying on internal
knowledge of its size.
The Surface that used to wrap the entire layout has been
changed to a child of the Layout to simplify calculations.
This also means we can directly calculate insets/paddings
in the layout lambda rather than relying on modifiers.
Also fixes a predictive back bug for RTL.
Bug:
Test: unit tests and screenshots still pass
Change-Id: If036829758665c3c2bda4582caa2ebc4007cd7c6
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarScreenshotTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/SearchBar.android.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 32cc19b6dbb4ad0b051c1e961d11415eca650953
Author: Max Alfonso-Ying <maxying@google.com>
Date: Fri Mar 15 23:00:07 2024
Change SearchBarInternal to take input field as a slot
The eventual goal is to bubble up this slot to SearchBar
and DockedSearchBar themselves.
Some other minor changes:
- focus clearing logic moved to SearchBarInputField
- Input field now has flexible width/height. The parent
containers still force it to be full-width.
Bug: b/326627700
Test: unit tests and screenshots still pass
Change-Id: I87a33be6228bc0f1db8d5289a978c74ed49347e2
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarScreenshotTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/SearchBar.android.kt
https://android-review.googlesource.com/3006007
Branch: androidx-main
commit 32cc19b6dbb4ad0b051c1e961d11415eca650953
Author: Max Alfonso-Ying <maxying@google.com>
Date: Fri Mar 15 23:00:07 2024
Change SearchBarInternal to take input field as a slot
The eventual goal is to bubble up this slot to SearchBar
and DockedSearchBar themselves.
Some other minor changes:
- focus clearing logic moved to SearchBarInputField
- Input field now has flexible width/height. The parent
containers still force it to be full-width.
Bug:
Test: unit tests and screenshots still pass
Change-Id: I87a33be6228bc0f1db8d5289a978c74ed49347e2
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarScreenshotTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/SearchBar.android.kt
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 040e3103bc0cfb65b085ec7401e5f4aee7b2f893
Author: Max Alfonso-Ying <maxying@google.com>
Date: Wed Mar 27 17:36:06 2024
Make SearchBar take input field as a slot
- SearchBarInputField moved into SearchBarDefaults and made public
- Deprecated SearchBarColors inputFieldColors param
- renamed "active" to "expanded" in new API to better align with spec language
Bug: b/275074248 , b/278773336
Fixes: b/326627700 , b/326314616
Relnote: "`SearchBar` and `DockedSearchBar` have new overloads that
take a text field parameter. This allows styling the text field
separately from the rest of the search bar as well as passing in
custom text fields. The text field of the current implementation
has been made available as `SearchBarDefaults.InputField`."
Test: tests updated
Change-Id: I50c73509b4a67247df7240207e7ad13d5863a7ff
M compose/material3/benchmark/src/androidTest/java/androidx/compose/material3/benchmark/SearchBarBenchmark.kt
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/SearchBarSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarScreenshotTest.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/SearchBar.android.kt
https://android-review.googlesource.com/3016901
Branch: androidx-main
commit 040e3103bc0cfb65b085ec7401e5f4aee7b2f893
Author: Max Alfonso-Ying <maxying@google.com>
Date: Wed Mar 27 17:36:06 2024
Make SearchBar take input field as a slot
- SearchBarInputField moved into SearchBarDefaults and made public
- Deprecated SearchBarColors inputFieldColors param
- renamed "active" to "expanded" in new API to better align with spec language
Bug:
Fixes:
Relnote: "`SearchBar` and `DockedSearchBar` have new overloads that
take a text field parameter. This allows styling the text field
separately from the rest of the search bar as well as passing in
custom text fields. The text field of the current implementation
has been made available as `SearchBarDefaults.InputField`."
Test: tests updated
Change-Id: I50c73509b4a67247df7240207e7ad13d5863a7ff
M compose/material3/benchmark/src/androidTest/java/androidx/compose/material3/benchmark/SearchBarBenchmark.kt
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/SearchBarSamples.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarScreenshotTest.kt
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/SearchBar.android.kt
na...@google.com <na...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.3.0-alpha05
androidx.compose.material3:material3-android:1.3.0-alpha05
androidx.compose.material3:material3-desktop:1.3.0-alpha05
Description
The
SearchBarInputField
component should also be made public when this is done.