Skip to content

Add F1 keywords for default token semantics#21034

Merged
BillWagner merged 5 commits intodotnet:masterfrom
TheSench:feature/add-f1help-keywords-for-default-types
Oct 12, 2020
Merged

Add F1 keywords for default token semantics#21034
BillWagner merged 5 commits intodotnet:masterfrom
TheSench:feature/add-f1help-keywords-for-default-types

Conversation

@TheSench
Copy link
Contributor

@TheSench TheSench commented Oct 11, 2020

Summary

This PR adds two separate f1_keywords for different semantics of the default keyword. This allows the F1 help to route to the appropriate page based on the context, rather than having to route to a generic default page.

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

- "case"
- "case_CSharpKeyword"
- "defaultcase_CSharpKeyword"
- "defaultcase"
Copy link
Member

Choose a reason for hiding this comment

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

This looks redundant. Only defaultcase_CSharpKeyword is needed based on your Roslyn PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add, I wasn't aware, I kept seeing foo and foo_CSharpKeyword, so I thought both were necessary. Thanks for letting me know.

- "default_CSharpKeyword"
- "default"
- "defaultvalue_CSharpKeyword"
- "defaultvalue"
Copy link
Member

Choose a reason for hiding this comment

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

Same comment applies here.

Comment on lines 6 to 7
- "default_CSharpKeyword"
- "default"
Copy link
Member

@Youssef1313 Youssef1313 Oct 11, 2020

Choose a reason for hiding this comment

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

We can delete this to avoid duplicate f1_keywords.
But don't delete it from keywords/default.md for backcompat with older Roslyn versions.

Suggested change
- "default_CSharpKeyword"
- "default"

Also adding @davidwengier and @BillWagner for opinions.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is a good change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As mentioned in the Roslyn PR, it also means one less added keyword, since we can now just use the existing default_CSharpKeyword one that's already on the operator page.

@TheSench
Copy link
Contributor Author

@davidwengier based on the discussion in dotnet/roslyn#48500, I opted to reuse the existing default_CSharpKeyword and move it from the generic keyword page to the operator page.

Let me know if I should undo this change and I'll just rebase those commits out so that the overall history is less polluted.

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.

This LGTM @TheSench

I'll approve this, and :shipit: now.

You should see the changes on the live site tomorrow, during our regular publishing cycle. After that, the roslyn PR can be tested against the live site.

@BillWagner BillWagner merged commit 4c447c4 into dotnet:master Oct 12, 2020
@TheSench TheSench deleted the feature/add-f1help-keywords-for-default-types branch October 13, 2020 00:19
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.

5 participants