Skip to content

Commit

Permalink
Rename nodeLabel to nodeLegend
Browse files Browse the repository at this point in the history
Its has less overlap with a node.label
  • Loading branch information
sverhoeven committed Oct 9, 2024
1 parent cd2c489 commit 6afc1b6
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function App() {
useEffect(() => {
const catalog = {
title: "Some title",
nodeLabel: "Workflow node",
nodeLegend: "Workflow node",
global: {
schema: {
type: "object",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/CatalogPanel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ export const WithExample: ComponentStory<typeof CatalogPanel> = () => {
return <CatalogPanel />
}

export const WithNodeLabel: ComponentStory<typeof CatalogPanel> = () => {
export const WithNodeLegend: ComponentStory<typeof CatalogPanel> = () => {
const setCatalog = useSetCatalog()
setCatalog({
title: 'Some title',
nodeLabel: 'My custom node label',
nodeLegend: 'My custom node label',
categories: [],
global: {
schema: {},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/CatalogPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const CatalogPanel = ({ children }: PropsWithChildren<{}>): JSX.Element =
<legend>Catalog</legend>
<React.Suspense fallback={<span>Loading catalog...</span>}>
{children}
<h4>{catalog.nodeLabel ?? 'Node'}s</h4>
<h4>{catalog.nodeLegend ?? 'Node'}s</h4>
<ul style={{ lineHeight: '2.5em' }}>
{catalog.categories.map((category) => (
<CatalogCategory key={category.name} {...category} />
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/NodePanel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ export const NodeSelected: ComponentStory<typeof NodePanel> = () => {
return <NodePanel />
}

export const CustomNodeLabel: ComponentStory<typeof NodePanel> = () => {
export const CustomNodeLegend: ComponentStory<typeof NodePanel> = () => {
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: {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/NodePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<fieldset>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface IGlobal {

export interface ICatalog {
title: string
nodeLabel?: string
nodeLegend?: string
global: IGlobal
categories: ICategory[]
nodes: ICatalogNode[]
Expand Down
2 changes: 1 addition & 1 deletion packages/haddock3_catalog/generate_haddock3_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: Haddock 3 on easy level
nodeLabel: Module
nodeLegend: Module
categories:
- name: topology
description: HADDOCK3 modules to create topologies.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: Haddock 3 on expert level
nodeLabel: Module
nodeLegend: Module
categories:
- name: topology
description: HADDOCK3 modules to create topologies.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: Haddock 3 on guru level
nodeLabel: Module
nodeLegend: Module
categories:
- name: topology
description: HADDOCK3 modules to create topologies.
Expand Down

0 comments on commit 6afc1b6

Please sign in to comment.