Skip to content

Improve database download prompt when creating query#3016

Merged
koesie10 merged 6 commits intomainfrom
koesie10/improve-skeleton-db-download
Oct 30, 2023
Merged

Improve database download prompt when creating query#3016
koesie10 merged 6 commits intomainfrom
koesie10/improve-skeleton-db-download

Conversation

@koesie10
Copy link
Copy Markdown
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
Copy Markdown
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 thread extensions/ql-vscode/src/local-queries/skeleton-query-wizard.ts
Comment thread extensions/ql-vscode/src/local-queries/skeleton-query-wizard.ts Outdated
Comment thread extensions/ql-vscode/src/local-queries/skeleton-query-wizard.ts Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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