[TIMOB-10240] APIDoc: Add "notes" or "see" field to "deprecated" annotation
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-08-24T10:53:14.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Sprint 2012-17 Core, Release 3.0.0 |
Components | Tooling |
Labels | n/a |
Reporter | Arthur Evans |
Assignee | Bill Dawson |
Created | 2011-12-09T13:16:35.000+0000 |
Updated | 2012-11-26T21:46:57.000+0000 |
Description
It would be nice if the deprecation annotation included a free-text field where we could describe what to use instead. The alternative is to reuse the summary text, possibly removing the only documentation describing the item.
This proposal is to add a field, which for the sake of argument I'll call notes, like this:
instead.
For the detail page, the note would show up as part of the deprecation warning, and
the usual summary would appear:
bq. Deprecated since 1.8.0, removed in 1.9.0. Use instead.
bq.
bq. Summary
bq. A view which automatically renders as an octagon.
deprecated:
since: 1.8.0
removed: 1.9.0
notes: Use <Titanium.UI.iPhone.Hicky> instead.
For summary tables, the deprecated.notes field could be used in place of the summary, so
users would see something like:
bq. DEPRECATED Use
I'll start this by updating validate.py, the spec, and the htmlgenerator (though we don't really use that, it's nice to have.) For the jsduck changes probably we should have a separate ticket, since it'll start getting "weird" if we have multiple people making PRs for the same ticket.
Testing Notes
* Open apidoc/Titanium/Network/TCPSocket.yml in an editor. * In the type'sdeprecated
block, add:* Save the file. * Run
python apidoc/validate.py -e -s simple
for a sanity check. (It has been updated for this.) * Runpython apidoc/docgen.py
. * When it's finished, open dist/apidoc/index.html in a web browser. * Navigate to the Titanium.Network.TCPSocket documentation page. * Make sure the deprecation information includes the "Use Titanium.Network.Socket.TCP instead" comment, and that "Titanium.Network.Socket.TCP" is a link that, when clicked, properly goes to the Titanium.Network.Socket.TCP documentation page.Pull request ready: https://github.com/appcelerator/titanium_mobile/pull/2803
Tested with 3.0.0.v20121121161553, do not need to add notes, it is already added so just run validation