Skip to content

Commit ee64477

Browse files
committed
style changes to xxx-of key description in schema based on ux feedback
1 parent 80144fb commit ee64477

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/components/api-request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ export default class ApiRequest extends LitElement {
915915
this.parameters.length > 0 || this.request_body
916916
? html`
917917
<button class="m-btn thin-border" style="margin-right:5px;" @click="${this.onFillRequestData}" title="Fills with example data (if provided)">
918-
FILL
918+
FILL EXAMPLE
919919
</button>
920920
<button class="m-btn thin-border" style="margin-right:5px;" @click="${this.onClearRequestData}">
921921
CLEAR

src/components/schema-table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export default class SchemaTable extends LitElement {
144144
: ''
145145
}
146146
${data['::type'] === 'xxx-of-option' || data['::type'] === 'xxx-of-array' || prevKey.startsWith('::OPTION')
147-
? html`<span class="xxx-of-key" style="margin-left:-6px">${newPrevKey}</span><span class="xxx-of-key xxx-of-subkey">${subKey}</span>`
147+
? html`<span class="xxx-of-key" style="margin-left:-6px">${newPrevKey}</span><span class="xxx-of-descr">${subKey}</span>`
148148
: newPrevKey.endsWith('*')
149149
? html`<span style="display:inline-block; margin-left:-6px;"> ${newPrevKey.substring(0, newPrevKey.length - 1)}</span><span style='color:var(--red);'>*</span>`
150150
: html`<span style="display:inline-block; margin-left:-6px;">${newPrevKey}</span>`

src/components/schema-tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export default class SchemaTree extends LitElement {
168168
<div class="tr ${level < this.schemaExpandLevel ? 'expanded' : 'collapsed'} ${data['::type'] || 'no-type-info'}">
169169
<div class='td key' style='min-width:${minFieldColWidth}px'>
170170
${data['::type'] === 'xxx-of-option' || data['::type'] === 'xxx-of-array' || prevKey.startsWith('::OPTION')
171-
? html`<span class='xxx-of-key'>${newPrevKey}</span><span class="xxx-of-key xxx-of-subkey">${subKey}</span>`
171+
? html`<span class='xxx-of-key'>${newPrevKey}</span><span class="xxx-of-descr">${subKey}</span>`
172172
: newPrevKey.endsWith('*')
173173
? html`${newPrevKey.substring(0, newPrevKey.length - 1)} ${prevDataType === 'array' ? 'ARRAY OF' : ''} <span style='color:var(--red);'>*</span>`
174174
: html`${newPrevKey === '::props' || newPrevKey === '::ARRAY~OF' ? '' : newPrevKey}`

src/styles/schema-styles.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ export default css`
5555
display:inline-block;
5656
}
5757
58-
.xxx-of-subkey {
59-
color:var(--primary-color);
60-
background-color:var(--primary-color-invert);
61-
font-size: var(--font-size-small);
58+
.xxx-of-descr {
59+
font-family: var(--font-regular);
60+
color: var(--primary-color);
61+
font-size: calc(var(--font-size-small) - 1px);
62+
margin-left: 2px;
6263
}
6364
6465
.stri, .string, .uri, .url, .byte, .bina, .date, .pass, .ipv4, .ipv4, .uuid, .emai, .host {color:var(--green);}

0 commit comments

Comments
 (0)