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
Docs: Refactor API Documentation Generator #8903
base: dev
Are you sure you want to change the base?
Docs: Refactor API Documentation Generator #8903
Conversation
…ers" This reverts commit 2ec8c97.
…t for some "see cref" links.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8903 +/- ##
==========================================
+ Coverage 89.82% 90.49% +0.66%
==========================================
Files 412 398 -14
Lines 11878 12375 +497
Branches 2364 2403 +39
==========================================
+ Hits 10670 11199 +529
+ Misses 681 627 -54
- Partials 527 549 +22 ☔ View full report in Codecov by Sentry. |
Just checking: does it support |
Would you able to do this testing #3595 |
Maybe I'd be good idea to leave the code of this in the |
Why did you change Some incorrect descriptions: I only checked a few pages manually. When I was refactoring the code for API documentation, often some change was manifested only in a bug in a few properties on a few pages. This is why I wrote #3595 to be sure I don't break documentation. As you see, unfortunately, manual testing isn't enough :( |
I'm pretty sure |
Thanks for checking some pages! I agree, it's really tough to get every detail just right, like dealing with reflection names. Hopefully I can get some automated tests built from your great test code. |
…m/jperson2000/MudBlazor into feature/docs-generator-tagsupport
…m/jperson2000/MudBlazor into feature/docs-generator-tagsupport
Wouldn't a blacklist be better suited here? So when we add a component we don't have to think about extending the white list. Of course, if we add internal support types we have to remember, but even if we forget, the worst that can happen is that an internal type is exposed in the api docs for a time until we black list it. |
I love that you added the search feature, but yeah, thinking again browser search pretty much does the same. When I said I'd love integration of the API info with search I meant the primary search box in the app bar. So for instance, if you type a parameter name, components will be listed that have that parameter. Not sure if you understood it this way. |
…m/jperson2000/MudBlazor into feature/docs-generator-tagsupport
FYI getting this error from
Some more ideas since I think my review was requested. Again, just my thoughts, not demands 😅 the breadcrumbs could replace Inheritance as it's much more compact(remove ^) Breadcrumbs positioncould go above the header Breadcrumbs accessibilityshould have some kind of indicator for hover? (im not sure) Breadcrumbs activethe ones that aren't active should have a different color, maybe just darker grey. Better ^ Worse but an option (primary color) ^ should the headers look like they're a part of the table? (they have lines)also i wonder if each header should have their own sort so it's always accessible? that would kill a few birds with one stone the space between each section could be reducedLinks could be default instead of Body1 so they look like normal linkssubtextsubtext could semantically be subtitle1 instead of body1 (slightly different) FiltersPersonally would try to simplify as much as possible so removing these and moving the "Inherited" info into the rows directly might work in order to save more space Or better: an icon next to it that indicates there is a parent and when you hover over it it tells you where it comes from If you still wanted to be able to collapse them, a simple clickable collapse arrow could do the trick basically with the goal of keep the screen clean with less elements so people focus directly on the docs as their first instinct. dont want to scare anyone away because of extra buttons etc (sounds stupid i know lol) AccessibilityThis area in the docs should have aria-labels for relevant areas and properties should be tabbable (currently all are skipped over). im aiming for accessibility as a priority now |
…Support for derived types. Fixed some PR review suggestions.
…mponents are tested as before.)
…nerated file instead of "DocStrings"
…m/jperson2000/MudBlazor into feature/docs-generator-tagsupport
…at documentation was actually found, and that a link to the example exists for components. Added ~400 tests.
Alrighty, after almost a month, I think this Docs refactor is nearly ready to review! There are some things I still have to improve like documenting method parameters and enums/fields, but I think the site is in good shape to look at. Here are the major differences to look for:
Let me know if you'd like any UI changes, and I'll bring this out of draft once I have the last pieces done in about 2-3 days. Thanks @ScarletKuro @henon @danielchalmers @mckaragoz @Anu6is for your valuable feedback as always! Steps to Test
|
{ | ||
get | ||
{ | ||
if (string.IsNullOrEmpty(DeclaringTypeName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this code in a reusable utility? This and code in the DocumentedProperty.cs
look the same.
Thanks for taking into account so much of my feedback, I appreciate that a lot :) On mobile:
Accessibility (cc @igotinfected what do you think? screenshots above):
Other:
|
Description
This update refactors the API Documentation generator to add several features:
ApiPage.razor
to useThe new documentation generator has these features:
<summary>
and<remarks>
elements<c>
element (converted to<code>
)<para>
element (converted to<p>
)<see cref
linksThis update also adds Documentation Coverage metrics during builds:
This update also makes a few minor code cleanup changes:
Paths
class is now staticHow Has This Been Tested?
The
TestsForApiPages
test generator was updated to use the newApi
Blazor page when generating tests. A big change is that we now test all public types, not just types inheriting fromMudComponentBase
. This resulted in an additional 400 tests being generated during builds.Type of Changes
Checklist
dev
).