Skip to content

"Learn More" link jumps to the associated troubleshooting paragraph directly - #371

Merged
Jinbo Wang (testforstephen) merged 5 commits into
masterfrom
jinbo_anchor
Aug 22, 2018
Merged

Jinbo Wang (testforstephen) merged 5 commits into
masterfrom
jinbo_anchor

Conversation

@testforstephen

Copy link
Copy Markdown
Contributor

The requirement is from issue #360

Comment thread Troubleshooting.md

## Failed to resolve classpath:
### Reason:
Below are the common failure reasons.

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.

In the document, it should avoid using xyz which is not meaningful.

Should use meaningful name such as mainClassName, projectName

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice suggestion. thanks.

Comment thread src/utility.ts Outdated
function handleTroubleshooting(choice: string, message: string, anchor: string): string | undefined {
if (choice === LEARN_MORE) {
openLink(TROUBLESHOOTING_LINK);
const link = anchor ? `${TROUBLESHOOTING_LINK}#${anchor}` : TROUBLESHOOTING_LINK;

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.

no need for a link variable since it is simple and used only once

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Comment thread src/utility.ts
export async function showErrorMessageWithTroubleshooting(message: IMessage, ...items: string[]): Promise<string | undefined> {
const choice = await showErrorMessage(message, ...items, LEARN_MORE);
return handleTroubleshooting(choice, message.message);
return handleTroubleshooting(choice, message.message, message.anchor);

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.

rename IMessage/message to ITroubleShooting/troubleShoot?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@testforstephen
Jinbo Wang (testforstephen) deleted the jinbo_anchor branch August 22, 2018 06:38
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