devzat icon indicating copy to clipboard operation
devzat copied to clipboard

Better input system

Open Arkaeriit opened this issue 2 years ago • 11 comments

The input in Devzat is quite poor. The fact that it is not possible to comfortably edit multi-lines messages is a bit sad. We should probably refactor that system. Maybe there are some external library to handle that kind of tasks.

Arkaeriit avatar Dec 13 '22 14:12 Arkaeriit

By edit, do you mean before sending or after sending?

quackduck avatar Dec 13 '22 16:12 quackduck

Before sending message. The editing of the first line works well, but once a new line is inserted by line warping, it becomes impossible to edit the first line.

Arkaeriit avatar Dec 13 '22 16:12 Arkaeriit

huh, that doesn't happen for me. what terminal are you using?

quackduck avatar Dec 13 '22 21:12 quackduck

I have this problem on Konsole, Alacritty, and st.

Arkaeriit avatar Dec 14 '22 09:12 Arkaeriit

image What I get when I try to add some text at the beginning of a multi-line message.

Arkaeriit avatar Jan 04 '23 14:01 Arkaeriit

here's an asciinema of what I see: https://asciinema.org/a/1dhK4SCMVSAnm8l6FFBdvxtcZ

(unrelated but this shows the line counting algo is broken)

could you send an asciinema of what you see?

quackduck avatar Jan 05 '23 03:01 quackduck

You can see it here.

When you use the raw cast file, if the terminal window is wide enough, it looks normal. But when it is the proper size, it looks like what I had, which is very funky. I thik the issue comes from the fact that Devzat does not try to handle multiple lines and move the cursor around when editing a message. I saw the issue #140 and the related code and it doesn't look like the code can handle all cases.

Arkaeriit avatar Jan 05 '23 09:01 Arkaeriit

Wow um yeah input is really jank lol

quackduck avatar Jan 05 '23 17:01 quackduck

I looked at potential solutions and Bubbles' textinput looks like a pretty decent solution for us. Do you think I should look into integrating it?

Arkaeriit avatar Jan 09 '23 12:01 Arkaeriit

After looking at Bubble Tea, it seems that the inputs are very abstracted. Thus, getting the inputs from the user might be tricky. Bubble Tea might not be the solution to our problem.

Arkaeriit avatar Jan 10 '23 12:01 Arkaeriit

I see

quackduck avatar Jan 10 '23 18:01 quackduck