Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space Form Inputs Properly #694

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading