Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html><body> | 2 <html> |
| 3 <element name="x-doc-link" constructor="DocLink" extends="span"> | 3 <head> |
| 4 <template> | 4 <link rel="components" href="doc_link.html"> |
| 5 <template instantiate="if ref.refId != 'void'"> | 5 </head> |
| 6 <a href="{{permalink(ref)}}">{{ref.name}}</a> | |
| 7 </template> | |
| 8 <template instantiate="if ref.refId == 'void'"> | |
| 9 {{ref.name}} | |
| 10 </template> | |
| 11 </template> | |
| 12 <script type="application/dart"> | |
| 13 import 'package:web_ui/web_ui.dart'; | |
| 14 import 'ast.dart'; | |
| 15 import 'model.dart'; | |
| 16 | 6 |
| 17 class DocLink extends WebComponent { | 7 <body> |
| 18 /// Must be a Reference or Element. | |
| 19 var ref; | |
| 20 } | |
| 21 </script> | |
| 22 </element> | |
| 23 | |
| 24 <element name="x-member-blocks" constructor="MemberBlocks" extends="div"> | 8 <element name="x-member-blocks" constructor="MemberBlocks" extends="div"> |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
you can now remove the 'constructor="MemberBlocks"
Jacob
2013/01/02 19:54:58
Nice :)
Done.
On 2012/12/19 19:47:33, Siggi Chere
| |
| 25 <template> | 9 <template> |
| 26 <template iterate='block in blocks'> | 10 <template iterate='block in blocks'> |
| 27 <div> | 11 <div> |
| 28 <h3>{{block.kindTitle}}</h3> | 12 <h3>{{block.kindTitle}}</h3> |
| 29 <ul> | 13 <template iterate='element in block.elements'> |
| 30 <template iterate='element in block.elements'> | 14 <x-element-summary element="{{element}}"></x-element-summary> |
| 31 <li class="{{kindCssClass(element)}}"> | 15 </template> |
| 32 <x-element-summary element="{{element}}"></x-element-summary> | |
| 33 </li> | |
| 34 </template> | |
| 35 </ul> | |
| 36 </div> | 16 </div> |
| 37 </template> | 17 </template> |
| 38 </template> | 18 </template> |
| 39 <script type="application/dart"> | 19 <script type="application/dart"> |
| 40 // TODO(jacobr): this is kinda a rediculous way to do this | 20 // TODO(jacobr): this is kinda a rediculous way to do this |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
what specifically are you referring to? :)
Jacob
2013/01/02 19:54:58
No idea.. removed comment.
| |
| 41 import 'package:web_ui/web_ui.dart'; | 21 import 'package:web_ui/web_ui.dart'; |
| 42 import 'ast.dart'; | 22 import 'ast.dart'; |
| 43 import 'model.dart'; | 23 import 'model.dart'; |
| 44 | 24 |
| 45 class MemberBlocks extends WebComponent { | 25 class MemberBlocks extends WebComponent { |
| 46 List<ElementBlock> blocks; | 26 List<ElementBlock> blocks; |
| 47 } | 27 } |
| 48 </script> | 28 </script> |
| 49 </element> | 29 </element> |
| 50 | 30 |
| 51 <element name="x-element-signature" constructor="ElementSignature" extends="sp an"> | 31 <element name="x-element-signature" constructor="ElementSignature" extends="sp an"> |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
if you want, remove 'constructor...'
Jacob
2013/01/02 19:54:58
Done.
| |
| 52 <template> | 32 <template> |
| 53 <span class="element-class"> | 33 <span class="element-class"> |
| 54 <template instantiate="if (element is MethodElementBase || element is Ty pedefElement) && element.returnType != null"> | 34 <template instantiate="if (element is MethodElementBase || element is Ty pedefElement) && element.returnType != null"> |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
style suggestion: consider making the condition in
Jacob
2013/01/02 19:54:58
That is better. Done.
| |
| 55 <x-doc-link ref="{{element.returnType}}"></x-doc-link> | 35 <x-doc-link ref="{{element.returnType}}"></x-doc-link> |
| 56 </template> | 36 </template> |
| 57 </span> | 37 </span> |
| 58 <span class="element-definition"> | 38 <span class="element-definition"> |
| 59 <span class="element-name"><x-doc-link ref="{{element}}"></x-doc-link></ span> | 39 <span class="element-name"><x-doc-link ref="{{element}}" short="{{true}} "></x-doc-link></span> |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
nit: long line, maybe move x-doc-link to it's own
Jacob
2013/01/02 19:54:58
Done.
| |
| 60 <template instantiate="if element is MethodElement || element is Constru ctorElement || element is TypedefElement"> | 40 <template instantiate="if element is MethodElement || element is Constru ctorElement || element is TypedefElement"> |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
similarly: consider a getter to describe this cond
Jacob
2013/01/02 19:54:58
Done.
| |
| 61 <span class="args">( | 41 <span class="args">( |
| 62 <template iterate="param in element.parameters"> | 42 <template iterate="param in element.parameters"> |
| 63 <span class="arg"> | 43 <span class="arg"> |
| 64 <template instantiate="if param.type != null"> | 44 <template instantiate="if param.type != null"> |
| 65 <span class = "arg-type"> | 45 <span class = "arg-type"> |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
nit: remove spaces around '='?
| |
| 66 <x-doc-link ref="{{param.type}}"></x-doc-link> | 46 <x-doc-link ref="{{param.type}}"></x-doc-link> |
| 67 </span> | 47 </span> |
| 68 </template> | 48 </template> |
| 69 <span class="arg-name">{{param.name}}</span> | 49 <span class="arg-name">{{param.name}}</span> |
| 70 </span> | 50 </span> |
| 71 </template>) | 51 </template>) |
| 72 </span> | 52 </span> |
| 73 </template> | 53 </template> |
| 74 </span> | 54 </span> |
| 75 </template> | 55 </template> |
| 76 <script type="application/dart"> | 56 <script type="application/dart"> |
| 77 import 'package:web_ui/web_ui.dart'; | 57 import 'package:web_ui/web_ui.dart'; |
| 78 import 'ast.dart'; | 58 import 'ast.dart'; |
| 79 import 'model.dart'; | 59 import 'model.dart'; |
| 80 | 60 |
| 81 class ElementSignature extends WebComponent { | 61 class ElementSignature extends WebComponent { |
| 82 Element element; | 62 Element element; |
| 83 } | 63 } |
| 84 </script> | 64 </script> |
| 85 </element> | 65 </element> |
| 86 | 66 |
| 87 <element name="x-element-summary" constructor="ElementSummary" extends="div"> | 67 <element name="x-element-summary" constructor="ElementSummary" extends="div"> |
| 88 <template> | 68 <template> |
| 89 <!--TODO(jacobr): use id instead of data-id and use a different escaping s cheme--> | 69 <!--TODO(jacobr): use id instead of data-id and use a different escaping s cheme--> |
| 90 <details class="element-details {{(element is MethodElementBase) ? 'member -details' : 'type-details'}}" data-id="{{element.id}}" open="{{currentMember != null && element.id == currentMember.id}}"> | 70 <details class="element-details {{kindCssClass(element)}} {{(element is Me thodElementBase) ? 'member-details' : 'type-details'}}" data-id="{{element.id}}" open="{{currentMember != null && element.id == currentMember.id}}"> |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
long line, consider wrapping on each attribute:
<d
Jacob
2013/01/02 19:54:58
Done.
| |
| 91 <summary> | 71 <summary> |
| 92 <div class="overflow-shadow"></div> | 72 <div class="overflow-shadow"></div> |
| 93 <template instantiate="if element is! ClassElement"> | 73 <template instantiate="if element is! ClassElement"> |
| 94 <x-element-signature element="{{element}}"> | 74 <x-element-signature element="{{element}}"> |
| 95 </x-element-signature> | 75 </x-element-signature> |
| 96 </template> | 76 </template> |
| 97 <template instantiate="if element is ClassElement"> | 77 <template instantiate="if element is ClassElement"> |
| 98 <x-doc-link class="element-name element-definition" ref="{{element}} "></x-doc-link> | 78 <x-doc-link class="element-name element-definition" ref="{{element}} "></x-doc-link> |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
long line
Jacob
2013/01/02 19:54:58
Done.
| |
| 99 </template> | 79 </template> |
| 100 <div class="documentation"> | 80 <div class="documentation">{{element.commentHtml}}</div> |
| 101 {{element.commentHtml}} | |
| 102 </div> | |
| 103 </summary> | 81 </summary> |
| 104 <details class="extended-element-info"> | 82 <details class="extended-element-info"> |
| 105 <summary>View ?? comments.</summary> | 83 <summary>View ?? comments.</summary> |
| 106 TODO(jacobr): implement. | 84 TODO(jacobr): implement. |
| 107 </details> | 85 </details> |
| 108 </details> | 86 </details> |
| 109 </template> | 87 </template> |
| 110 <script type="application/dart"> | 88 <script type="application/dart"> |
| 111 // TODO(jacobr): this is kinda a rediculous way to do this | 89 // TODO(jacobr): this is kinda a rediculous way to do this |
| 112 import 'package:web_ui/web_ui.dart'; | 90 import 'package:web_ui/web_ui.dart'; |
| 113 import 'ast.dart'; | 91 import 'ast.dart'; |
| 114 import 'model.dart'; | 92 import 'model.dart'; |
| 115 | 93 |
| 116 class ElementSummary extends WebComponent { | 94 class ElementSummary extends WebComponent { |
| 117 Element element; | 95 Element element; |
| 118 } | 96 } |
| 119 </script> | 97 </script> |
| 120 </element> | 98 </element> |
| 121 | 99 |
| 122 <element name="x-class-hierarchy-subtree" constructor="ClassHierarchySubtree" extends="div"> | 100 <element name="x-class-hierarchy-subtree" constructor="ClassHierarchySubtree" extends="div"> |
| 123 <template> | 101 <template> |
| 124 <template instantiate="if (index < clazz.superclasses.length)"> | 102 <template instantiate="if (index < clazz.superclasses.length)"> |
| 125 <div><x-doc-link ref={{clazz.superclasses[index]}}></x-doc-link></div> | 103 <div><x-doc-link ref={{clazz.superclasses[index]}}></x-doc-link></div> |
| 126 <div style="padding-left: 15px"> | 104 <!-- TODO(jacobr): why doesn't it work to just put this class on the |
| 105 x-class-hierarchy-subtree node? --> | |
|
Siggi Cherem (dart-lang)
2012/12/19 19:47:33
maybe a bug in how we propagate properties you set
Jacob
2013/01/02 19:54:58
acknowledged
| |
| 106 <div class="child-subtree"> | |
| 127 <x-class-hierarchy-subtree clazz="{{clazz}}" index="{{index+1}}"> | 107 <x-class-hierarchy-subtree clazz="{{clazz}}" index="{{index+1}}"> |
| 128 </x-class-hierarchy-subtree> | 108 </x-class-hierarchy-subtree> |
| 129 </div> | 109 </div> |
| 130 </template> | 110 </template> |
| 131 <template instantiate="if index == clazz.superclasses.length"> | 111 <template instantiate="if index == clazz.superclasses.length"> |
| 132 <div><strong>{{clazz.name}}</strong></div> | 112 <div><strong>{{clazz.shortDescription}}</strong></div> |
| 133 </template> | 113 </template> |
| 134 </template> | 114 </template> |
| 135 <script type="application/dart"> | 115 <script type="application/dart"> |
| 136 // TODO(jacobr): this is kinda a rediculous way to do this | 116 // TODO(jacobr): this is kinda a rediculous way to do this |
| 137 import 'package:web_ui/web_ui.dart'; | 117 import 'package:web_ui/web_ui.dart'; |
| 138 import 'ast.dart'; | 118 import 'ast.dart'; |
| 139 import 'model.dart'; | 119 import 'model.dart'; |
| 140 | 120 |
| 141 class ClassHierarchySubtree extends WebComponent { | 121 class ClassHierarchySubtree extends WebComponent { |
| 142 ClassElement clazz; | 122 ClassElement clazz; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 153 <script type="application/dart"> | 133 <script type="application/dart"> |
| 154 import 'package:web_ui/web_ui.dart'; | 134 import 'package:web_ui/web_ui.dart'; |
| 155 import 'ast.dart'; | 135 import 'ast.dart'; |
| 156 import 'model.dart'; | 136 import 'model.dart'; |
| 157 | 137 |
| 158 class ClassHierarchy extends WebComponent { | 138 class ClassHierarchy extends WebComponent { |
| 159 ClassElement clazz; | 139 ClassElement clazz; |
| 160 } | 140 } |
| 161 </script> | 141 </script> |
| 162 </element> | 142 </element> |
| 163 <!-- more below... --> | |
| 164 </body></html> | 143 </body></html> |
| OLD | NEW |