Skip to content
This repository has been archived by the owner on Dec 31, 2017. It is now read-only.

property's summary gets assigned to the property's value #61

Open
wkeese opened this issue Jul 11, 2012 · 4 comments · May be fixed by #84
Open

property's summary gets assigned to the property's value #61

wkeese opened this issue Jul 11, 2012 · 4 comments · May be fixed by #84
Milestone

Comments

@wkeese
Copy link
Collaborator

wkeese commented Jul 11, 2012

dijit/form/TextBox's module level summary is:

var TextBox = declare("dijit.form.TextBox", [_FormValueWidget, _TextBoxMixin], {
    // summary:
    //      A base class for textbox form inputs

However, it's appearing in the API viewer (and presumably the details.xml) as the summary from a property of InlineEditBox whose value is TextBox:

    // editor: String|Function
    //      MID (ex: "dijit/form/TextBox") or constructor for editor widget
    editor: TextBox,
@neonstalwart
Copy link

i just came across this same issue... when generateMetaData handles 'Property' types, if the property happens to be for a value that already has metatdata then we mixin/override the summary of the existing metadata with the one from the property.

as an example, the following snippet wrongly redefines the summary for SimpleQueryEngine because the value is a reference to SimpleQueryEngine.

// queryEngine: Function
//      Defines the query engine to use for querying the data store
queryEngine: SimpleQueryEngine,

i traced it to propertyValue = read(property.value); which will return a reference to the SimpleQueryEngine value that then gets passed to generateMetadata which then updates the summary. i wonder if it would hurt anything if we changed it to propertyValue = read(property.value, { asIdentifier: true });.

@neonstalwart
Copy link

i wonder if it would hurt anything if we changed it to propertyValue = read(property.value, { asIdentifier: true });.

it does hurt... very badly - so that might not be the answer 😃

@neonstalwart
Copy link

by default, a property's metadata is a copy of the value's metadata but in generateMetadata we have enough context to know when a property's metadata should override the value's metadata. so that's what i've done with #84.

@wkeese this really makes a big difference to dojo's docs - you might want to try it out. i think you'll like it 😃

@wkeese
Copy link
Collaborator Author

wkeese commented Mar 25, 2013

@neonstalwart Yes I'd love to integrate all your fixes, that's why I'm disappointed that you're working against csnover's branch and forcing me to merge.

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

Successfully merging a pull request may close this issue.

2 participants