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

fix: better display of prompts on long inputs #12036

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yo-main
Copy link
Contributor

@yo-main yo-main commented Nov 8, 2024

This is a continuation of #11965

The current prompt does not manage well long inputs:

  • It's not possible to navigate at the beginning of the string to modify it
  • They aren't correctly scoped to their respective area and leak on other elements (especially on pickers)

I tried to refactor that a bit in order to enhance the user experience on that.

Strings are now scoped to their respective area. Ellipses are placed at the start and/or end of long strings, when needed. A user can them easily navigate through its input, whether using arrows or shortcut like ctrl+a or ctrl+e.

here

@yo-main yo-main force-pushed the yomain/better-display-on-long-commands branch 7 times, most recently from 0e2fe0b to bf7928e Compare November 10, 2024 22:15
This introduces the notion of anchor in the prompt.
The prompt anchor represents the position of the
left-side of the input. This anchor is needed
so that we are able to correctly display the prompt
input when its length is longer than the one of the
prompt area itself
@yo-main yo-main force-pushed the yomain/better-display-on-long-commands branch from bf7928e to 1bdecd3 Compare November 10, 2024 22:17
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

Successfully merging this pull request may close these issues.

1 participant