PolymerElements / iron-component-page

A reusable landing page for elements
36 stars 32 forks source link

Elements Shouldn't show Polymer's internal API #147

Open manolo opened 7 years ago

manolo commented 7 years ago

Description

Elements directly extending the Polymer.Element, shouldn't show methods listed in Polymer.ElementMixin or Polymer.PropertyEffects

Expected outcome

Create a new element with polymer init and add iron-component-page to its index.html. Since the element does not have any method, the API should look:

screen shot 2017-08-28 at 11 11 07

Actual outcome

The API of Polymer.Element is listed instead

screen shot 2017-08-28 at 11 12 35

manolo commented 7 years ago

Note that just when the simple element extends an empty mixin, the problem is fixed.

  /**
   * @polymerMixin
   */
  Foo = superClass => class FooMixin extends superClass {
  };
class KkElement extends Foo(Polymer.Element) {
...

Probably the issue might be fixed in the analyzer.

jsilvermist commented 7 years ago

Something I would really like to see which would fix this nicely is to add checkbox's to enable/disable each source of inherited properties/methods so you can focus on just what you care about.

abdonrd commented 7 years ago

Friendly ping to @aomarks. 🙂

armujahid commented 5 years ago

@manolo Another one liner workaround is: class SomeElement extends (class extends Polymer.Element {})

Reference: https://github.com/Polymer/tools/issues/1566#issuecomment-341096900