Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(jsdoc): remove @kind function for providers #8809

Closed
wants to merge 1 commit into from

Conversation

thorn0
Copy link
Contributor

@thorn0 thorn0 commented Aug 28, 2014

As @petebacondarwin wrote in #7425, @kind function "is only relevant where we want to be able to tell the difference between a service that is an object and a service that is also callable". Also its presence leads to generation of strange 'Usage' sections in the docs for providers.

image

@@ -252,7 +252,6 @@ function qFactory(nextTick, exceptionHandler) {
/**
* @ngdoc method
* @name ng.$q#defer
* @kind function
Copy link
Contributor

Choose a reason for hiding this comment

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

no, this was added just the other day, adding @ngdoc method was not enough to get this to render correctly. revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It renders the same HTML for me with and without it. What exactly changes in the docs when you add/remove it? I can't find.

Copy link
Contributor

Choose a reason for hiding this comment

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

It was a 2 step process to fix it --- adding @ngdoc method was not enough, adding @kind function fixed it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is a CL worth landing, there's nothing really of value here, it doesn't correct anything weird

Copy link
Contributor

Choose a reason for hiding this comment

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

Pretty much just revert everything that literally isn't a function (like $compileProvider) --- anything with a Provider suffix can stay, but all of these methods, leave them as is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, will do. But it looks like people just blindly copy-paste this tag, and it spreads epidemically throughout the code base without any value.

Copy link
Contributor

Choose a reason for hiding this comment

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

Normally we aren't adding new providers, we're adding new methods --- so it makes sense to blindly copy the @function tag. It's not clear why it was ever applied to Providers though.

@thorn0 thorn0 changed the title docs(jsdoc): remove @kind function from everything but services docs(jsdoc): remove @kind function for providers Aug 28, 2014
@thorn0
Copy link
Contributor Author

thorn0 commented Sep 3, 2014

@caitp I've done what you requested ("Pretty much just revert everything that literally isn't a function (like $compileProvider) --- anything with a Provider suffix can stay, but all of these methods, leave them as is").

@caitp
Copy link
Contributor

caitp commented Sep 3, 2014

Taking a look~

@caitp
Copy link
Contributor

caitp commented Sep 3, 2014

LGTM

@caitp caitp closed this in 5b2a386 Sep 3, 2014
@thorn0 thorn0 deleted the master1 branch September 29, 2014 15:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants