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

Improve database download prompt when creating query #3016

Merged
merged 6 commits into from
Oct 30, 2023

Conversation

koesie10
Copy link
Member

This improves the database download prompt when creating a query by removing it from the default flow. Instead, the user will get a notification with information on how they can download a database. There are 3 scenarios:

  1. The user does not have a database for the language of the query:

Screenshot 2023-10-25 at 14 25 10

  1. The user does have a database for the language of the query, but does not have it selected:

Screenshot 2023-10-25 at 14 26 04

  1. The user does have a database for the language of the query and has it selected:

No notification

I'm very open to suggestions on how to better phrase these notifications, they are currently a bit wordy and repetitive.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

This changes the skeleton query wizard to not prompt for database
download after creating a query by default. Instead, it will show a
message with a button to download a database which will launch the same
prompt.
@koesie10 koesie10 marked this pull request as ready for review October 25, 2023 12:48
@koesie10 koesie10 requested a review from a team as a code owner October 25, 2023 12:48
Copy link
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! A couple of comments from me. I also agree that the notifications are a bit wordy, but I don't have much inspiration for other options 😅

@jf205, do you have any opinions about the notification wording now that you can see them "in action"? 📝

Comment on lines 338 to 342
const openFileArgs = [
join(this.qlPackStoragePath, this.folderName, this.fileName),
];
const queryString = encodeURI(JSON.stringify(openFileArgs));
return `[${this.fileName}](command:vscode.open?${queryString})`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't open the file from this link. I haven't looked into debugging this myself yet (happy to help if need be!) but definitely looks like a windows path issue 😅
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried using a URI to fix this. Let me know if it doesn't work, then we can pair on getting it to work on Windows.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me now! Thanks ✨

Copy link
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the edits! Looks good 🤩

@koesie10 koesie10 merged commit 5e0cade into main Oct 30, 2023
14 checks passed
@koesie10 koesie10 deleted the koesie10/improve-skeleton-db-download branch October 30, 2023 10:58
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.

2 participants