From c68760083d08fec6b262265e1918baf057d56c76 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Wed, 9 Oct 2024 14:58:01 +0200 Subject: [PATCH 1/3] Allow to configure node label in catalog Fixes #151 --- CHANGELOG.md | 1 + README.md | 1 + packages/core/README.md | 1 + packages/core/src/CatalogPanel.stories.tsx | 16 ++++ packages/core/src/CatalogPanel.tsx | 2 +- packages/core/src/NodePanel.stories.tsx | 29 +++++++ packages/core/src/NodePanel.tsx | 5 +- packages/core/src/types.ts | 1 + .../generate_haddock3_catalog.py | 1 + .../public/catalog/haddock3.easy.yaml | 74 ++++++++++++++++ .../public/catalog/haddock3.expert.yaml | 85 +++++++++++++++++++ .../public/catalog/haddock3.guru.yaml | 85 +++++++++++++++++++ 12 files changed, 298 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82b0e36b..d1260a26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Configure node by clicking in workflow config toml text ([#20](https://github.com/i-VRESSE/workflow-builder/issues/20)) +- Allow to configure node label in catalog ([#151](https://github.com/i-VRESSE/workflow-builder/issues/151)) ## @i-vresse/wb-core 3.2.1 - 2024-08-26 diff --git a/README.md b/README.md index 04399de4..ac935258 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,7 @@ The catalog is a YAML formatted file which tells the app what nodes are availabl 4. examples: Title and link to example workflows * map with title as key and link as value 5. title: Title of the catalog +6. nodeLabel: Label of the node in the app. Default is 'Node' ### schema diff --git a/packages/core/README.md b/packages/core/README.md index 0b4c2189..65f2c56a 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -64,6 +64,7 @@ function App() { useEffect(() => { const catalog = { title: "Some title", + nodeLabel: "Workflow node", global: { schema: { type: "object", diff --git a/packages/core/src/CatalogPanel.stories.tsx b/packages/core/src/CatalogPanel.stories.tsx index 0f4dd665..181a4786 100644 --- a/packages/core/src/CatalogPanel.stories.tsx +++ b/packages/core/src/CatalogPanel.stories.tsx @@ -108,3 +108,19 @@ export const WithExample: ComponentStory = () => { }) return } + +export const WithNodeLabel: ComponentStory = () => { + const setCatalog = useSetCatalog() + setCatalog({ + title: 'Some title', + nodeLabel: 'My custom node label', + categories: [], + global: { + schema: {}, + uiSchema: {} + }, + nodes: [], + examples: {} + }) + return +} diff --git a/packages/core/src/CatalogPanel.tsx b/packages/core/src/CatalogPanel.tsx index 8517d7ac..bad363c9 100644 --- a/packages/core/src/CatalogPanel.tsx +++ b/packages/core/src/CatalogPanel.tsx @@ -18,7 +18,7 @@ export const CatalogPanel = ({ children }: PropsWithChildren<{}>): JSX.Element = Catalog Loading catalog...}> {children} -

Nodes

+

