Skip to content
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

Initial pass to improve token documentation #5

Merged

Conversation

maririos
Copy link

@maririos maririos commented Jun 18, 2024

The main goal behind the PR is to use the classes as bases for documentation. I am mainly organizing information.
I don't intend to change code here. Comments related to code will be in original PR Azure#7980

/// <description>GroupId: `doc` to group consecutive comment tokens as documentation.</description>
/// </item>
/// <item>
/// <description>NavigateToId: Id for navigating to where the node where the token is defined. Should match the definitionId of the referenced node.</description>
Copy link
Author

@maririos maririos Jun 18, 2024

Choose a reason for hiding this comment

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

@chidozieononiwu should this be should match the Id of the referenced node instead of definitionId ?

Choose a reason for hiding this comment

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

Perhaps: "When the token is clicked, will navigate to the location that matches the provided token id."

Copy link

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

Comments. Many imply code changes, which I do understand isn't the focus of this PR. But the code changes would result in documentation changes..

src/dotnet/APIView/APIView/Model/TokenTreeModel.cs Outdated Show resolved Hide resolved
src/dotnet/APIView/APIView/Model/TokenTreeModel.cs Outdated Show resolved Hide resolved
TabSpace = 3,
/// <summary>
/// Use this between method parameters. Depending on user setting this would result in a single space or new line.

Choose a reason for hiding this comment

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

I'm not sure what this "user setting" is that it refers to. Is this an existing feature I'm not aware of? If it renders a newline, does it also indent? Are the separate lines commentable? In Python we break params onto separate lines, but we have to assign line IDs to each of them. Does that work here?

Copy link
Owner

@chidozieononiwu chidozieononiwu Jun 18, 2024

Choose a reason for hiding this comment

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

This is needed to support a new request: to allow users control how parameters render (same line vs new line). We can have language defaults and also support the indentation. The separate lines will be cementable if it has tokens with ids on it.

ParameterSeparator = 4,
/// <summary>
/// A url token should have `LinkText` property i.e `token.Properties["LinkText"]` and the url/link should be the token value.

Choose a reason for hiding this comment

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

This seems like a strange place to mention this. There should probably just be a section that describes how to craft URLs and provides the correct JSON structure (not the C# structure).

I feel like this documentation should just be "This token describes a URL. See (URL section)"

Copy link
Author

Choose a reason for hiding this comment

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

@chidozieononiwu could you provide this information?

Copy link
Owner

Choose a reason for hiding this comment

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

"value" : "the url" "kind" : "Url", "Properties" : [ "LinkText" : "link text to display" ]

src/dotnet/APIView/APIView/Model/TokenTreeModel.cs Outdated Show resolved Hide resolved
src/dotnet/APIView/APIView/Model/TokenTreeModel.cs Outdated Show resolved Hide resolved
src/dotnet/APIView/APIView/Model/TokenTreeModel.cs Outdated Show resolved Hide resolved
tools/apiview/parsers/CONTRIBUTING.md Show resolved Hide resolved
tools/apiview/parsers/CONTRIBUTING.md Outdated Show resolved Hide resolved
tools/apiview/parsers/CONTRIBUTING.md Outdated Show resolved Hide resolved
@maririos
Copy link
Author

Update: I have addressed all comments that I have context about. For string vs enum vs extensible enum, we can leave those for the main PR.
@chidozieononiwu for the remaining open comments, could you please either make the changes directly on the PR or add suggestions on it for me to address them?

@chidozieononiwu chidozieononiwu force-pushed the feature/ImprovedTokens branch from 5f2bed0 to daf0679 Compare June 19, 2024 03:07
Parse C# Assemblly to Token Tree

Add Token Tree Documentation

Add LineDefinitionId and HideFromNavigation

Undo internals visible to setting

Sort NameSpaces and Types

Ensure Each node has Name and Id

Serialize to Message Pack

Add Tags to StructuredToken

update tree Token Parser Documentation

Attempt to Improve Serialized JSON Size

Properties for Serialization and Deserialization

Use shorter names for diagnostics

update APIView Parser Contributing guide

Delete TreeTokenCodeFile

Update APIView C# Parser Project Name

Add MessagePack Serialization

Switch to System.Json.Text working

Update Contributing Doc

Add Navigate to ID

Make Parser a dotnet Tool

Update Parser Version for CodeFile

App Parser Style Property

Output GZipped TokenFile

Switch to Human Readable Json Property Names, use compression

Fix some issues raised in pull request

Updating Contributing.md

Update Contributing Docs

initial pass to documentation

fix

pr feedback

one missed
@chidozieononiwu chidozieononiwu merged commit 513a046 into chidozieononiwu:feature/ImprovedTokens Jun 19, 2024
2 checks passed
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