https://kotlinlang.org logo
#compose-android
Title
# compose-android
h

Helen Fu

02/26/2024, 6:22 PM
Something different: I am so happy about
BasicTextField2
. Thanks to everyone who worked on it 👏. I understand writing a text field is probably not glamorous work but the difference between this and the previous version are night and day. I can't tell you how happy I am having written an incredibly complex
VisualTransformation
for something that should have been simple previously then having to go back to
EditText
because not everything was supported.
z

Zach Klippenstein (he/him) [MOD]

02/26/2024, 6:24 PM
What were you using the visual transformation for? Are you using OutputTransformation on btf2?
h

Helen Fu

02/26/2024, 6:38 PM
I will be 😅 that's the plan. I haven't written it yet but not having to count indices seems nicer. I have used
InputTransformation
so far to capture some user input but will probably use
OutputTransformation
for styling mention text (that's what I wrote my previous
VisualTransformation
for)
z

Zach Klippenstein (he/him) [MOD]

02/26/2024, 6:39 PM
So OutputTransformation doesn’t currently support style annotations, but it’s on the roadmap
h

Helen Fu

02/26/2024, 6:40 PM
oops then maybe I jumped the gun too soon. When should we expect the style annotations?
since
TextFieldValue
takes in an
AnnotatedString
, I can probably make what I need work without
OutputTransformation
through an edit to the annotated string. Probably fine for my use case.
z

Zach Klippenstein (he/him) [MOD]

02/26/2024, 8:07 PM
BTF2 doesn’t use
TextFieldValue
,
OutputTransformation
uses the new
TextFieldBuffer
API which doesn’t support annotations yet.
🙃 1
i can’t give you a specific ETA with confidence, but it’s high on our list of things to support after the core functionality is out the door
👍 1
h

Helen Fu

02/26/2024, 8:10 PM
oof maybe I need to revert my change 😅 ooooooops
z

Zach Klippenstein (he/him) [MOD]

02/26/2024, 9:06 PM
Sorry. Since BTF never properly supported styling anyway, we didn’t think it would be a regression if btf2 didn’t right away either
h

Helen Fu

02/26/2024, 9:30 PM
BasicTextField
did support
TextFieldValue
though, so it could render stylized text, right? I'm not super worried about the support though, no need to apologize. I can always go back to using
EditText
until
BasicTextField2
is ready.
z

Zach Klippenstein (he/him) [MOD]

02/27/2024, 2:16 PM
No, it used AnnotatedStrings in the API because support was planned, but it never actually supported it
🥲 1
49 Views