Skip to content

Commit

Permalink
Merge pull request #694 from NeurodataWithoutBorders/space-forms-prop…
Browse files Browse the repository at this point in the history
…erly

Space Form Inputs Properly
  • Loading branch information
CodyCBakerPhD authored Mar 18, 2024
2 parents 71af5ea + 56e2ffa commit 2867123
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
13 changes: 10 additions & 3 deletions src/renderer/src/stories/BasicTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import * as promises from "../promises";
import "./Button";
import { sortTable } from "./Table";
import tippy from "tippy.js";
import { getIgnore } from "./JSONSchemaForm";

export class BasicTable extends LitElement {
static get styles() {
Expand Down Expand Up @@ -39,6 +38,11 @@ export class BasicTable extends LitElement {
position: relative;
overflow: auto;
max-height: 400px;
border: 1px solid gray;
}
table tr:first-child td {
border-top: 0px;
}
table {
Expand All @@ -53,7 +57,8 @@ export class BasicTable extends LitElement {
}
th {
border: 1px solid silver;
border-right: 1px solid gray;
border-bottom: 1px solid gray;
color: #222;
font-weight: 400;
text-align: center;
Expand Down Expand Up @@ -81,7 +86,9 @@ export class BasicTable extends LitElement {
}
td {
border: 1px solid gainsboro;
border: 1px solid gray;
border-left: none;
border-bottom: none;
background: white;
user-select: none;
}
Expand Down
9 changes: 7 additions & 2 deletions src/renderer/src/stories/JSONSchemaForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ const componentCSS = `
width:100%;
}
.form-section:not(:last-child), .link:not(:last-child){
margin-bottom: 15px;
}
.form-section {
display: flex;
flex-direction: column;
Expand All @@ -127,7 +133,6 @@ const componentCSS = `
}
.link {
margin: 20px 0px;
border: 1px solid black;
border-radius: 4px;
position: relative;
Expand Down Expand Up @@ -460,7 +465,7 @@ export class JSONSchemaForm extends LitElement {
if (!container) return;

const nChildren = container.children.length;
container.innerHTML = "";
container.remove();

// Track errors and warnings
if (type === "errors") this.#nErrors -= nChildren;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/stories/SimpleTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ export class SimpleTable extends LitElement {
</tfoot>
</table>
</div>
<p style="margin: 10px 0px">
<p style="margin: 0; margin-top: 10px">
<small style="color: gray;">Right click to add or remove rows.</small>
</p>
`;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/stories/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ export class Table extends LitElement {
render() {
return html`
<div></div>
<p style="width: 100%; margin: 10px 0px">
<p style="width: 100%; margin: 0; margin-top: 10px;">
<small id="description" style="color: gray;"></small>
</p>
`;
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/src/stories/preview/inspector/InspectorList.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export class InspectorListItem extends LitElement {
text-wrap: wrap;
padding: 10px;
font-size: 12px;
}
:host(:not(:last-child)) {
margin: 0 0 1em;
}
Expand Down

0 comments on commit 2867123

Please sign in to comment.