-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 errors when saving a blank hotkey #2430
Fix errors when saving a blank hotkey #2430
Conversation
This also satisfies #2087, I think. |
Hey, @samherrington thank you for your contribution 🎉 |
Saving a blank hotkey showed false error even though hotkey was saved. This solution solves the issue as it stands, but I would recommend looking into cleaning up the error handling surrounding this functionality before adding any new hotkey fields.
Saving a blank hotkey will now display a success message when the user saves the setting with the empty Show/Hide Boostnote hotkey.
@ZeroX-DG I am fairly sure the error messages correctly reflect what is happening now. If the success message shows up, the hotkey seems to be consistently set to what is in the text box. |
Well, clearly that's the current behavior 😄 Or we will have to prevent users from saving blank hotkeys, however, there're requests that people want to "disable" that hotkey by leaving it blank. So do you have other ideas other than sticking to the current behavior? If not then I think showing a message to notify the user is not a bad idea. |
@ZeroX-DG The new behavior allows users to save blank hotkeys and displays the success message when they do (because they have successfully saved a blank hotkey). Before this fix, a blank hotkey returned an error. |
|
@ZeroX-DG No, with this PR you should see "Successfully applied!" when either or both of the hotkeys are blank. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @samherrington, it's was a bug in vscode pull request extension. How can you submit the PR when @jacobherrington own the repo? This is new to me 😄 Anyway LGTM 🎉
@ZeroX-DG He is a collaborator on my fork! |
Haha @jacobherrington TIL |
Saving a blank hotkey showed false error even though hotkey was
saved. This solution solves the issue as it stands, but I
would recommend looking into cleaning up the error handling
surrounding this functionality before adding any new hotkey
fields.
Refs #2153