Zoff
12/19/2024, 2:00 PMStefan Oltmann
12/19/2024, 8:10 PMAdam Brown
12/19/2024, 9:35 PMBasicTextField
which has certain limitations I don't think are possible to overcome. (It breaks when you internally scroll the text)
I've spent a few nights in recent weeks seeing how crazy of an idea it would be to write my own replacement for BasicTextField
to overcome these limitations. And that actually has been going quite a bit better than expected.
It's maybe 80% done? I am worried about the long tail of bugs trying to get it to behave correctly on all platforms though.
I'm also reticent to plow too much time into this custom Textfield replacement as the Compose team knows this is a missing piece of the ecosystem, and has a couple items on their roadmap to eventually plug the gap.
Unfortunately their solution is probably not coming any time soon, so I'm back to either giving up on it for now, or charging forward on the BasicTextField
rewrite.
That all being said, if you, or anyone else was interested on collaborating on the rewrite, I'm actually pretty close to being feature complete. Just need help chasing down some remaining bugs relating to undo/redo history (it's pretty tricky with SpanStyles!). Feel free to DM me and I can throw up what I've got so far in a repo.Adam Brown
12/19/2024, 9:38 PMAnnotatedString
for rich content)
• Support custom Rich Span drawing (this allows us to render the traditional Spell Check red squiggle)
• Emits edit events: so if a single character is inserted, you can collect a Flow, and know exactly what change was made. This makes managing Spell Check much more efficient as you can just respell-check the single word that was changed, rather than everything. Currently neither BTF1 or BTF2 offers this.
• Undo/Redo history: This is the last major feature, it's partially implemented, but a bit buggy at the momentAdam Brown
12/19/2024, 9:43 PM