{catalog.nodeLabel ?? 'Node'}s

    {catalog.categories.map((category) => ( diff --git a/packages/core/src/NodePanel.stories.tsx b/packages/core/src/NodePanel.stories.tsx index 9fae6b4e..ae8ad354 100644 --- a/packages/core/src/NodePanel.stories.tsx +++ b/packages/core/src/NodePanel.stories.tsx @@ -87,3 +87,32 @@ export const NodeSelected: ComponentStory = () => { }, []) return } + +export const CustomNodeLabel: ComponentStory = () => { + const setCatalog = useSetCatalog() + // const { setEditingGlobal } = useWorkflow() + useEffect(() => { + const catalog = prepareCatalog({ + title: 'Some title', + nodeLabel: 'My custom node label', + categories: [], + global: { + schema: { + type: 'object', + properties: { + parameter1: { + type: 'string' + } + }, + additionalProperties: false + }, + uiSchema: {} + }, + nodes: [], + examples: {} + }) + setCatalog(catalog) + // toggleGlobalEdit() + }, []) + return +} diff --git a/packages/core/src/NodePanel.tsx b/packages/core/src/NodePanel.tsx index de09c61c..15a402ad 100644 --- a/packages/core/src/NodePanel.tsx +++ b/packages/core/src/NodePanel.tsx @@ -3,7 +3,7 @@ import React from 'react' import { FormProps } from './FormProps' import { GlobalForm } from './GlobalForm' import { NodeForm } from './NodeForm' -import { useSelectNodeIndex } from './store' +import { useCatalog, useSelectNodeIndex } from './store' /** * Panel which renders the form for the selected node or the global parameters. @@ -11,8 +11,9 @@ import { useSelectNodeIndex } from './store' */ export const NodePanel = ({ fields, widgets }: FormProps): JSX.Element => { const selectedNodeIndex = useSelectNodeIndex() + const { nodeLabel } = useCatalog() - const legend = 'Node' + const legend = nodeLabel ?? 'Node' return (
    diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 367dad19..336d8018 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -53,6 +53,7 @@ export interface IGlobal { export interface ICatalog { title: string + nodeLabel?: string global: IGlobal categories: ICategory[] nodes: ICatalogNode[] diff --git a/packages/haddock3_catalog/generate_haddock3_catalog.py b/packages/haddock3_catalog/generate_haddock3_catalog.py index 39965882..9b9b89ee 100755 --- a/packages/haddock3_catalog/generate_haddock3_catalog.py +++ b/packages/haddock3_catalog/generate_haddock3_catalog.py @@ -534,6 +534,7 @@ def process_level(level_fn: Path, level: str): catalog = { "title": f"Haddock 3 on {level} level", + "nodeLabel": "Module", "categories": categories, 'global': process_global(level), "nodes": nodes, diff --git a/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml b/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml index 798cca92..9d2764ec 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml @@ -1,4 +1,5 @@ title: Haddock 3 on easy level +nodeLabel: Module categories: - name: topology description: HADDOCK3 modules to create topologies. @@ -1946,6 +1947,79 @@ nodes: tomlSchema: resdic: indexed: true +- id: sasascore + category: scoring + label: Surface accessibility scoring module. + description: HADDOCK3 module to perform accessibility scoring. + schema: + type: object + properties: + cutoff: + default: 0.4 + title: relative side chain surface accessibility cutoff + description: relative side chain surface accessibility cutoff + $comment: relative side chain surface accessibility cutoff. Residues with + a relative side chain surface accessibility below this value are considered + buried. + type: number + maximum: 1.0 + minimum: 0.0 + resdic_buried: + default: {} + title: List of residues supposed to be buried + description: List of residues supposed to be buried + $comment: resdic_buried_* is an expandable parameter. You can provide resdic_buried_A, + resdic_buried_B, resdic_buried_C, etc, where the last capital letter is + the chain identifier. + type: object + additionalProperties: + type: array + items: + type: number + format: residue + minItems: 0 + maxItems: 100 + uniqueItems: true + default: [] + propertyNames: + pattern: ^[A-Z]$ + format: chain + maxPropertiesFrom: molecules + resdic_accessible: + default: {} + title: List of residues supposed to be accessible + description: List of residues supposed to be accessible + $comment: resdic_* is an expandable parameter. You can provide resdic_accessible_A, + resdic_accessible_B, resdic_accessible_C, etc, where the last capital letter + is the chain identifier. + type: object + additionalProperties: + type: array + items: + type: number + format: residue + minItems: 0 + maxItems: 100 + uniqueItems: true + default: [] + propertyNames: + pattern: ^[A-Z]$ + format: chain + maxPropertiesFrom: molecules + required: [] + additionalProperties: false + uiSchema: + cutoff: + ui:group: scoring + resdic_buried: + ui:group: analysis + resdic_accessible: + ui:group: analysis + tomlSchema: + resdic_buried: + indexed: true + resdic_accessible: + indexed: true - id: seletop category: analysis label: Select a number of models. diff --git a/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml b/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml index 1379be0c..66a18c42 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml @@ -1,4 +1,5 @@ title: Haddock 3 on expert level +nodeLabel: Module categories: - name: topology description: HADDOCK3 modules to create topologies. @@ -8607,6 +8608,90 @@ nodes: tomlSchema: resdic: indexed: true +- id: sasascore + category: scoring + label: Surface accessibility scoring module. + description: HADDOCK3 module to perform accessibility scoring. + schema: + type: object + properties: + cutoff: + default: 0.4 + title: relative side chain surface accessibility cutoff + description: relative side chain surface accessibility cutoff + $comment: relative side chain surface accessibility cutoff. Residues with + a relative side chain surface accessibility below this value are considered + buried. + type: number + maximum: 1.0 + minimum: 0.0 + resdic_buried: + default: {} + title: List of residues supposed to be buried + description: List of residues supposed to be buried + $comment: resdic_buried_* is an expandable parameter. You can provide resdic_buried_A, + resdic_buried_B, resdic_buried_C, etc, where the last capital letter is + the chain identifier. + type: object + additionalProperties: + type: array + items: + type: number + format: residue + minItems: 0 + maxItems: 100 + uniqueItems: true + default: [] + propertyNames: + pattern: ^[A-Z]$ + format: chain + maxPropertiesFrom: molecules + resdic_accessible: + default: {} + title: List of residues supposed to be accessible + description: List of residues supposed to be accessible + $comment: resdic_* is an expandable parameter. You can provide resdic_accessible_A, + resdic_accessible_B, resdic_accessible_C, etc, where the last capital letter + is the chain identifier. + type: object + additionalProperties: + type: array + items: + type: number + format: residue + minItems: 0 + maxItems: 100 + uniqueItems: true + default: [] + propertyNames: + pattern: ^[A-Z]$ + format: chain + maxPropertiesFrom: molecules + probe_radius: + default: 1.4 + title: Probe radius + description: Probe radius + $comment: Sets the probe radius (in Angstrom) used to compute solvent accessible + surface area. + type: number + maximum: 10.0 + minimum: 0.0 + required: [] + additionalProperties: false + uiSchema: + cutoff: + ui:group: scoring + resdic_buried: + ui:group: analysis + resdic_accessible: + ui:group: analysis + probe_radius: + ui:group: analysis + tomlSchema: + resdic_buried: + indexed: true + resdic_accessible: + indexed: true - id: seletop category: analysis label: Select a number of models. diff --git a/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml b/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml index d923a966..d8de6979 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml @@ -1,4 +1,5 @@ title: Haddock 3 on guru level +nodeLabel: Module categories: - name: topology description: HADDOCK3 modules to create topologies. @@ -9035,6 +9036,90 @@ nodes: tomlSchema: resdic: indexed: true +- id: sasascore + category: scoring + label: Surface accessibility scoring module. + description: HADDOCK3 module to perform accessibility scoring. + schema: + type: object + properties: + cutoff: + default: 0.4 + title: relative side chain surface accessibility cutoff + description: relative side chain surface accessibility cutoff + $comment: relative side chain surface accessibility cutoff. Residues with + a relative side chain surface accessibility below this value are considered + buried. + type: number + maximum: 1.0 + minimum: 0.0 + resdic_buried: + default: {} + title: List of residues supposed to be buried + description: List of residues supposed to be buried + $comment: resdic_buried_* is an expandable parameter. You can provide resdic_buried_A, + resdic_buried_B, resdic_buried_C, etc, where the last capital letter is + the chain identifier. + type: object + additionalProperties: + type: array + items: + type: number + format: residue + minItems: 0 + maxItems: 100 + uniqueItems: true + default: [] + propertyNames: + pattern: ^[A-Z]$ + format: chain + maxPropertiesFrom: molecules + resdic_accessible: + default: {} + title: List of residues supposed to be accessible + description: List of residues supposed to be accessible + $comment: resdic_* is an expandable parameter. You can provide resdic_accessible_A, + resdic_accessible_B, resdic_accessible_C, etc, where the last capital letter + is the chain identifier. + type: object + additionalProperties: + type: array + items: + type: number + format: residue + minItems: 0 + maxItems: 100 + uniqueItems: true + default: [] + propertyNames: + pattern: ^[A-Z]$ + format: chain + maxPropertiesFrom: molecules + probe_radius: + default: 1.4 + title: Probe radius + description: Probe radius + $comment: Sets the probe radius (in Angstrom) used to compute solvent accessible + surface area. + type: number + maximum: 10.0 + minimum: 0.0 + required: [] + additionalProperties: false + uiSchema: + cutoff: + ui:group: scoring + resdic_buried: + ui:group: analysis + resdic_accessible: + ui:group: analysis + probe_radius: + ui:group: analysis + tomlSchema: + resdic_buried: + indexed: true + resdic_accessible: + indexed: true - id: seletop category: analysis label: Select a number of models. From cd2c48903d676473a5c9c9e7a07905ddab949c9c Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Wed, 9 Oct 2024 15:38:47 +0200 Subject: [PATCH 2/3] Dont include sasascore module yet --- .../public/catalog/haddock3.easy.yaml | 73 ---------------- .../public/catalog/haddock3.expert.yaml | 84 ------------------- .../public/catalog/haddock3.guru.yaml | 84 ------------------- 3 files changed, 241 deletions(-) diff --git a/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml b/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml index 9d2764ec..89b539d1 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml @@ -1947,79 +1947,6 @@ nodes: tomlSchema: resdic: indexed: true -- id: sasascore - category: scoring - label: Surface accessibility scoring module. - description: HADDOCK3 module to perform accessibility scoring. - schema: - type: object - properties: - cutoff: - default: 0.4 - title: relative side chain surface accessibility cutoff - description: relative side chain surface accessibility cutoff - $comment: relative side chain surface accessibility cutoff. Residues with - a relative side chain surface accessibility below this value are considered - buried. - type: number - maximum: 1.0 - minimum: 0.0 - resdic_buried: - default: {} - title: List of residues supposed to be buried - description: List of residues supposed to be buried - $comment: resdic_buried_* is an expandable parameter. You can provide resdic_buried_A, - resdic_buried_B, resdic_buried_C, etc, where the last capital letter is - the chain identifier. - type: object - additionalProperties: - type: array - items: - type: number - format: residue - minItems: 0 - maxItems: 100 - uniqueItems: true - default: [] - propertyNames: - pattern: ^[A-Z]$ - format: chain - maxPropertiesFrom: molecules - resdic_accessible: - default: {} - title: List of residues supposed to be accessible - description: List of residues supposed to be accessible - $comment: resdic_* is an expandable parameter. You can provide resdic_accessible_A, - resdic_accessible_B, resdic_accessible_C, etc, where the last capital letter - is the chain identifier. - type: object - additionalProperties: - type: array - items: - type: number - format: residue - minItems: 0 - maxItems: 100 - uniqueItems: true - default: [] - propertyNames: - pattern: ^[A-Z]$ - format: chain - maxPropertiesFrom: molecules - required: [] - additionalProperties: false - uiSchema: - cutoff: - ui:group: scoring - resdic_buried: - ui:group: analysis - resdic_accessible: - ui:group: analysis - tomlSchema: - resdic_buried: - indexed: true - resdic_accessible: - indexed: true - id: seletop category: analysis label: Select a number of models. diff --git a/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml b/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml index 66a18c42..3915d05d 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml @@ -8608,90 +8608,6 @@ nodes: tomlSchema: resdic: indexed: true -- id: sasascore - category: scoring - label: Surface accessibility scoring module. - description: HADDOCK3 module to perform accessibility scoring. - schema: - type: object - properties: - cutoff: - default: 0.4 - title: relative side chain surface accessibility cutoff - description: relative side chain surface accessibility cutoff - $comment: relative side chain surface accessibility cutoff. Residues with - a relative side chain surface accessibility below this value are considered - buried. - type: number - maximum: 1.0 - minimum: 0.0 - resdic_buried: - default: {} - title: List of residues supposed to be buried - description: List of residues supposed to be buried - $comment: resdic_buried_* is an expandable parameter. You can provide resdic_buried_A, - resdic_buried_B, resdic_buried_C, etc, where the last capital letter is - the chain identifier. - type: object - additionalProperties: - type: array - items: - type: number - format: residue - minItems: 0 - maxItems: 100 - uniqueItems: true - default: [] - propertyNames: - pattern: ^[A-Z]$ - format: chain - maxPropertiesFrom: molecules - resdic_accessible: - default: {} - title: List of residues supposed to be accessible - description: List of residues supposed to be accessible - $comment: resdic_* is an expandable parameter. You can provide resdic_accessible_A, - resdic_accessible_B, resdic_accessible_C, etc, where the last capital letter - is the chain identifier. - type: object - additionalProperties: - type: array - items: - type: number - format: residue - minItems: 0 - maxItems: 100 - uniqueItems: true - default: [] - propertyNames: - pattern: ^[A-Z]$ - format: chain - maxPropertiesFrom: molecules - probe_radius: - default: 1.4 - title: Probe radius - description: Probe radius - $comment: Sets the probe radius (in Angstrom) used to compute solvent accessible - surface area. - type: number - maximum: 10.0 - minimum: 0.0 - required: [] - additionalProperties: false - uiSchema: - cutoff: - ui:group: scoring - resdic_buried: - ui:group: analysis - resdic_accessible: - ui:group: analysis - probe_radius: - ui:group: analysis - tomlSchema: - resdic_buried: - indexed: true - resdic_accessible: - indexed: true - id: seletop category: analysis label: Select a number of models. diff --git a/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml b/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml index d8de6979..9711a7a3 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml @@ -9036,90 +9036,6 @@ nodes: tomlSchema: resdic: indexed: true -- id: sasascore - category: scoring - label: Surface accessibility scoring module. - description: HADDOCK3 module to perform accessibility scoring. - schema: - type: object - properties: - cutoff: - default: 0.4 - title: relative side chain surface accessibility cutoff - description: relative side chain surface accessibility cutoff - $comment: relative side chain surface accessibility cutoff. Residues with - a relative side chain surface accessibility below this value are considered - buried. - type: number - maximum: 1.0 - minimum: 0.0 - resdic_buried: - default: {} - title: List of residues supposed to be buried - description: List of residues supposed to be buried - $comment: resdic_buried_* is an expandable parameter. You can provide resdic_buried_A, - resdic_buried_B, resdic_buried_C, etc, where the last capital letter is - the chain identifier. - type: object - additionalProperties: - type: array - items: - type: number - format: residue - minItems: 0 - maxItems: 100 - uniqueItems: true - default: [] - propertyNames: - pattern: ^[A-Z]$ - format: chain - maxPropertiesFrom: molecules - resdic_accessible: - default: {} - title: List of residues supposed to be accessible - description: List of residues supposed to be accessible - $comment: resdic_* is an expandable parameter. You can provide resdic_accessible_A, - resdic_accessible_B, resdic_accessible_C, etc, where the last capital letter - is the chain identifier. - type: object - additionalProperties: - type: array - items: - type: number - format: residue - minItems: 0 - maxItems: 100 - uniqueItems: true - default: [] - propertyNames: - pattern: ^[A-Z]$ - format: chain - maxPropertiesFrom: molecules - probe_radius: - default: 1.4 - title: Probe radius - description: Probe radius - $comment: Sets the probe radius (in Angstrom) used to compute solvent accessible - surface area. - type: number - maximum: 10.0 - minimum: 0.0 - required: [] - additionalProperties: false - uiSchema: - cutoff: - ui:group: scoring - resdic_buried: - ui:group: analysis - resdic_accessible: - ui:group: analysis - probe_radius: - ui:group: analysis - tomlSchema: - resdic_buried: - indexed: true - resdic_accessible: - indexed: true - id: seletop category: analysis label: Select a number of models. From 6afc1b6868b8649b2aead69ce5c6d65c34d21593 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Wed, 9 Oct 2024 15:44:23 +0200 Subject: [PATCH 3/3] Rename nodeLabel to nodeLegend Its has less overlap with a node.label --- CHANGELOG.md | 2 +- README.md | 2 +- packages/core/README.md | 2 +- packages/core/src/CatalogPanel.stories.tsx | 4 ++-- packages/core/src/CatalogPanel.tsx | 2 +- packages/core/src/NodePanel.stories.tsx | 4 ++-- packages/core/src/NodePanel.tsx | 4 ++-- packages/core/src/types.ts | 2 +- packages/haddock3_catalog/generate_haddock3_catalog.py | 2 +- packages/haddock3_catalog/public/catalog/haddock3.easy.yaml | 2 +- packages/haddock3_catalog/public/catalog/haddock3.expert.yaml | 2 +- packages/haddock3_catalog/public/catalog/haddock3.guru.yaml | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1260a26..f4d50f95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Configure node by clicking in workflow config toml text ([#20](https://github.com/i-VRESSE/workflow-builder/issues/20)) -- Allow to configure node label in catalog ([#151](https://github.com/i-VRESSE/workflow-builder/issues/151)) +- Allow to configure node legend in catalog ([#151](https://github.com/i-VRESSE/workflow-builder/issues/151)) ## @i-vresse/wb-core 3.2.1 - 2024-08-26 diff --git a/README.md b/README.md index ac935258..c5da65f3 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ The catalog is a YAML formatted file which tells the app what nodes are availabl 4. examples: Title and link to example workflows * map with title as key and link as value 5. title: Title of the catalog -6. nodeLabel: Label of the node in the app. Default is 'Node' +6. nodeLegend: Legend of the node in the app. Default is 'Node' ### schema diff --git a/packages/core/README.md b/packages/core/README.md index 65f2c56a..ded8425d 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -64,7 +64,7 @@ function App() { useEffect(() => { const catalog = { title: "Some title", - nodeLabel: "Workflow node", + nodeLegend: "Workflow node", global: { schema: { type: "object", diff --git a/packages/core/src/CatalogPanel.stories.tsx b/packages/core/src/CatalogPanel.stories.tsx index 181a4786..5b798b74 100644 --- a/packages/core/src/CatalogPanel.stories.tsx +++ b/packages/core/src/CatalogPanel.stories.tsx @@ -109,11 +109,11 @@ export const WithExample: ComponentStory = () => { return } -export const WithNodeLabel: ComponentStory = () => { +export const WithNodeLegend: ComponentStory = () => { const setCatalog = useSetCatalog() setCatalog({ title: 'Some title', - nodeLabel: 'My custom node label', + nodeLegend: 'My custom node label', categories: [], global: { schema: {}, diff --git a/packages/core/src/CatalogPanel.tsx b/packages/core/src/CatalogPanel.tsx index bad363c9..eef0bbdc 100644 --- a/packages/core/src/CatalogPanel.tsx +++ b/packages/core/src/CatalogPanel.tsx @@ -18,7 +18,7 @@ export const CatalogPanel = ({ children }: PropsWithChildren<{}>): JSX.Element = Catalog Loading catalog...}> {children} -

    {catalog.nodeLabel ?? 'Node'}s

    +

    {catalog.nodeLegend ?? 'Node'}s

      {catalog.categories.map((category) => ( diff --git a/packages/core/src/NodePanel.stories.tsx b/packages/core/src/NodePanel.stories.tsx index ae8ad354..7e65dfbb 100644 --- a/packages/core/src/NodePanel.stories.tsx +++ b/packages/core/src/NodePanel.stories.tsx @@ -88,13 +88,13 @@ export const NodeSelected: ComponentStory = () => { return } -export const CustomNodeLabel: ComponentStory = () => { +export const CustomNodeLegend: ComponentStory = () => { const setCatalog = useSetCatalog() // const { setEditingGlobal } = useWorkflow() useEffect(() => { const catalog = prepareCatalog({ title: 'Some title', - nodeLabel: 'My custom node label', + nodeLegend: 'My custom node label', categories: [], global: { schema: { diff --git a/packages/core/src/NodePanel.tsx b/packages/core/src/NodePanel.tsx index 15a402ad..e2650695 100644 --- a/packages/core/src/NodePanel.tsx +++ b/packages/core/src/NodePanel.tsx @@ -11,9 +11,9 @@ import { useCatalog, useSelectNodeIndex } from './store' */ export const NodePanel = ({ fields, widgets }: FormProps): JSX.Element => { const selectedNodeIndex = useSelectNodeIndex() - const { nodeLabel } = useCatalog() + const { nodeLegend } = useCatalog() - const legend = nodeLabel ?? 'Node' + const legend = nodeLegend ?? 'Node' return (
      diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 336d8018..53c4da0c 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -53,7 +53,7 @@ export interface IGlobal { export interface ICatalog { title: string - nodeLabel?: string + nodeLegend?: string global: IGlobal categories: ICategory[] nodes: ICatalogNode[] diff --git a/packages/haddock3_catalog/generate_haddock3_catalog.py b/packages/haddock3_catalog/generate_haddock3_catalog.py index 9b9b89ee..2fa268ec 100755 --- a/packages/haddock3_catalog/generate_haddock3_catalog.py +++ b/packages/haddock3_catalog/generate_haddock3_catalog.py @@ -534,7 +534,7 @@ def process_level(level_fn: Path, level: str): catalog = { "title": f"Haddock 3 on {level} level", - "nodeLabel": "Module", + "nodeLegend": "Module", "categories": categories, 'global': process_global(level), "nodes": nodes, diff --git a/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml b/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml index 89b539d1..d595e259 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.easy.yaml @@ -1,5 +1,5 @@ title: Haddock 3 on easy level -nodeLabel: Module +nodeLegend: Module categories: - name: topology description: HADDOCK3 modules to create topologies. diff --git a/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml b/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml index 3915d05d..54387bfb 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.expert.yaml @@ -1,5 +1,5 @@ title: Haddock 3 on expert level -nodeLabel: Module +nodeLegend: Module categories: - name: topology description: HADDOCK3 modules to create topologies. diff --git a/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml b/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml index 9711a7a3..9be73675 100644 --- a/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml +++ b/packages/haddock3_catalog/public/catalog/haddock3.guru.yaml @@ -1,5 +1,5 @@ title: Haddock 3 on guru level -nodeLabel: Module +nodeLegend: Module categories: - name: topology description: HADDOCK3 modules to create topologies.