From 62da07970f0cf6057150147625cff33d212c800f Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 12 Nov 2023 00:55:49 -0500 Subject: [PATCH 1/3] Try to left align text of navbar links --- src/renderer/src/stories/assets/dandi.svg | 2 +- src/renderer/src/stories/assets/exploration.svg | 2 +- src/renderer/src/stories/assets/inspect.svg | 2 +- src/renderer/src/stories/assets/neurosift-logo.svg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/stories/assets/dandi.svg b/src/renderer/src/stories/assets/dandi.svg index ad5cd204a..23dcdd8d1 100644 --- a/src/renderer/src/stories/assets/dandi.svg +++ b/src/renderer/src/stories/assets/dandi.svg @@ -3,7 +3,7 @@ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> Created by potrace 1.16, written by Peter Selinger 2001-2019 diff --git a/src/renderer/src/stories/assets/exploration.svg b/src/renderer/src/stories/assets/exploration.svg index 6e173590c..2b5f3e8fc 100644 --- a/src/renderer/src/stories/assets/exploration.svg +++ b/src/renderer/src/stories/assets/exploration.svg @@ -3,5 +3,5 @@ viewBox="0 -960 960 960" width="22" height="22" - style="margin-right: 30px; margin-bottom: -5px" + style="margin-right: 28px; margin-bottom: -5px" > diff --git a/src/renderer/src/stories/assets/inspect.svg b/src/renderer/src/stories/assets/inspect.svg index 8b59b651e..d788e86ff 100644 --- a/src/renderer/src/stories/assets/inspect.svg +++ b/src/renderer/src/stories/assets/inspect.svg @@ -3,5 +3,5 @@ xmlns="http://www.w3.org/2000/svg" height="25" viewBox="0 -960 960 960" width="25" -style="margin-right: 30px; margin-bottom: -5px" +style="margin-right: 25px; margin-bottom: -5px" > diff --git a/src/renderer/src/stories/assets/neurosift-logo.svg b/src/renderer/src/stories/assets/neurosift-logo.svg index 460120d59..6886c10c2 100644 --- a/src/renderer/src/stories/assets/neurosift-logo.svg +++ b/src/renderer/src/stories/assets/neurosift-logo.svg @@ -6,7 +6,7 @@ xmlns="http://www.w3.org/2000/svg" height="22" width="22" - style="margin-right: 30px; margin-bottom: -5px" + style="margin-right: 28px; margin-bottom: -5px" viewBox="0 0 192.000000 192.000000" preserveAspectRatio="xMidYMid meet" > From c1e4fbea1131f02a5f8f8e3636b6ca09369579f0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 12 Nov 2023 06:03:06 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/renderer/src/stories/JSONSchemaForm.js | 1 - src/renderer/src/stories/pages/guided-mode/data/utils.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/renderer/src/stories/JSONSchemaForm.js b/src/renderer/src/stories/JSONSchemaForm.js index f850f2bc1..beb5e86d1 100644 --- a/src/renderer/src/stories/JSONSchemaForm.js +++ b/src/renderer/src/stories/JSONSchemaForm.js @@ -282,7 +282,6 @@ export class JSONSchemaForm extends LitElement { // Track resolved values for the form (data only) updateData(localPath, value, forceUpdate = false) { - const path = [...localPath]; const name = path.pop(); diff --git a/src/renderer/src/stories/pages/guided-mode/data/utils.js b/src/renderer/src/stories/pages/guided-mode/data/utils.js index 60b38f93e..4618e17ba 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/utils.js +++ b/src/renderer/src/stories/pages/guided-mode/data/utils.js @@ -40,7 +40,6 @@ export function resolveProperties(properties = {}, target, globals = {}) { const props = info.properties; if (!(name in target)) { - if (target.__disabled?.[name]) continue; // Skip disabled properties if (props) target[name] = {}; // Regisiter new interfaces in results From 45950bf151c4d825a4eda8f71618e693423ec4e8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:29:39 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/renderer/src/stories/Table.js | 3 +- .../pages/guided-mode/options/utils.js | 38 ++++++++----------- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/renderer/src/stories/Table.js b/src/renderer/src/stories/Table.js index 3037eba08..9612ac6b6 100644 --- a/src/renderer/src/stories/Table.js +++ b/src/renderer/src/stories/Table.js @@ -432,9 +432,8 @@ export class Table extends LitElement { const initialCellsToUpdate = data.reduce((acc, v) => acc + v.length, 0); table.addHook("afterValidate", (isValid, value, row, prop) => { - const isUserUpdate = initialCellsToUpdate <= validated; - + if (isUserUpdate) { const header = typeof prop === "number" ? colHeaders[prop] : prop; let rowName = this.keyColumn ? rowHeaders[row] : row; diff --git a/src/renderer/src/stories/pages/guided-mode/options/utils.js b/src/renderer/src/stories/pages/guided-mode/options/utils.js index 7057f83e0..68781e8ab 100644 --- a/src/renderer/src/stories/pages/guided-mode/options/utils.js +++ b/src/renderer/src/stories/pages/guided-mode/options/utils.js @@ -24,9 +24,8 @@ export const openProgressSwal = (options, callback) => { export const run = async (url, payload, options = {}) => { const needsSwal = !options.swal && options.swal !== false; - - if (needsSwal) { + if (needsSwal) { if (!("showCancelButton" in options)) { options.showCancelButton = true; options.customClass = { actions: "swal-conversion-actions" }; @@ -36,37 +35,32 @@ export const run = async (url, payload, options = {}) => { options.fetch = { signal: cancelController.signal, - } + }; const popup = await openProgressSwal(options, (result) => { if (!result.isConfirmed) cancelController.abort(); }).then(async (swal) => { - if (options.onOpen) await options.onOpen(swal) - return swal + if (options.onOpen) await options.onOpen(swal); + return swal; }); const element = popup.getHtmlContainer(); - const actions = popup.getActions() - const loader = actions.querySelector(".swal2-loader") + const actions = popup.getActions(); + const loader = actions.querySelector(".swal2-loader"); const container = document.createElement("div"); - container.append(loader) + container.append(loader); element.innerText = ""; Object.assign(container.style, { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'center', - marginBottom: '25px' - }) + display: "flex", + flexDirection: "column", + alignItems: "center", + justifyContent: "center", + marginBottom: "25px", + }); element.appendChild(container); - element.insertAdjacentHTML( - "beforeend", - `
` - ); - - + element.insertAdjacentHTML("beforeend", `
`); } if (!("base" in options)) options.base = "/neuroconv"; @@ -79,8 +73,8 @@ export const run = async (url, payload, options = {}) => { headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), ...(options.fetch ?? {}), - }).then((res) => res.json()) - + }).then((res) => res.json()); + if (needsSwal) Swal.close(); if (results?.message) throw new Error(`Request to ${url} failed: ${results.message}`);