diff --git a/CHANGELOG.md b/CHANGELOG.md index d1260a2..f4d50f9 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 ac93525..c5da65f 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 65f2c56..ded8425 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 181a478..5b798b7 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 bad363c..eef0bbd 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 ae8ad35..7e65dfb 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 15a402a..e265069 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 336d801..53c4da0 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 9b9b89e..2fa268e 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 89b539d..d595e25 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 3915d05..54387bf 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 9711a7a..9be7367 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.