Closed orymate closed 5 years ago
Hello @AlecAivazis, could you please check this PR?
Hey @orymate - sorry for lagging a bit on this.
I think this makes sense. Forcing the user to re-enter something they were just working on seems like a bad user experience.
Overall, the code looks fine. Would you mind adding a test for this?
Hello, does the test in 75e46df make sense? I did not catch the intention behind the go routine I removed, but it triggered errors after the extension, while it did work for me sequentially.
Thanks for adding that - it looks like you changed an existing test to cover your needs which makes it hard to track test failures (since the test is really testing 2 different things). Could you move the test into another test case?
Added separate test.
@AlecAivazis, can I do anything more to have this merged?
Hey @orymate!
I tried to add a test that would showcase the behavior to tests/editor.go
but I couldn't get it to work. Could you add one there as well so I can run this on my laptop? Having the automatic ones are helpful for regressions but i still would like something to run by hand
@AlecAivazis, I added the manual test code
Awesome! Thanks for adding that - worked like a charm.
Recall the previous invalid input in the repeated Editor prompt so the user doesn't have to start over typing a long answer (for example a json structure).
Add optional PromptAgain method to Prompts to back this.