Skip to content

Commit

Permalink
Merge pull request #2677 from banders/param-descriptions-cutoff
Browse files Browse the repository at this point in the history
Prevent long words in parameter descriptions from stretching table
  • Loading branch information
fehguy committed Mar 2, 2017
2 parents 61d5e98 + 5da72aa commit ccf7f03
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 10 deletions.
20 changes: 20 additions & 0 deletions src/main/less/specs.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@
table {
border-collapse: collapse;
border-spacing: 0;
.param-name-col {
width: 100px;
max-width: 100px;
}
.param-value-col {
width: 310px;
max-width: 310px;
}
.param-description-col {
width: 200px;
max-width: 200px;
}
.param-type-col {
width: 100px;
max-width: 100px;
}
.param-data-type-col {
width: 220px;
max-width: 230px;
}
thead {
tr {
th {
Expand Down
10 changes: 5 additions & 5 deletions src/main/template/operation.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
<table class='fullwidth parameters'>
<thead>
<tr>
<th style="width: 100px; max-width: 100px" data-sw-translate>Parameter</th>
<th style="width: 310px; max-width: 310px" data-sw-translate>Value</th>
<th style="width: 200px; max-width: 200px" data-sw-translate>Description</th>
<th style="width: 100px; max-width: 100px" data-sw-translate>Parameter Type</th>
<th style="width: 220px; max-width: 230px" data-sw-translate>Data Type</th>
<th class="param-name-col" data-sw-translate>Parameter</th>
<th class="param-value-col" data-sw-translate>Value</th>
<th class="param-description-col" data-sw-translate>Description</th>
<th class="param-type-col" data-sw-translate>Parameter Type</th>
<th class="param-data-type-col" data-sw-translate>Data Type</th>
</tr>
</thead>
<tbody class="operation-params">
Expand Down
2 changes: 1 addition & 1 deletion src/main/template/param.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{/if}}

</td>
<td class="markdown">{{{sanitize description}}}</td>
<td class="markdown param-description-col">{{{sanitize description}}}</td>
<td>{{{escape paramType}}}</td>
<td>
<span class="model-signature"></span>
Expand Down
2 changes: 1 addition & 1 deletion src/main/template/param_list.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

</select>
</td>
<td class="markdown">{{#if required}}<strong>{{/if}}{{{description}}}{{#if required}}</strong>{{/if}}</td>
<td class="markdown param-description-col">{{#if required}}<strong>{{/if}}{{{description}}}{{#if required}}</strong>{{/if}}</td>
<td>{{{escape paramType}}}</td>
<td><span class="model-signature"></span></td>
2 changes: 1 addition & 1 deletion src/main/template/param_readonly.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
{{/if}}
{{/if}}
</td>
<td class="markdown">{{{sanitize description}}}</td>
<td class="markdown param-description-col">{{{sanitize description}}}</td>
<td>{{{escape paramType}}}</td>
<td><span class="model-signature"></span></td>
2 changes: 1 addition & 1 deletion src/main/template/param_readonly_required.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
{{/if}}
{{/if}}
</td>
<td class="markdown">{{{sanitize description}}}</td>
<td class="markdown param-description-col">{{{sanitize description}}}</td>
<td>{{{escape paramType}}}</td>
<td><span class="model-signature"></span></td>
2 changes: 1 addition & 1 deletion src/main/template/param_required.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{/if}}
</td>
<td>
<strong><span class="markdown">{{{sanitize description}}}</span></strong>
<strong><span class="markdown param-description-col">{{{sanitize description}}}</span></strong>
</td>
<td>{{{escape paramType}}}</td>
<td><span class="model-signature"></span></td>

0 comments on commit ccf7f03

Please sign in to comment.