Skip to content

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

Merged
merged 2 commits into from
Oct 28, 2017

Conversation

devversion
Copy link
Member

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)

@devversion devversion requested a review from jelbourn as a code owner October 27, 2017 15:42
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 27, 2017
<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>
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 it would be better to show this immediately after the name, e.g.

MatVerticalStepper extends MatStepper

Copy link
Member Author

@devversion devversion Oct 27, 2017

Choose a reason for hiding this comment

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

I tried that and it didn't look that well in my opinion.

image

But maybe there will be some advanced styling to make this look better. Let me know if we should go that way?

// 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!);
Copy link
Member

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?

Copy link
Member Author

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.

@jelbourn
Copy link
Member

I think a little css would make it look good

@devversion
Copy link
Member Author

@jelbourn Updated the PR and addressed the feedback.

@devversion devversion force-pushed the chore/docs-show-extends-clauses branch 2 times, most recently from 5a5ba2d to d8b3634 Compare October 27, 2017 17:26
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn
Copy link
Member

There's a lint error: you can add merge-ready when ready

@devversion
Copy link
Member Author

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)
@devversion devversion force-pushed the chore/docs-show-extends-clauses branch from d8b3634 to 424207c Compare October 27, 2017 20:12
@devversion
Copy link
Member Author

Lint issue will be fixed by #8086.

@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Oct 28, 2017
@mmalerba mmalerba merged commit 520d83b into angular:master Oct 28, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants