Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better input system #138

Open
Arkaeriit opened this issue Dec 13, 2022 · 11 comments
Open

Better input system #138

Arkaeriit opened this issue Dec 13, 2022 · 11 comments

Comments

@Arkaeriit
Copy link
Collaborator

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.

@quackduck
Copy link
Owner

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

@Arkaeriit
Copy link
Collaborator Author

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.

@quackduck
Copy link
Owner

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

@Arkaeriit
Copy link
Collaborator Author

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

@Arkaeriit
Copy link
Collaborator Author

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

@quackduck
Copy link
Owner

quackduck commented Jan 5, 2023

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?

@Arkaeriit
Copy link
Collaborator Author

Arkaeriit commented Jan 5, 2023

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.

@quackduck
Copy link
Owner

Wow um yeah input is really jank lol

@Arkaeriit
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

@quackduck
Copy link
Owner

I see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants