Looking at text field again … seems like it’s got lines and edit actions. Is that right?
I would definitely need some back and forth to be prepared to tackle it. If and when I feel prepared, I’ll make the above into a GH issue
Sounds good! Let me know if you need anything or want to talk it through more
No. I haven’t looked at it yet, sorry
Ok - no problem. I’m sure you’ll get there 💪🏼
And also feel free to describe what you would want in a PR. I remember asking before but you were in the middle of a big refactor that iirc is complete now.
Okay, let’s think this through.
One thing still pending from refactoring is state management. Right now text-field accepts single signal that is used both for value and for internal state. I want to change it to be two: one for internal state, one simple signal (just string) for value. That’s probably worth a PR on its own.
After that, we need text layout algorithm. Proper way would be to go through Skia but it’s a loooong road. So we can use the same basic one that paragraph currently uses, with the intention to replace it later. Layout does word splitting and wrapping, basically.
After we have that, it’s a matter of adding actions for moving up/down, adjusting mouse clicking to be aware of multiple lines etc.
Then, there’s the matter of API. There should exist two versions of the component: one for single-line entry and one for multiline. I feel like they will share a lot of code though, so it might turn into an option on text field that just surpresses multi-line rendering.
Something like that :)
Ok - well put