Status Update
Comments
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #2
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
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #3
see
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #4
Can you please check if this task can be finished before June, and if not remove `Jetpack Compose Major Release (May 2020)` hotlist?
(apologies if this is a double comment)
Thank you
si...@google.com <si...@google.com> #5
Please ignore last comment related to the June release. It was caused by a mistake in the query I used. Thank you.
si...@google.com <si...@google.com> #6
further postponing to category 3, since it doesn't look like we can accomplish this one. If time allows one of us will pick it up during category 2.
al...@gmail.com <al...@gmail.com> #7
out of curiousity… if this isnt immediately planned, have you considered changing he default colors at all? a couple things i noticed:
(1) i could see the choice of purple + blue clashing with a number of existing apps, and maybe there are some better defaults that could be used to at least make the colors stand out less.
(2) the defaults don’t support dark mode very well. in our app, the dark purple handles on top of a primary dark mode background has only a 2.14:1 color contrast ratio (whereas in light mode the contrast is 8.98:1)
lp...@google.com <lp...@google.com> #8
I agree with
Siyamed, if you / your team does not have time to look at this, feel free to assign to me - happy to take this over. As well as allowing changing the color, MaterialTheme
should also be configured to set a color from the theme by default so that it is correct out of the box for typicaly use cases.
si...@google.com <si...@google.com> #10
Thanks Louis.
Please keep in mind there are two main entry points: Text selection and TextField selection. as a note: In TextField it is possible that existing cursorColor defines those colors (or one of them)
si...@google.com <si...@google.com> #11
it would be best to control selection as a whole for both of them I believe, but let's discuss it. Looks like material.TextField uses errorColor and activeColor as the cursor color. let's make sure we take that into account while designing the theming (they seem to be related)
si...@google.com <si...@google.com> #12
open questions, assumptions that need verification:
- is cursorColor and selection color the same
- cursorColor is errorColor and activeColor in material.TextField, is there any relation
- Text and TextField should use a single selection color for consistency
- selection color is always the same for selection handle and selection background
- cursor color determines insertion (cursor) handle color as well (we do not have cursor handle yet)
- what the default color should be for light and dark mode
- shape of the cursor handle is not urgent, and possibly something we specifically don't want customization for the phone end user experience (similar to cursor animation)
- can there be a default color in foundation? choosing the text color, bg color etc too tricky. Using the exact text color wouldn't work since it would make text invisible.
ap...@google.com <ap...@google.com> #13
Branch: androidx-master-dev
commit 93195d42d1f079136053e33ccec6e7d5ac839dfe
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Tue Nov 17 15:20:25 2020
Adds AmbientTextSelectionColors to allow customizing the colors used for text selection
Also sets the correct Material defaults in MaterialTheme
Bug:
Bug:
Test: MaterialTextSelectionColorsScreenshotTest
Test: TextSelectionColorsScreenshotTest
Test: TextSelectionBackgroundColorTest
Relnote: "MaterialTheme now sets the correct colors for selection handles and selection background. Non-Material apps can manually use AmbientTextSelectionColors to customize the colors used for selection."
Change-Id: I1e6f4b495bdc713e162759a08ecf0a7311b26e33
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextFieldDelegateIntegrationTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDelegate.kt
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
A compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/MaterialTextSelectionColorsScreenshotTest.kt
A compose/material/material/src/commonMain/kotlin/androidx/compose/material/MaterialTextSelectionColors.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/MaterialTheme.kt
A compose/material/material/src/test/kotlin/androidx/compose/material/TextSelectionBackgroundColorTest.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/selection/SelectionHandlesTest.kt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/selection/TextSelectionColorsScreenshotTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/selection/SelectionHandles.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/selection/TextSelectionColors.kt
Description
No description yet.