Skip to content

Commit

Permalink
Integrate into enums/dataframes into device page
Browse files Browse the repository at this point in the history
- data models now accesible globally which enables moreintegrated
  webpages
- point src submodule to main
- MRef.html.extension.js extended to search global data models for enums
  and dataFrames
- separated enums and classes into completely different partial
  templates
- dataframes and enums excluded in filter.yml
  • Loading branch information
cjsha committed Jul 31, 2024
1 parent 849b278 commit 5ee34b7
Show file tree
Hide file tree
Showing 12 changed files with 696 additions and 203 deletions.
12 changes: 5 additions & 7 deletions filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ apiRules:
- exclude:
hasAttribute:
uid: System.ObsoleteAttribute
- exclude:
uidRegex: OpenEphys.Onix.DeviceFactory
- exclude:
uidRegex: OpenEphys.Onix.DeviceNameConverter
- exclude:
uidRegex: OpenEphys.Onix.HubDeviceFactory
- exclude:
uidRegex: OpenEphys.Onix.SingleDeviceFactory
- exclude:
uidRegex: OpenEphys.Onix.ManagedFrame
- exclude:
uidRegex: OpenEphys.Onix.DeviceContext
- exclude:
uidRegex: OpenEphys.Onix.ConfigureFmcLinkController
uidRegex: ^.*DeviceFactory
- exclude:
uidRegex: OpenEphys.Onix.DataFrame
uidRegex: ^.*DataFrame
- exclude:
uidRegex: OpenEphys.Onix.BufferedDataFrame
type: Enum
- exclude:
uidRegex: OpenEphys.Onix.ConfigureFmcLinkController
- exclude:
uidRegex: OpenEphys.Onix.ConfigureDS90UB9x
2 changes: 1 addition & 1 deletion src/onix-refactor
413 changes: 337 additions & 76 deletions template/ManagedReference.extension.js

Large diffs are not rendered by default.

