Skip to content

Add using-statement F1 keyword#21209

Merged
BillWagner merged 3 commits intodotnet:masterfrom
TheSench:feature/add-using-statement-f1-keyword
Dec 3, 2020
Merged

Add using-statement F1 keyword#21209
BillWagner merged 3 commits intodotnet:masterfrom
TheSench:feature/add-using-statement-f1-keyword

Conversation

@TheSench
Copy link
Contributor

@TheSench TheSench commented Oct 24, 2020

Summary

This PR adds an f1_keyword for the using-statement context of the using keyword and moves the default using keyword to the using-directive page. This allows the F1 help to route this keyword to pages more specific to the context in which it is being used.

Fixes part of #20799, Roslyn changes under dotnet/roslyn#48898.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

Thanks again @TheSench

I had one question that we should resolve before merging this.

Once that's figured out, we can complete the changes and merge this.

ms.date: 04/05/2019
f1_keywords:
- "using_CSharpKeyword"
- "using"
Copy link
Member

Choose a reason for hiding this comment

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

If this keyword won't be generated by Visual Studio F1, I'd like to remove this article. It has no content, and it's only purpose is to provide a single click to send readers where they want to get to.

We'd also need to check for links and remove links to this page.

@davidwengier do you know if "using" is generated from Visual Studio?

Copy link
Member

Choose a reason for hiding this comment

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

Right now, Roslyn appends _CSharpKeyword for any language construct it is trying to access help for, so unless there is an old version of Visual Studio that might be triggering this (that we care about) so as far as the f1_keywords goes I don't expect this to be ever used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about users browsing the documentation outside of F1-help? If they were to go to the keywords page, what should they see? I think leaving in the using page for that purpose makes sense. There's no "using-statement" keyword, they would expect a "using" keyword page.

Copy link
Member

Choose a reason for hiding this comment

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

Ping @BillWagner in case you didn't see this comment.

I'm happy from the Roslyn side of this, and the PR on that side is ready to go when this is in, but this question is for the docs point of view.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, missed this comment. Thanks for the ping.

This is good to go, and I'll :shipit: now.

@BillWagner BillWagner merged commit 77d8939 into dotnet:master Dec 3, 2020
@TheSench TheSench deleted the feature/add-using-statement-f1-keyword branch December 6, 2020 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants