-
Notifications
You must be signed in to change notification settings - Fork 217
Make error messages clearer for some common problems #702
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
Conversation
4cf7f0b to
69a4cac
Compare
| } | ||
|
|
||
| if (!finalSingleItem) { | ||
| throw new Error('No query selected. Select a query history item you have already run and try again.'); |
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.
Factor out to constant
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.
yes
| const yesItem = { title: 'Yes', isCloseAffordance: false }; | ||
| const alwaysItem = { title: 'Always Save', isCloseAffordance: false }; | ||
| const noItem = { title: 'No (run anyway)', isCloseAffordance: false }; | ||
| const noItem = { title: 'No (run version on disk)', isCloseAffordance: false }; |
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.
Does 'the last saved version on disk' make sense?
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.
When would it ever not be the last saved version (unless you have a funky filesystem that automatically saves backup versions)?
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.
I expect never: what you've written is correct, I'm just wondering whether we can make the message even more obvious.
1. Clicking on query history menu items when nothing is selected. Error message is clearer. It would be better to disable when nothing is selected, but waiting on microsoft/vscode#99767 to be released. 2. Trying to run query with a missing or invalid qlpack has better message. 3. Better hover text for "Open query". Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
f123a7f to
acb091f
Compare
message is clearer. It would be better to disable when nothing is
selected, but waiting on
Enablement using listDoubleSelection and listMultiSelection not working in contributed view microsoft/vscode#99767 to be released.
message.
Checklist
@github/docs-content-dsphas been cc'd in all issues for UI or other user-facing changes made by this pull request.