Skip to content

Several behavior fix #235

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

Merged
merged 4 commits into from
Mar 26, 2019
Merged

Several behavior fix #235

merged 4 commits into from
Mar 26, 2019

Conversation

Vigilans
Copy link
Contributor

Introduction

Old behavior:

  • When quickpicking language, if click other areas to cancel the selection, an undefined default language query will pop out:
    image
  • Sometimes, the leetcode-cli may print useful data, but exit with error code. In this case, an exception will be thrown, and useful data will not be passed.
  • When submitting a solution, leetcode-cli may print Runtime error and exit with error code. With aforementioned behavior, an exception will be thrown, and result WebView cannot be shown.
    image

New behavior:

  • Perform extra check before default language query.
  • When exiting with error code, collect the result data into the error object.
  • When showing result provider, if there is any result data in the caught error object, extract it out to build the WebView. Otherwise, re-throw the error object.

@Vigilans Vigilans requested a review from jdneo March 25, 2019 15:55
Copy link
Member

@jdneo jdneo left a comment

Choose a reason for hiding this comment

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

These are very good improvements for the extension.

@Vigilans Would you mind to create the issues for those bugs separately and link them to the PR here? Then I can cover these issues into the changelog.

@@ -68,7 +68,7 @@ async function fetchProblemLanguage(): Promise<string | undefined> {
const language: string | undefined = defaultLanguage || await vscode.window.showQuickPick(languages, { placeHolder: "Select the language you want to use" });
Copy link
Member

Choose a reason for hiding this comment

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

We can also add ignoreFocusOut: true into the showQuickPick()'s option to avoid user close the drop list by mistake

@Vigilans
Copy link
Contributor Author

Tracked in the issues #236 and #237 .

@jdneo jdneo merged commit 3028be4 into LeetCode-OpenSource:master Mar 26, 2019
@Vigilans Vigilans deleted the cs/behaviorfix branch March 26, 2019 09:50
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