83 changes: 3 additions & 80 deletions template/ManagedReference.html.primary.tmpl
Original file line number Diff line number Diff line change
@@ -1,84 +1,7 @@
{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
{{!master(layout/_master.tmpl)}}

{{^_splitReference}}
{{#isClass}}

<div>
<h1 id="{{id}}" data-uid="{{uid}}" class="text-break" style="display:inline-block;">
{{#inClass}}{{name.0.value}}{{/inClass}}
{{#sourceurl}}<a class="header-action link-secondary" title="View source" href="{{sourceurl}}"><i class="bi bi-code-slash"></i></a>{{/sourceurl}}
</h1>
<p style="display:inline;">
{{#sourceNode}} Source Operator {{/sourceNode}}
{{#sinkNode}} Sink Operator {{/sinkNode}}
{{#combinatorNode}} Combinator Operator {{/combinatorNode}}
</p>
</div>

<div class="markdown summary">{{{summary}}}</div>
<div class="markdown level0 remarks">{{{remarks}}}</div>

{{#showWorkflow}}
<div class="workflow"><p><img src="../workflows/operators/{{name.0.value}}.bonsai" alt="{{name.0.value}} Workflow"></p></div>
{{/showWorkflow}}

<div class="markdown conceptual">{{{conceptual}}}</div>

{{#children}}
{{#nodeMethod}}

<h2>Inputs & Outputs</h2>

{{>partials/class.methods}}

{{/nodeMethod}}
{{/children}}

{{#children}}
{{#inProperty}}

<h2>Properties</h2>
<table>
<tr>
<th style="width: 15%;">Property</th>
<th style="width: 15%;">Type</th>
<th style="width: 70%;">Description</th>
</tr>
{{>partials/class.properties}}
</table>

{{/inProperty}}
{{/children}}

{{/isClass}}

{{#isEnum}}

<h1 id="{{id}}" data-uid="{{uid}}" class="text-break">
{{#inEnum}}{{name.0.value}}{{/inEnum}}
{{#sourceurl}}<a class="header-action link-secondary" title="View source" href="{{sourceurl}}"><i class="bi bi-code-slash"></i></a>{{/sourceurl}}
</h1>

<div class="markdown summary">{{{summary}}}</div>
<div class="markdown level0 remarks">{{#remarks}}{{{remarks}}}{{/remarks}}</div>
<div class="markdown conceptual">{{{conceptual}}}</div>

{{#children}}
{{#inField}}

<h2>Fields</h2>
<table>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
{{>partials/enum.fields}}
</table>

{{/inField}}
{{/children}}
{{!master(layout/_master.tmpl)}}

{{/isEnum}}
{{>partials/class}}

{{/_splitReference}}
{{>partials/enum}}
5 changes: 5 additions & 0 deletions template/ManagedReference.overwrite.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exports.getOptions = function (model) {
return {
isShared: true
};
}
160 changes: 143 additions & 17 deletions template/partials/class.methods.tmpl.partial
Original file line number Diff line number Diff line change
@@ -1,34 +1,123 @@
{{#children}}
{{#oe.operators}}

{{{summary}}}
{{{remarks}}}
{{{description}}}

<table style="border: 0px; table-layout: fixed;">
<tr style="border: 0px;">

<!--- input --->

<td style="border: 0px; vertical-align: middle; margin: 0; padding: 0; width: 45%;">
<table style="table-layout: fixed;">
<tr style="border: 0px;">
{{#input}}
<td style="border: 1px solid; vertical-align: middle; width: 80%; border-color: var(--bs-border-color);">
<h5>{{{name}}}</h5>
{{{description}}}
</td>
<td style="text-align: right; vertical-align: middle; margin: 0; padding: 0; width: 20%; border: 0px;">
<img src="../images/right-arrow.svg" alt="right-arrow">
</td>
{{/input}}
</tr>
</table>
</td>

<!--- node --->

<td style="border: 0px; text-align: center; vertical-align: middle; margin: 0; padding: 0; width: 10%;">
<img src="../images/{{oe.operatorType}}-node.svg" alt="representation of a source, sink, or combinator operator">
</td>

<!--- output --->

<td style="border: 0px; vertical-align: middle; margin: 0; padding: 0; width: 45%;">
<table style="table-layout: fixed;">
<tr style="border: 0px;">
<td style="border: 0px; vertical-align: middle; margin: 0; padding: 0; width: 20%;">
<img src="../images/right-arrow.svg" alt="right-arrow">
</td>
<td style="border: 1px solid; vertical-align: middle; width: 80%; border-color: var(--bs-border-color);">
<h5>{{{output.name}}}</h5>
<div>{{{output.description}}}</div>
</td>
</tr>
</table>
</td>
</tr>
</table>

{{#hasDataFrame}}

<h3>{{{output.nameWithoutExtraHtml}}}</h3>

<div class="inputs-and-outputs">
<table>

<tr>
<th>Data Frame Member</th>
<th>Type</th>
<th>Description</th>
</tr>
{{#dataFrame}}
<tr>
<td>
<code>
{{{name}}}
</code>
</td>
<td>
{{{type}}}
</td>
<td>
{{{description}}}
{{#hasEnum}}
<dl style="margin-top: 1rem; margin-bottom: 0">
{{#enumFields}}
<dt><code>{{{field&value}}}</code></dt><dd style="margin-bottom: 0">{{{description}}}</dd>
{{/enumFields}}
</dl>
{{/hasEnum}}
</td>
</tr>
{{/dataFrame}}

</table>

{{/hasDataFrame}}

{{/oe.operators}}

{{#oe.hasSubOperators}}

{{{description}}}

<table style="border: 0px; table-layout: fixed;">
<tr style="border: 0px;">

<!--- input --->

<td style="border: 0px; vertical-align: middle; margin: 0; padding: 0; width: 45%;">
<table style="table-layout: fixed;">
<tr style="border: 0px;">
{{#syntax.parameters}}
{{#input}}
<td style="border: 1px solid; vertical-align: middle; width: 80%; border-color: var(--bs-border-color);">
<h5>{{{syntax.parameters.0.type.specName.0.value}}}</h5>
<div>{{{syntax.parameters.0.tableDescription}}}</div>
<h5>{{{name}}}</h5>
{{{description}}}
</td>
<td style="text-align: right; vertical-align: middle; margin: 0; padding: 0; width: 20%;">
<td style="text-align: right; vertical-align: middle; margin: 0; padding: 0; width: 20%; border: 0px;">
<img src="../images/right-arrow.svg" alt="right-arrow">
</td>
{{/syntax.parameters}}
{{/input}}
</tr>
</table>
</td>

<!--- node --->
<td style="text-align: center; vertical-align: middle; margin: 0; padding: 0; width: 10%;">
{{#sourceNode}} <img src="../images/source-node.svg" alt="source node"> {{/sourceNode}}
{{#sinkNode}} <img src="../images/sink-node.svg" alt="sink node"> {{/sinkNode}}
{{#combinatorNode}} <img src="../images/combinator-node.svg" alt="combinator node"> {{/combinatorNode}}

<td style="border: 0px; text-align: center; vertical-align: middle; margin: 0; padding: 0; width: 10%;">
<img src="../images/{{oe.operatorType}}-node.svg" alt="representation of a source, sink, or combinator operator">
</td>

<!--- output --->

<td style="border: 0px; vertical-align: middle; margin: 0; padding: 0; width: 45%;">
Expand All @@ -38,14 +127,51 @@
<img src="../images/right-arrow.svg" alt="right-arrow">
</td>
<td style="border: 1px solid; vertical-align: middle; width: 80%; border-color: var(--bs-border-color);">
<h5>{{{syntax.return.type.specName.0.value}}}</h5>
<div>{{{syntax.return.tableDescription}}}</div>
<h5>{{{output.name}}}</h5>
<div>{{{output.description}}}</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>

{{/children}}
{{#hasDataFrame}}

<h3>{{{output.nameWithoutExtraHtml}}}</h3>

<table>

<tr>
<th>Data Frame Member</th>
<th>Type</th>
<th>Description</th>
</tr>
{{#dataFrame}}
<tr>
<td>
<code>
{{{name}}}
</code>
</td>
<td>
{{{type}}}
</td>
<td>
{{{description}}}
{{#hasEnum}}
<dl style="margin-top: 1rem; margin-bottom: 0">
{{#enumFields}}
<dt><code>{{{field&value}}}</code></dt><dd style="margin-bottom: 0">{{{description}}}</dd>
{{/enumFields}}
</dl>
{{/hasEnum}}
</td>
</tr>
{{/dataFrame}}

</table>

{{/hasDataFrame}}

{{/oe.hasSubOperators}}
12 changes: 0 additions & 12 deletions template/partials/class.properties.tmpl.partial

This file was deleted.

Loading

0 comments on commit 5ee34b7

Please sign in to comment.