Skip to content

fix: prompt uses first character of response - allow "yy" #2357

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

Merged
merged 1 commit into from
Aug 6, 2023

Conversation

alex-courtis
Copy link
Member

follows #2337

@alex-courtis alex-courtis merged commit 904f95c into master Aug 6, 2023
@alex-courtis alex-courtis deleted the prompt-yy branch August 6, 2023 03:26
@Danie-1
Copy link
Contributor

Danie-1 commented Aug 16, 2023

Maybe using the last character would be more sensible? If I click n and then enter I would expect it to cancel.

@alex-courtis
Copy link
Member Author

Maybe using the last character would be more sensible? If I click n and then enter I would expect it to cancel.

Agreed. See #2377

@mohamedarish
Copy link
Contributor

Shouldn't yy and all other things starting with y be accepted?
Having the last character be checked would result in ny["y"]/ns["yes"] being accepted
Not being able to accidentally delete is better than being easily able to accidentally delete

@alex-courtis
Copy link
Member Author

Shouldn't yy and all other things starting with y be accepted?
Having the last character be checked would result in ny["y"]/ns["yes"] being accepted
Not being able to accidentally delete is better than being easily able to accidentally delete

Of course. I misread the comment from @Danie-1 , thinking it was first.

Your PR addresses all these concerns.

@Danie-1
Copy link
Contributor

Danie-1 commented Aug 20, 2023

I made that comment because I think at one point there was a feature that the letter "y" would be automatically present in the response, and so if we check the first letter I would have to be careful to make sure I delete that letter (because even if I type n then enter, the response would be y). It seems like the prompts have changed though so I don't think the comment is relevant anymore (and maybe it wasn't relevant in the first place and I had just misunderstood how the prompts work).

@alex-courtis
Copy link
Member Author

I made that comment because I think at one point there was a feature that the letter "y" would be automatically present in the response, and so if we check the first letter I would have to be careful to make sure I delete that letter (because even if I type n then enter, the response would be y). It seems like the prompts have changed though so I don't think the comment is relevant anymore (and maybe it wasn't relevant in the first place and I had just misunderstood how the prompts work).

You're right... it wasn't good UX and was the driver of #2377

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.

3 participants