Skip to content

Commit

Permalink
Small improvements to separate blocks better in JsonSchema, `Proces…
Browse files Browse the repository at this point in the history
…s` and `Logs` #83
  • Loading branch information
m-mohr committed Jul 15, 2022
1 parent 68a01cd commit 1c9f0af
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `Process`: Escape non-printable characters (`\r`, `\n`, `\t`) in regular expressions properly
- `Process`:
- Escape non-printable characters (`\r`, `\n`, `\t`) in regular expressions properly
- Show a constant boolean value as boolean value instead of yes/no
- Small improvements to separate blocks better in `JsonSchema`, `Process` and `Logs`

## [2.8.1] - 2022-05-23

Expand Down
35 changes: 20 additions & 15 deletions components/JsonSchema.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="vue-component json-schema" v-if="showSchema">
<div class="vue-component json-schema" :class="{composite: compositeTypes.length > 1}" v-if="showSchema">
<template v-if="visible">
<div v-if="isProcessGraph" class="schemaProcessGraph">
<div class="process-graph-parameters">
Expand Down Expand Up @@ -72,8 +72,8 @@
<div v-else-if="key == 'allOf' && Array.isArray(val)" class="schema-container">
<openeo-json-schema v-for="(v, k) in val" :key="k" :schema="v" :nestingLevel="nestingLevel+1" :processUrl="processUrl" />
</div>
<span v-else-if="key != 'default' && key != 'examples' && val === true" title="true">✓ Yes</span>
<span v-else-if="key != 'default' && key != 'examples' && val === false" title="false">✕ No</span>
<span v-else-if="key != 'const' && key != 'default' && key != 'examples' && val === true" title="true">✓ Yes</span>
<span v-else-if="key != 'const' && key != 'default' && key != 'examples' && val === false" title="false">✕ No</span>
<ul v-else-if="key != 'examples' && Array.isArray(val)" class="comma-separated-list">
<li v-for="(v, k) in val" :key="k">{{ v }}</li>
</ul>
Expand Down Expand Up @@ -201,7 +201,7 @@ export default {
case 'minItems':
return 'Min. number of items';
case 'const':
return 'Constant value';
return 'Allowed value';
case 'maxItems':
return 'Max. number of items';
case 'minimum':
Expand Down Expand Up @@ -262,17 +262,21 @@ export default {
<style lang="scss">
@import './base.scss';
.vue-component.json-schema {
border-left: 7px solid #ccc;
border-bottom: 1px dotted #ccc;
padding: 0.25%;
width: 99%;
.vue-component .json-schema {
border-left: 5px solid #ccc;
padding: 0.5em;
box-sizing: border-box;
&.composite {
border-left: 0;
padding-left: 0;
}
td, th {
padding: 0.25em;
padding: 0.5em;
}
.schemaProcessGraph {
padding: 0.25em;
padding: 0.5em;
h4 {
font-size: 1.1em;
Expand All @@ -283,10 +287,10 @@ export default {
font-weight: bold;
}
.data-types-container > .json-schema {
border-left: 1px solid #ccc;
border-bottom: 1px dotted #ccc;
margin-top: 0.5em;
margin-left: 1em;
border-left: 7px solid #ccc;
border-bottom: 1px solid #ccc;
margin-bottom: 1em;
margin-left: 0.25em;
}
.inline-schema-attrs .json-schema {
border: 0;
Expand All @@ -300,6 +304,7 @@ export default {
}
.schema-attrs {
width: 100%;
margin: -0.25em;
.key {
white-space: nowrap;
Expand Down
2 changes: 1 addition & 1 deletion components/internal/Log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default {
.details {
margin: 0.5em 0 1em 1.6em;
padding-left: 1.5em;
padding-left: 2em;
font-size: 0.9em;
> li {
Expand Down
7 changes: 4 additions & 3 deletions components/internal/ProcessExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ export default {
<style lang="scss">
.vue-component.process-example {
.content {
border-left: 0.5em solid #ccc;
border-bottom: 1px dotted #ccc;
border-left: 5px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 0.5em;
margin-left: 1.5em;
margin-left: 3em;
box-sizing: border-box;
.styled-description {
margin-bottom: 1em;
Expand Down
2 changes: 1 addition & 1 deletion components/internal/ProcessParameter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default {
<style lang="scss">
.vue-component.process-parameter {
.details {
margin-left: 1.5em;
margin-left: 3em;
}
.default {
font-weight: normal;
Expand Down

0 comments on commit 1c9f0af

Please sign in to comment.