From ddce1cd91ea5b0d15d33e8d57f5af4ef5df59515 Mon Sep 17 00:00:00 2001 From: Garrett Michael Flynn Date: Mon, 18 Mar 2024 13:46:04 -0700 Subject: [PATCH 1/2] Update input style --- src/renderer/src/stories/BasicTable.js | 13 ++++++++++--- src/renderer/src/stories/JSONSchemaForm.js | 12 ++++++++++-- src/renderer/src/stories/SimpleTable.js | 2 +- src/renderer/src/stories/Table.js | 2 +- .../src/stories/preview/inspector/InspectorList.js | 3 +++ 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/stories/BasicTable.js b/src/renderer/src/stories/BasicTable.js index e6718ad48..ea5e6ee30 100644 --- a/src/renderer/src/stories/BasicTable.js +++ b/src/renderer/src/stories/BasicTable.js @@ -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() { @@ -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 { @@ -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; @@ -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; } diff --git a/src/renderer/src/stories/JSONSchemaForm.js b/src/renderer/src/stories/JSONSchemaForm.js index 28dff4eaf..84b8f6f62 100644 --- a/src/renderer/src/stories/JSONSchemaForm.js +++ b/src/renderer/src/stories/JSONSchemaForm.js @@ -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; @@ -127,7 +133,6 @@ const componentCSS = ` } .link { - margin: 20px 0px; border: 1px solid black; border-radius: 4px; position: relative; @@ -460,11 +465,14 @@ 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; if (type === "warnings") this.#nWarnings -= nChildren; + + + }; status; diff --git a/src/renderer/src/stories/SimpleTable.js b/src/renderer/src/stories/SimpleTable.js index 316deeac0..c5e7d8fdb 100644 --- a/src/renderer/src/stories/SimpleTable.js +++ b/src/renderer/src/stories/SimpleTable.js @@ -948,7 +948,7 @@ export class SimpleTable extends LitElement { -

+

Right click to add or remove rows.

`; diff --git a/src/renderer/src/stories/Table.js b/src/renderer/src/stories/Table.js index ec4ff8bd2..201bb8827 100644 --- a/src/renderer/src/stories/Table.js +++ b/src/renderer/src/stories/Table.js @@ -698,7 +698,7 @@ export class Table extends LitElement { render() { return html`
-

+

`; diff --git a/src/renderer/src/stories/preview/inspector/InspectorList.js b/src/renderer/src/stories/preview/inspector/InspectorList.js index 9f5e2a759..c2439c2b0 100644 --- a/src/renderer/src/stories/preview/inspector/InspectorList.js +++ b/src/renderer/src/stories/preview/inspector/InspectorList.js @@ -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; } From 28232902b8f3d3671d418cb9dabb350b684f4557 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 20:47:23 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/renderer/src/stories/JSONSchemaForm.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/renderer/src/stories/JSONSchemaForm.js b/src/renderer/src/stories/JSONSchemaForm.js index 84b8f6f62..3283bed10 100644 --- a/src/renderer/src/stories/JSONSchemaForm.js +++ b/src/renderer/src/stories/JSONSchemaForm.js @@ -465,14 +465,11 @@ export class JSONSchemaForm extends LitElement { if (!container) return; const nChildren = container.children.length; - container.remove() + container.remove(); // Track errors and warnings if (type === "errors") this.#nErrors -= nChildren; if (type === "warnings") this.#nWarnings -= nChildren; - - - }; status;