Page MenuHomePhabricator

Inherited methods and members of mixins are missing
Open, HighPublic

Description

In T187672 @Krinkle said:

The class properties are missing from sub/mixin targets. For example, OO.EventEmitter#bindings is documented in the code and present on the EventEmitter output, but missing from the OO.Factory and OO.Registry classes. (jsduck)

Event Timeline

Krinkle renamed this task from Members are not being shown in the inherited/mixin classes to Inherited methods and members of mixins are missing.Jan 17 2019, 9:32 PM
Krinkle triaged this task as High priority.
Krinkle subscribed.

That link goes to the base class, this task is about inheritance.

It seems the toolbar of checkboxes broke, eg hiding private or other kinds of members doesn't actually hide them, (and we'd presumably hide private APIs by default, but that's a minor issue for later).

Looking at https://doc.wikimedia.org/oojs/master/OO.Factory.html#lookup, there's an "Inherited from" field showing the inheritance. If this information isn't visible enough, we could add a pill, similar to the "private" pill on https://doc.wikimedia.org/oojs/master/OO.EventEmitter.html.

For the mixins, there's a "Mixes in" field on https://doc.wikimedia.org/oojs/master/OO.Registry.html#Registry linking to OO.EventEmitter. But this task is indicating that we expect to see https://doc.wikimedia.org/oojs/master/OO.EventEmitter.html#bindings displayed on that page as well?

Edit: I see, bindings does appear here https://doc.wikimedia.org/oojs/v2.2.2/#!/api/OO.Registry

@apaskulin Thanks, inheritence from "extends" now indeed shows up correctly. That's much better.

On https://doc.wikimedia.org/oojs/master/OO.Factory.html I see:

  • High-level: Yes, "extends OO.Registry"
  • Actually listed: Yes, lookup is listed.
  • Source known: Yes, for individual entries it says e.g. "Inherited from OO.Registry"

But indeed for mixins this isn't working yet. Mixin is treated more or less the same as extends in our code base, except that one can inherit from multiple and the other cannot, hence we sometimes compose with mixin instead of extends.