From 5224d1a3f66a706007feb922ee2c5ec7f015d589 Mon Sep 17 00:00:00 2001 From: rly Date: Wed, 2 Jul 2025 10:26:02 -0700 Subject: [PATCH 1/2] Add first try at Plexon2RecordingInterface --- src/supported_interfaces.json | 3 +- .../Plexon2RecordingInterface.json | 34 +++++++++++++++++++ stories/pages/SourceData.stories.js | 9 +++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 stories/inputs/interface_schemas/Plexon2RecordingInterface.json diff --git a/src/supported_interfaces.json b/src/supported_interfaces.json index db1023f39c..5f8ee2e132 100644 --- a/src/supported_interfaces.json +++ b/src/supported_interfaces.json @@ -44,5 +44,6 @@ "BrukerTiffSinglePlaneConverter", "BrukerTiffMultiPlaneConverter", "MiniscopeConverter", - "CellExplorerRecordingInterface" + "CellExplorerRecordingInterface", + "Plexon2RecordingInterface" ] diff --git a/stories/inputs/interface_schemas/Plexon2RecordingInterface.json b/stories/inputs/interface_schemas/Plexon2RecordingInterface.json new file mode 100644 index 0000000000..19ae4fb0ce --- /dev/null +++ b/stories/inputs/interface_schemas/Plexon2RecordingInterface.json @@ -0,0 +1,34 @@ +{ + "required": [], + "properties": { + "Plexon2RecordingInterface": { + "properties": { + "file_path": { + "format": "file-path", + "type": "string", + "description": "Path to the .pl2 file." + }, + "verbose": { + "default": true, + "type": "boolean" + }, + "es_key": { + "default": "ElectricalSeries", + "type": "string" + } + }, + "required": [ + "file_path" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "source.schema.json", + "title": "Source data schema", + "description": "Schema for the source data, files and directories", + "version": "0.1.0" +} diff --git a/stories/pages/SourceData.stories.js b/stories/pages/SourceData.stories.js index 841007cf22..8b43dafe00 100644 --- a/stories/pages/SourceData.stories.js +++ b/stories/pages/SourceData.stories.js @@ -44,6 +44,7 @@ import BrukerTiffSinglePlaneConverterSchema from "../inputs/interface_schemas/Br import BrukerTiffMultiPlaneConverterSchema from "../inputs/interface_schemas/BrukerTiffMultiPlaneConverter.json"; import MiniscopeConverterSchema from "../inputs/interface_schemas/MiniscopeConverter.json"; import CellExplorerRecordingInterfaceSchema from "../inputs/interface_schemas/CellExplorerRecordingInterface.json"; +import Plexon2RecordingInterfaceSchema from "../inputs/interface_schemas/Plexon2RecordingInterface.json"; export default { title: "Pages/Guided Mode/Source Data", @@ -142,6 +143,8 @@ globalStateCopy.schema.source_data.properties.MiniscopeConverter = MiniscopeConverterSchema.properties.MiniscopeConverter; globalStateCopy.schema.source_data.properties.CellExplorerRecordingInterface = CellExplorerRecordingInterfaceSchema.properties.CellExplorerRecordingInterface; +globalStateCopy.schema.source_data.properties.Plexon2RecordingInterface = + Plexon2RecordingInterfaceSchema.properties.Plexon2RecordingInterface; const results = globalStateCopy.results; for (let sub in results) { @@ -424,3 +427,9 @@ const CellExplorerRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globa CellExplorerRecordingInterfaceGlobalCopy.interfaces.interface = CellExplorerRecordingInterface; CellExplorerRecordingInterfaceGlobalCopy.schema.source_data = CellExplorerRecordingInterfaceSchema; CellExplorerRecordingInterface.args = { activePage, globalState: CellExplorerRecordingInterfaceGlobalCopy }; + +export const Plexon2RecordingInterface = PageTemplate.bind({}); +const Plexon2RecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +Plexon2RecordingInterfaceGlobalCopy.interfaces.interface = Plexon2RecordingInterface; +Plexon2RecordingInterfaceGlobalCopy.schema.source_data = Plexon2RecordingInterfaceSchema; +Plexon2RecordingInterface.args = { activePage, globalState: Plexon2RecordingInterfaceGlobalCopy }; From afa1002aa6492890062066fa3fb75934dd713b41 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:00:09 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/electron/frontend/core/components/Table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/electron/frontend/core/components/Table.js b/src/electron/frontend/core/components/Table.js index 3882fea2ab..7199c7f90b 100644 --- a/src/electron/frontend/core/components/Table.js +++ b/src/electron/frontend/core/components/Table.js @@ -670,11 +670,11 @@ export class Table extends LitElement { let message = ""; let theme = ""; if (warnings.length) { - (theme = "warning"), (message = warnings.map((error) => error.message).join("\n")); + ((theme = "warning"), (message = warnings.map((error) => error.message).join("\n"))); } else cell.removeAttribute("warning"); if (errors.length) { - (theme = "error"), (message = errors.map((error) => error.message).join("\n")); // Class switching handled automatically + ((theme = "error"), (message = errors.map((error) => error.message).join("\n"))); // Class switching handled automatically } else cell.removeAttribute("error"); if (theme) cell.setAttribute(theme, "");