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

[UX] Move rename input box view adaptively #1192

Open
1 task
fishBone000 opened this issue Jun 23, 2024 · 5 comments · May be fixed by #1198
Open
1 task

[UX] Move rename input box view adaptively #1192

fishBone000 opened this issue Jun 23, 2024 · 5 comments · May be fixed by #1198
Labels
feature New feature request

Comments

@fishBone000
Copy link

fishBone000 commented Jun 23, 2024

Please describe the problem you're trying to solve

When renaming a file and the file name is very long, only a part of the name is displayed in the input box. Deleting all characters within the view won't make the view automatically go left. This is a bit inconvenient and a little confusing.

For example:

Cursor is at then end of the view          here v
╭Rename:─────────────────────────────────────────╮
│ctsABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQR │
╰────────────────────────────────────────────────╯
Hold backspace to delete characters
╭Rename:─────────────────────────────────────────╮
│                                                │
╰────────────────────────────────────────────────╯
All characters in the view is gone, keep holding backspace causes characters outside of the view get deleted. 

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

Perhaps try not to let the cursor touch the left border, e.g. pan the view left when cursor is around 6 characters away from the left border

Additional context

No response

@fishBone000 fishBone000 added the feature New feature request label Jun 23, 2024
@Xerxes-2
Copy link
Contributor

I think a better approach is to keep the cursor as centre as possible?

@Xerxes-2 Xerxes-2 linked a pull request Jun 24, 2024 that will close this issue
@fishBone000
Copy link
Author

I think a better approach is to keep the cursor as centre as possible?

That sounds good as well

@martinengelke
Copy link

Oh, it's even better described in here!

I would just keep the cursor at its position until the amount of characters left is less then the characters fitting into the length of the input field. After that the cursor position could be released. So it stays at his position all the time until the "expression" is getting smaller then the input field and starts moving!

@csswright
Copy link

Personally I'd much rather have the rename done on the status bar like the familiar vim's command line bar. The area of the input bar is self-limiting and almost always overlaps text (taking up 3 rows of text) that might be useful context. There's plenty of space in both the top bar and status bar for everything else. A command line would also open up to the possibility of running actions boundable to keybindings.

@martinengelke
Copy link

+1 for a command bar like in vim.
Windows are always overlapping. That's why a lot of TUIs have a command bar or multiple areas to jump trough.
Especially if the input is context related a overlapping window does not really fit into the UX.
For helpers, spotters etc. It's more or less ok, but here I would also take the vim approach to split the screen horizontally and have the data at the bottom while still seeing the entries on top.

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

Successfully merging a pull request may close this issue.

4 participants