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

feat(command): ✨ add TextBox prompt type #711

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JOTSR
Copy link
Contributor

@JOTSR JOTSR commented May 31, 2024

Summary

Add multiline prompt type (TextBox).

Motivation

Allow direct multiline prompt in terminal (without editing features).

Changes

  • Add prompt/textbox.ts.

Todo

  • Support erase and text navigation.
  • Fix stdin issue (fast closed after first prompt')
  • Implement fully (all methods).
  • Add tests.
  • Add doc.

Maybe choose a better name: "textbox", "textblock", "textarea", ...

@JOTSR
Copy link
Contributor Author

JOTSR commented May 31, 2024

@c4spar Before continuing to work on this feature (tests, improve code, and docs), does this feat right for you ?

@JOTSR JOTSR marked this pull request as draft May 31, 2024 12:24
@JOTSR
Copy link
Contributor Author

JOTSR commented Jun 1, 2024

Demo

Default options

image

Custom endDelimiter

image

@c4spar
Copy link
Owner

c4spar commented Jun 2, 2024

Sounds good to me 👍 TextBox and TextArea are fine for me. Another name could be MultilineInput.

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.

2 participants