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

Add progress messages to LGTM download option. #960

Merged
merged 6 commits into from
Oct 4, 2021

Conversation

marcnjaramillo
Copy link
Contributor

@marcnjaramillo marcnjaramillo commented Oct 1, 2021

Suggested feature added: add progress messages to the LGTM download option.

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.
  • @github/docs-content-codeql has been cc'd in all issues for UI or other user-facing changes made by this pull request.

@marcnjaramillo marcnjaramillo requested a review from a team as a code owner October 1, 2021 19:32
@@ -2,6 +2,8 @@

## [UNRELEASED]

- Remove line about selecting a language from the dropdown when downloading database from LGTM. This makes the download progress visible when the popup is not expanded. [#894](https://github.com/github/vscode-codeql/issues/894)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this duplicated line.

@@ -2,6 +2,8 @@

## [UNRELEASED]

- Remove line about selecting a language from the dropdown when downloading database from LGTM. This makes the download progress visible when the popup is not expanded. [#894](https://github.com/github/vscode-codeql/issues/894)
- Add progress messages to LGTM download option. This makes the two-step process (selecting a project, then selecting a language) more clear.

Copy link
Contributor

Choose a reason for hiding this comment

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

And there is an extra newline here.

// These tests make API calls and may need extra time to complete.
const fakeProgress = (_: ProgressUpdate) => { /*do nothing*/ };
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be converted into a test spy and you can later verify that this spy is invoked. This would ensure that the progress update is properly called.

eg-

let progressSpy: sinon.SinonStub<ProgressCallback>;

// and then in the before block:
progressSpy = sandbox.spy();

// and then in each test, after the call to convert databasea
expect(progressSpy).to.have.been.calledOnce;

Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

Looks good.

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.

This is great! Thanks for adding these progress messages 🎊

extensions/ql-vscode/CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
@shati-patel shati-patel merged commit 21dda65 into github:main Oct 4, 2021
marcnjaramillo added a commit to marcnjaramillo/vscode-codeql that referenced this pull request Oct 6, 2021
Add progress messages to LGTM download option. (github#960)
mgsium pushed a commit to mgsium/vscode-codeql that referenced this pull request Oct 19, 2021
* Add progress messages to LGTM download option.

* Add additional argument to get test passing again.

* Make edits requested by @aeisenerg

* Fix assertion in test case

* Update extensions/ql-vscode/CHANGELOG.md
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