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

Allow multiline text entry for changes and eliminate problem with repeated output to terminal #385

Closed
sheldonhull opened this issue Oct 21, 2022 · 6 comments · Fixed by #465
Labels
enhancement New feature or request hold On hold until further notice

Comments

@sheldonhull
Copy link
Contributor

Is your feature request related to a problem? Please describe.

The input for a change might contain more complex changes.
I'd like to write multiple lines.

Describe the solution you'd like

The body should be a multi-line input and this should be saved via

---
body: |
  my content
  
  - Item 1
  - item 2

Describe alternatives you've considered

I use gum for this.

2022-10-21-14 44 39-Code- changie yaml — magetools

Additional context

Currently the input once exceeding the width of the terminal incorrectly reflects repeated lines. See attached gif.

2022-10-21-14 37 19-Code- changie yaml — magetools

@sheldonhull sheldonhull added the enhancement New feature or request label Oct 21, 2022
@miniscruff
Copy link
Owner

Multi-line input is going to be an option with survey once this PR is merged and I make a new custom type: #374
I will also probably add some body config to switch from a normal input to multi-line.

Currently the only way you can do it is by adding custom choices for what each "line" would be and combine it together. You can specify it per kind as well if you want it only for breaking changes or whatever.

tl;dr this is more a limitation of promptui at this point.

@miniscruff miniscruff added the hold On hold until further notice label Nov 25, 2022
@miniscruff
Copy link
Owner

@sheldonhull Just want to give an update on this, it looks like a survey maintainer has taken a look at the windows issue and has a draft PR open. Once that is merged I will swap from promptui to survey and add a multiline option soon after that.

@sheldonhull
Copy link
Contributor Author

FYI the bubbletea based gum cli worked well in powershell and windows with the multi-line edit. Survey is great as well, just wanted to mention that if you mix and match I've found bubbletea + another library this last week that are designed for robust text input and offer multi-line. If you end up not getting progress on the survey side I'd be glad to provide a few examples with the other resources I've come across.

Definitely appreciating changie!

Off topic question: Have you considered a command like changie batch patch or such that would allow bumping just to next calculated version without needing to specify the patch version? Can open a new discussion on that later if you think it's interesting.

@miniscruff
Copy link
Owner

Major, minor and patch are already allowed in batch https://changie.dev/cli/changie_batch/

There is an existing PR open from a maintainer on fixing the issue, some stuff is happening on the survey side so I think it would be best to wait for now.

@miniscruff
Copy link
Owner

Work will begin soon using a new tool related to this issue: #457

@miniscruff
Copy link
Owner

Support was added to v1.12.0, let me know if any bugs appear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hold On hold until further notice
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants