humbleui

ray 2024-10-03T20:13:40.391319Z

Looking at text field again … seems like it’s got lines and edit actions. Is that right?

ray 2024-10-04T16:46:20.585469Z

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

Niki 2024-10-04T17:20:04.386199Z

Sounds good! Let me know if you need anything or want to talk it through more

👍🏼 1
Niki 2024-10-03T20:17:06.053419Z

No. I haven’t looked at it yet, sorry

ray 2024-10-03T20:23:13.225369Z

Ok - no problem. I’m sure you’ll get there 💪🏼

ray 2024-10-03T20:25:11.605399Z

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.

Niki 2024-10-03T22:50:38.168489Z

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 :)

ray 2024-10-04T05:09:20.401719Z

Ok - well put