Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide several hints for better user experience#293

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jdneo merged 9 commits intomasterfromvigilans/hint
Apr 28, 2019
Merged

Conversation

Vigilans
Copy link
Contributor

Introduction

Uniform hint settings:
image

Demonstration

  1. Config WebView Markdown
    Shown upon any webview revealed:
    image

  2. Comment Description
    Shown upon code file opened:
    image

  3. Command Shortcut
    Shown upon submission webview revealed:
    image

NOTE

User experience could be more better for the future update of vscode:

When executingworkbench.action.openSettings command, it can receive arguments as search query, making the hint able to guide the users directly to the specific configs:
microsoft/vscode#72352
microsoft/vscode@e5c1c22#diff-dfd9031c00a144c2364595f331243744

Query as args when opening Keybindings Editor is underway:
microsoft/vscode#72878

@VigilansVigilans added this to the0.14.1 milestoneApr 26, 2019
@VigilansVigilans requested a review fromjdneoApril 26, 2019 12:42
@VigilansVigilans modified the milestones:0.14.1,0.14.0,0.14.2Apr 27, 2019
@jdneojdneo mentioned this pull requestApr 27, 2019
"commentDescription",
'You can generate problem description as comment in the solution code file by enabling "leetcode.showCommentDescription".',
"Open configuration",
(): Thenable<any> => vscode.commands.executeCommand("workbench.action.openSettings", "leetcode.showCommentDescription"),
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 wrap a method for opening the setting, like

openSettingView(section?: string)

"commandShortcut",
'You can configure custom key bindings with "test", "submit" or any other command in Preferences > Keyboard Shortcuts.',
"Open Keybindings",
(): Thenable<any> => commands.executeCommand("workbench.action.openGlobalKeybindings", "leetcode solution"),
Copy link
Member

Choose a reason for hiding this comment

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

Same above, wrap a method, likeopenKeyBindingView(section?: string)

@@ -57,6 +58,20 @@ export async function promptForSignIn(): Promise<void> {
}
}

export async function promptHintMessage(config: string, message: string, choiceConfirm: string, onConfirm: () => Thenable<any>): Promise<void> {
if (getWorkspaceConfiguration().get<boolean>(`hint.${config}`)) {
Copy link
Member

Choose a reason for hiding this comment

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

Just pass the entirehint.${config} to the method instead of only the${config} itself since we may have other setting section in the future.

Copy link
Member

@jdneojdneo left a comment

Choose a reason for hiding this comment

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

LGTM. Just some wording issue.

@@ -120,6 +118,12 @@ async function showProblemInternal(node: IProblem): Promise<void> {
await Promise.all([
vscode.window.showTextDocument(vscode.Uri.file(filePath), { preview: false, viewColumn: vscode.ViewColumn.One }),
movePreviewAsideIfNeeded(node),
promptHintMessage(
"hint.commentDescription",
'You can generate problem description as comment in the solution code file by enabling "leetcode.showCommentDescription".',
Copy link
Member

Choose a reason for hiding this comment

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

You can generate the code file with problem description in the comments by .....

await vscode.commands.executeCommand("workbench.action.openGlobalKeybindings", query);
}


Copy link
Member

Choose a reason for hiding this comment

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

nit: multiple empty line

private async showKeybindingsHint(): Promise<void> {
await promptHintMessage(
"hint.commandShortcut",
'You can configure custom key bindings with "test", "submit" or any other command in Preferences > Keyboard Shortcuts.',
Copy link
Member

Choose a reason for hiding this comment

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

You can customize the shortcut key bindings in Preferences > Keyboard Shortcuts.

@jdneojdneo merged commitcfed70a intomasterApr 28, 2019
@jdneojdneo deleted the vigilans/hint branchApril 28, 2019 07:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jdneojdneojdneo approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.14.2
Development

Successfully merging this pull request may close these issues.

2 participants
@Vigilans@jdneo

[8]ページ先頭

©2009-2025 Movatter.jp