# compose

Jacob Ras

11/19/2023, 12:27 AM
(Multi-line) text editing on Compose is quite a mess since version 1.4 (at least on Android 🤖). I've been doing a lot of testing (and receiving user feedback over the last months) this evening and here's what I found, for those with heavy text editing in their apps like I do. • Compose 1.4.3: cursor jumps around unexpectedly ( + composition bug ( • Compose 1.5.4: still those bugs, because they were only fixed in alpha releases below • Compose 1.6.0-alpha01: text selection handles issue ( • Compose 1.6.0-alpha02: fixes composition bug • Compose 1.6.0-alpha08: finally fixes cursor jumping around (after 4 months) • Compose 1.6-beta01 fixes text selection handles but introduces: crash when pasting text ( keyboard not re-opening after closing ( + other crashes So it seems the latest 1.6.0 alpha (08) is the most capable (least worse) version if you're okay with the visual text selection handles issue. Seeing bug fixes only appear in alpha versions has been very disappointing over the last months. Hopefully 1.6 beta 2 will be a good one 🤞🏼.

Halil Ozercan

11/19/2023, 12:52 PM
Thank you for bringing these issues up @Jacob Ras. We have received similar type of feedback about bug fixes not making it to stable dot releases, lingering in alpha cycles for long. We have been extra cautious about bringing isolated fixes, especially if high priority, to the dot releases. In the selection case, the issue is with the scope of this project. Basically compose text selection has been under major rework internally for quite some time. The culmination of this work can be seen in the latest alpha releases. However, the work is not exactly separable so the many fixes could not be cherry-picked. Also due to the nature of this rework, there may have been cases of problems being fixed and coming back up again in another alpha release. There simultaneously was also a foundational rework on text input handinling. The problems regarding that are being worked on currently.
🙌 2
cc: @Grant Toepfer
Btw, although unrelated to your feedback, can you test these scenarios with the experimental BTF2 API if it's possible. It'll help us pinpoint the root causes if they are not reproducible.

Jacob Ras

11/19/2023, 12:59 PM
Thanks @Halil Ozercan, glad to hear the priority of updating stable releases is getting attention. I've seen the massive amount of work that's being done on text (also in Text2) and am looking forward to seeing where it leads. In my use case I've built a (proprietary) WYSIWYG editor (formatting, pictures, tables et cetera) on top of LazyLists+Text. One of the hardest things is getting the focus right: moving it around, keeping the editing location in view et cetera. I'll retest my issues this week with the BTF2 API and will post the results in the tracker, good idea 💡
thank you color 1
Also, a bit offtopic perhaps, but rendering large texts is a bit confusing at times. On my Pixel 4a, I can render 100k+ chars texts. It's slow, but smooth once loaded (in Text, not TextField). While on production I see Compose crashing over 20k chars already. Probably need to do some custom measuring there, unless this is an area where Text(Field) still has room for improvement internally?

Grant Toepfer

11/20/2023, 10:35 PM
+ other crashes
If you can reproduce them, send in bugs to the issue tracker. Given the beta period we are currently in, we'll be keeping an extra keen eye out for crashes and regressions.
As for crashing on 20k chars, feel free to create a bug for that as well.
You can link them in this thread after you create them as well, that may get them looked at a little more quickly 🙂

Jacob Ras

11/21/2023, 12:40 AM
Hi @Grant Toepfer thanks! I already created issues I could reproduce or upvoted those already reported. My main concern is the bigger text crash, as users are blocked from their larger texts (sizes like 100k/200k+ apparently happen easy when writing diaries and the like). I created a small reproduction project:
👍 1