diff --git a/src/renderer/src/stories/Accordion.js b/src/renderer/src/stories/Accordion.js index b4f502944..d4711e82d 100644 --- a/src/renderer/src/stories/Accordion.js +++ b/src/renderer/src/stories/Accordion.js @@ -234,7 +234,8 @@ export class Accordion extends LitElement { }; toOpen = (state = this.open) => { - if (!this.toggleable) return true; // Force open if not toggleable + if (!this.toggleable) + return true; // Force open if not toggleable else if (this.disabled) return false; // Force closed if disabled return state; }; diff --git a/src/renderer/src/stories/FileSystemSelector.js b/src/renderer/src/stories/FileSystemSelector.js index 507ff0bac..831fbe236 100644 --- a/src/renderer/src/stories/FileSystemSelector.js +++ b/src/renderer/src/stories/FileSystemSelector.js @@ -167,9 +167,10 @@ export class FilesystemSelector extends LitElement { // const path = file.filePath ?? file.filePaths?.[0]; this.#handleFiles(results.filePath ?? results.filePaths, type); } else { - let handles = await (type === "directory" - ? window.showDirectoryPicker() - : window.showOpenFilePicker({ multiple: this.multiple }) + let handles = await ( + type === "directory" + ? window.showDirectoryPicker() + : window.showOpenFilePicker({ multiple: this.multiple }) ).catch(() => []); // Call using the same options const result = Array.isArray(handles) ? handles.map(({ name }) => name) : handles.name; diff --git a/src/renderer/src/stories/SimpleTable.js b/src/renderer/src/stories/SimpleTable.js index b69632ddf..4a2b85727 100644 --- a/src/renderer/src/stories/SimpleTable.js +++ b/src/renderer/src/stories/SimpleTable.js @@ -613,7 +613,8 @@ export class SimpleTable extends LitElement { let target = this.data; if (!isResolved) { - if (!this.keyColumn) this.data[rowName] = {}; // Add new row to array + if (!this.keyColumn) + this.data[rowName] = {}; // Add new row to array else { rowName = row; if (!this.#unresolved[rowName]) this.#unresolved[rowName] = {}; // Ensure row exists diff --git a/src/renderer/src/stories/Table.js b/src/renderer/src/stories/Table.js index 6cd754815..51e4c9517 100644 --- a/src/renderer/src/stories/Table.js +++ b/src/renderer/src/stories/Table.js @@ -444,7 +444,8 @@ export class Table extends LitElement { let target = this.data; if (!isResolved) { - if (!this.keyColumn) this.data[rowName] = {}; // Add new row to array + if (!this.keyColumn) + this.data[rowName] = {}; // Add new row to array else { rowName = row; if (!unresolved[rowName]) unresolved[rowName] = {}; // Ensure row exists diff --git a/src/renderer/src/stories/pages/Page.js b/src/renderer/src/stories/pages/Page.js index e1655d055..d1881c2fd 100644 --- a/src/renderer/src/stories/pages/Page.js +++ b/src/renderer/src/stories/pages/Page.js @@ -66,7 +66,8 @@ export class Page extends LitElement { transition === 1 && // Only ensure save for standard forward progression !this.info.states.saved) ) { - if (transition === 1) await this.save(); // Save before a single forward transition + if (transition === 1) + await this.save(); // Save before a single forward transition else { await Swal.fire({ title: "You have unsaved data on this page.", @@ -144,7 +145,8 @@ export class Page extends LitElement { if (!Array.isArray(toRun)) toRun = this.mapSessions(); // Filter the sessions to run - if (typeof original === "number") toRun = randomizeElements(toRun, original); // Grab a random set of sessions + if (typeof original === "number") + toRun = randomizeElements(toRun, original); // Grab a random set of sessions else if (typeof original === "string") toRun = toRun.filter(({ subject }) => subject === original); else if (typeof original === "function") toRun = toRun.filter(original); diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js b/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js index fa4aaa4dd..8efff69c3 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js +++ b/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js @@ -190,12 +190,14 @@ export class GuidedPathExpansionPage extends Page { if (!keepExistingData) { for (let sub in globalResults) { const subRef = results[sub]; - if (!subRef) delete globalResults[sub]; // Delete removed subjects + if (!subRef) + delete globalResults[sub]; // Delete removed subjects else { for (let ses in globalResults[sub]) { const sesRef = subRef[ses]; - if (!sesRef) delete globalResults[sub][ses]; // Delete removed sessions + if (!sesRef) + delete globalResults[sub][ses]; // Delete removed sessions else { const globalSesRef = globalResults[sub][ses]; diff --git a/src/renderer/src/stories/pages/settings/SettingsPage.js b/src/renderer/src/stories/pages/settings/SettingsPage.js index e0ced913b..3cd3ae357 100644 --- a/src/renderer/src/stories/pages/settings/SettingsPage.js +++ b/src/renderer/src/stories/pages/settings/SettingsPage.js @@ -89,11 +89,11 @@ const schema = merge( properties: { DANDI: { title: "DANDI Settings", - ...dandiGlobalSchema + ...dandiGlobalSchema, }, developer: { title: "Developer Settings", - ...developerGlobalSchema + ...developerGlobalSchema, }, }, required: ["DANDI"], @@ -140,7 +140,6 @@ export class SettingsPage extends Page { this.#openNotyf(`Global settings changes saved.`, "success"); }; - render() { this.localState = structuredClone(global.data); @@ -157,7 +156,6 @@ export class SettingsPage extends Page { onThrow, }); - const generatePipelineButton = new Button({ label: "Generate Test Pipelines", onClick: async () => { @@ -179,13 +177,13 @@ export class SettingsPage extends Page { this.#openNotyf(`Generated ${nPipelines} test pipelines`, "success"); }, - }) + }); setTimeout(() => { const testFolderInput = this.form.getInput(["developer", "testing_data_folder"]); - console.log(testFolderInput) + console.log(testFolderInput); testFolderInput.after(generatePipelineButton); - }, 100) + }, 100); return html`
Server Port: ${port}
diff --git a/src/renderer/src/stories/pages/utils.js b/src/renderer/src/stories/pages/utils.js index d793377d7..492de2fb9 100644 --- a/src/renderer/src/stories/pages/utils.js +++ b/src/renderer/src/stories/pages/utils.js @@ -53,7 +53,8 @@ export function merge(toMerge = {}, target = {}, mergeOptions = {}) { } else if (isObject(value)) { if (isObject(targetValue)) target[k] = merge(value, targetValue, mergeOptions); else { - if (mergeOptions.clone) target[k] = merge(value, {}, mergeOptions); // Replace primitive values + if (mergeOptions.clone) + target[k] = merge(value, {}, mergeOptions); // Replace primitive values else target[k] = value; // Replace object values } } else target[k] = value; // Replace primitive values