-
Notifications
You must be signed in to change notification settings - Fork 6.8k
chore(docs): show extends clauses for classes #8078
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
chore(docs): show extends clauses for classes #8078
Conversation
<p class="docs-api-class-extends-clauses"> | ||
<span class="docs-api-class-extends-label">Extends:</span> | ||
{% for extendedDoc in class.extendedDocs %} | ||
<span class="docs-api-class-extends-type">{$ extendedDoc.name $}</span> |
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.
I think it would be better to show this immediately after the name, e.g.
MatVerticalStepper extends MatStepper
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.
// a document are unknown and should not be mentioned in the documentation for this class. | ||
classDoc.extendedDocs = classDoc.extendsClauses | ||
.filter(clause => clause.doc) | ||
.map(clause => clause.doc!); |
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.
Did you confirm that this filters out mixin classes like MatButtonBase
?
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.
Yeah, those are filtered out because there is no Dgeni doc for those.
I think a little css would make it look good |
@jelbourn Updated the PR and addressed the feedback. |
5a5ba2d
to
d8b3634
Compare
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.
LGTM
There's a lint error: you can add merge-ready when ready |
Seems unrelated. But can fix in the PR as well |
Classes like `MatAnchor` in the button docs should indicate that those are extending the `MatButton` class. Clauses without any related Dgeni doc can be ignored, because no information for this is available (right now; e.g. `MatSlideToggleBase` with mixins)
d8b3634
to
424207c
Compare
Lint issue will be fixed by #8086. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Classes like
MatAnchor
in the button docs should indicate that those are extending theMatButton
class.Clauses without any related Dgeni doc can be ignored, because no information for this is available (right now; e.g.
MatSlideToggleBase
with mixins)