-
Notifications
You must be signed in to change notification settings - Fork 25.8k
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
build(docs-infra): add final
labels to classes in API pages
#42807
Conversation
You can preview b4564e0 at https://pr42807-b4564e0.ngbuilds.io/. |
d7a1dc3
to
755fdf2
Compare
You can preview 755fdf2 at https://pr42807-755fdf2.ngbuilds.io/. |
@gkalpak and @AndrewKushnir - I changed the label to For an example see https://pr42807-755fdf2.ngbuilds.io/api/forms/FormGroup Please take a look and let me know your thoughts. |
sealed
markers to classes in API pagesfinal
labels to classes in API pages
You can preview 1717ccb at https://pr42807-1717ccb.ngbuilds.io/. |
1717ccb
to
74291f7
Compare
You can preview 74291f7 at https://pr42807-74291f7.ngbuilds.io/. |
You can preview aef35d3 at https://pr42807-aef35d3.ngbuilds.io/. |
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.
Looks great, thanks Pete 👍
aef35d3
to
ca08a54
Compare
I don't 😃 |
You can preview 4e253db at https://pr42807-4e253db.ngbuilds.io/. |
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.
One question. Otherwise lgtm 🚀
@@ -26,6 +26,9 @@ <h1>{$ doc.name | escape $}</h1> | |||
{% if doc.deprecated !== undefined %}<label class="api-status-label deprecated">deprecated</label>{% endif %} | |||
{% if doc.security !== undefined %}<label class="api-status-label security">security</label>{% endif %} | |||
{% if doc.pipeOptions.pure === 'false' %}<label class="api-status-label impure-pipe">impure</label>{% endif %} | |||
{% if doc.docType === 'class' and doc.extensible !== true and not doc.isAbstract %}<label class="github-links api-status-label final" title="This class should not be extended."> |
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.
What about other docType
s, such as ngmodule
(see for example CommonModule) or directive
(see for example NgIf)?
Don't we need to also mark them as "final" (even if they don't have a public constructor most of the time)?
(NOTE: If we change the logic here, the same changes should be applied in memberHelpers.html.)
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 - I decided that we should start with only classes, since they are more likely to feel like they can be extended. Also those kinds of classes are rendered in the docs in a way that doesn't make it so obvious that they are classes.
We can easily add that at a later stage if it looks useful.
This change will mark classes as `sealed` unless they have been annotated with an `@extensible` jsdoc tag. Fixes angular#42802
This class is designed to be used as a base class. Therefore it should not be marked as `final` in the API docs.
4e253db
to
5879ed9
Compare
@AndrewKushnir - can you override the presubmit check, since this PR only changes a comment in code that will be synched to G3? |
You can preview 5879ed9 at https://pr42807-5879ed9.ngbuilds.io/. |
@petebacondarwin done! I'm adding "merge-assistance" label and this PR should be ready for merge. Thanks for implementing that Pete 👍 |
Merge-assistance: Pete has global docs approval permissions and this PR was reviewed and approved by 2 engineers, so this PR is ready for merge now. |
) This class is designed to be used as a base class. Therefore it should not be marked as `final` in the API docs. PR Close #42807
) This class is designed to be used as a base class. Therefore it should not be marked as `final` in the API docs. PR Close #42807
…lar#42807) This change will mark classes as `sealed` unless they have been annotated with an `@extensible` jsdoc tag. Fixes angular#42802 PR Close angular#42807
…ular#42807) This class is designed to be used as a base class. Therefore it should not be marked as `final` in the API docs. PR Close angular#42807
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. |
…lar#42807) This change will mark classes as `sealed` unless they have been annotated with an `@extensible` jsdoc tag. Fixes angular#42802 PR Close angular#42807
…ular#42807) This class is designed to be used as a base class. Therefore it should not be marked as `final` in the API docs. PR Close angular#42807
This change will mark classes as
final
unless they have been annotatedwith an
@extensible
jsdoc tag.Fixes #42802
For example: