Skip to content
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

Way to list child classes that inherit a property? #248

Open
martinambrus opened this issue Jul 23, 2014 · 4 comments
Open

Way to list child classes that inherit a property? #248

martinambrus opened this issue Jul 23, 2014 · 4 comments

Comments

@martinambrus
Copy link

If it's not there yet (I couldn't find it in docs), do you think it would be beneficial to display a list of children for property that's inherited by multiple classes?

Use case:

  • property helloWorld is defined in MyConfig class
  • property helloWorld is inherited by MyClass
  • property helloWorld is inherited by MyClass2

Presently, I can see that helloWorld is inherited in the MyClass and MyClass2 classes when I navigate to their docs. The thing I can't see is where helloWorld is used when I navigate to its own definition. A list of classes (i.e. MyClass, MyClass2) would be beneficial here for me, especially in an event-driven JS environment.

Thank you for your consideration :)

@caridy
Copy link
Member

caridy commented Aug 4, 2014

Probably doable thru a custom theme! If there is anything else that we need to add to the core to support this thru themes, send me a PR and I will consider it.

@garysoed
Copy link

Any updates on this? It would be nice if we can get the inheritance tree in the root data (even just the extends field for every class), so we can write a custom helper.

@okuryu
Copy link
Member

okuryu commented Feb 26, 2015

Okay, I'll take a look in the next month.

@WhisperingChaos
Copy link

👍

It would be beneficial to generalize this request. Each tag defines a relationship specified between a source context and a target context. Where context represents the following abstractions:

  • The categories/types represented and/or related by the tag. For example, the yuidoc @class Car tag relates the yuidoc (source context) tag name (aka type) of @class to (the target context of) Car via the relationship instance-of/type-of. Essentially, Car is an instance-of a type called @class.
  • An instance of the category/type referenced by the type. In the above example, Car represents an instance of the type called @class.

I suggest it would be beneficial to treat tag relationships as bidirectional ones and extend the tagging system to permit references to a tag's inverse perspective(s), as well as to define grouping expressions to organize/cluster, what could be many references, by some shared attribute value(s). Eventually, yuidoc may introduce filtering expressions that can be applied before/after the clustering ones.

This suggested more general approach would permit, for example, the definition of a "returns" list for a given instance of a @class that lists all the methods known to @return an instance of that class and group (cluster) them by class name.

Note, source context and target context are just a means of referencing the concepts at either end of the relationship. Therefore, referencing Car as the target seems perceptually incorrect given our other experiences, like Linux cp command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants