Skip to content

[Docs] Fixes missing method descriptions for APIs - #2764

Merged
Vincent Baaij (vnbaaij) merged 5 commits into
microsoft:devfrom
oneolddev:api-missing-desc
Oct 7, 2024
Merged

Vincent Baaij (vnbaaij) merged 5 commits into
microsoft:devfrom
oneolddev:api-missing-desc

Conversation

@oneolddev

Copy link
Copy Markdown
Contributor

Pull Request

📖 Description

Descriptions for methods on some APIs are mssing.

🎫 Issues

Missing description from FluentGridItem.GetHiddenAttribute and ToastService

image

image

After fix

image

image

👩‍💻 Reviewer Notes

The information is in the generated CodeComments file. The key is not being generated correctly because the method is either static or one of the parameters is an EventCallback<T>.

📑 Test Plan

I manually checked several components.

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

⏭ Next Steps

@oneolddev

Copy link
Copy Markdown
Contributor Author

Examinging the CodeComments.g.cs file, you find the following:
["FluentGridItem.GetHiddenAttribute(System.Nullable{Microsoft.FluentUI.AspNetCore.Components.GridItemHidden})"] = "Returns the hidden attribute value for the specified <code>GridItemHidden</code> value.",

The key being generated also has the following: (System.Nullable{Microsoft.FluentUI.AspNetCore.Components.GridItemHidden}) which is not part of the method name.

@oneolddev

Copy link
Copy Markdown
Contributor Author

I got a better understanding of the xml documentation file after finding https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/#id-strings. I changed the description retrieval code to handle the name mangling of overloaded method names with generic parameters.

image

@oneolddev
Gary Chan (oneolddev) marked this pull request as ready for review October 6, 2024 19:47
@vnbaaij Vincent Baaij (vnbaaij) added this to the V4.10.2 milestone Oct 7, 2024
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