Overridden config default values do not inherit type #253

Closed
lojjic opened this Issue Oct 10, 2012 · 5 comments

Comments

Projects
None yet
2 participants
@lojjic

lojjic commented Oct 10, 2012

When a config has its default value overridden by a subclass, the documentation generated for that subclass loses the annotated type from the parent class, and instead gets a type based on what looks like a simple value sniff. The type should be inherited unless explicitly overridden in another annotation.

Example from Ext 4.1:

  • Ext.AbstractComponent defines the 'border' config with a type of "Number/String/Boolean". [1]
  • Ext.button.Button overrides the default value of border to true, with no extra annotations. Its docs are displayed with a type of just "Boolean". [2]

[1] http://docs.sencha.com/ext-js/4-1/#!/api/Ext.AbstractComponent-cfg-border
[2] http://docs.sencha.com/ext-js/4-1/#!/api/Ext.button.Button-cfg-border

@nene

This comment has been minimized.

Show comment Hide comment
@nene

nene Oct 10, 2012

Member

A bug indeed.

Member

nene commented Oct 10, 2012

A bug indeed.

@nene

This comment has been minimized.

Show comment Hide comment
@nene

nene Oct 11, 2012

Member

Fixed in 1538ab2

Member

nene commented Oct 11, 2012

Fixed in 1538ab2

@nene nene closed this Oct 11, 2012

@nene

This comment has been minimized.

Show comment Hide comment
@nene

nene Oct 12, 2012

Member

Wasn't quite a full fix. The inheritance of type should also work when an explicit @inheritdoc tag is used.

For example: http://docs.sencha.com/touch/2-0/source/ActionSheet.html#Ext-ActionSheet-cfg-height

Member

nene commented Oct 12, 2012

Wasn't quite a full fix. The inheritance of type should also work when an explicit @inheritdoc tag is used.

For example: http://docs.sencha.com/touch/2-0/source/ActionSheet.html#Ext-ActionSheet-cfg-height

@nene nene reopened this Oct 12, 2012

@nene

This comment has been minimized.

Show comment Hide comment
@nene

nene Oct 15, 2012

Member

Should be better now: 112e634

Member

nene commented Oct 15, 2012

Should be better now: 112e634

@nene nene closed this Oct 15, 2012

@lojjic

This comment has been minimized.

Show comment Hide comment
@lojjic

lojjic Oct 15, 2012

It is better indeed. Thanks @nene.

lojjic commented Oct 15, 2012

It is better indeed. Thanks @nene.

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