diff --git a/CHANGELOG.md b/CHANGELOG.md index 64407e7a..fc8a6246 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # 1.3.0 +- Enable `nodeLabel` setting to configure the node label used in the Kaoto editor - Upgrade Kaoto 2.2.0-RC3 # 1.2.0 diff --git a/package.json b/package.json index dfbb7a74..4221f58e 100644 --- a/package.json +++ b/package.json @@ -110,6 +110,16 @@ "default": null, "markdownDescription": "URL to a Kaoto catalog. For instance `https://raw.githubusercontent.com/KaotoIO/catalogs/main/catalogs/index.json`. Documentation to generate your own set of catalog is available [here](https://github.com/KaotoIO/kaoto/tree/main/packages/catalog-generator). It requires to reopen the kaoto editors to be effective.", "scope": "window" + }, + "kaoto.nodeLabel": { + "type": "string", + "default": "description", + "markdownDescription": "Node label, which will be used for nodes in the canvas. Can be either `description` or `id`. If `description` is selected, it will be displayed only if it is available, otherwise `id` will be displayed by default.", + "enum": [ + "description", + "id" + ], + "scope": "window" } } }, @@ -183,7 +193,8 @@ "@patternfly/react-core": "5.2.2", "@patternfly/react-icons": "5.2.1", "@patternfly/react-table": "5.2.2", - "@patternfly/react-topology": "5.2.1" + "@patternfly/react-topology": "5.2.1", + "@kaoto/kaoto": "portal:/home/rmartinez/repos/kaoto/packages/ui" }, "packageManager": "yarn@3.6.1" } diff --git a/src/webview/VSCodeKaotoEditorChannelApi.ts b/src/webview/VSCodeKaotoEditorChannelApi.ts index 32fc6588..70a8168f 100644 --- a/src/webview/VSCodeKaotoEditorChannelApi.ts +++ b/src/webview/VSCodeKaotoEditorChannelApi.ts @@ -9,9 +9,12 @@ export class VSCodeKaotoEditorChannelApi extends DefaultVsCodeKieEditorChannelAp } async getVSCodeKaotoSettings(): Promise { + const catalogUrl = await vscode.workspace.getConfiguration('kaoto').get>('catalog.url'); + const nodeLabel = await vscode.workspace.getConfiguration('kaoto').get>('nodeLabel'); + const settingsModel: ISettingsModel = { - catalogUrl: vscode.workspace.getConfiguration('kaoto').get('catalog.url') ?? '', - nodeLabel: NodeLabelType.Description, + catalogUrl: catalogUrl ?? '', + nodeLabel: nodeLabel ?? NodeLabelType.Description, }; return new SettingsModel(settingsModel); diff --git a/yarn.lock b/yarn.lock index a6f26e59..b18fc903 100644 --- a/yarn.lock +++ b/yarn.lock @@ -258,9 +258,9 @@ __metadata: languageName: node linkType: hard -"@kaoto/kaoto@npm:2.2.0-RC3": - version: 2.2.0-RC3 - resolution: "@kaoto/kaoto@npm:2.2.0-RC3" +"@kaoto/kaoto@portal:/home/rmartinez/repos/kaoto/packages/ui::locator=vscode-kaoto%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@kaoto/kaoto@portal:/home/rmartinez/repos/kaoto/packages/ui::locator=vscode-kaoto%40workspace%3A." dependencies: "@kaoto-next/uniforms-patternfly": ^0.6.15 "@kie-tools-core/editor": 0.32.0 @@ -290,14 +290,13 @@ __metadata: react-router-dom: ^6.14.1 simple-zustand-devtools: ^1.1.0 uniforms: 4.0.0-alpha.5 - uniforms-bridge-json-schema: 4.0.0-alpha.5 + uniforms-bridge-json-schema: 4.0.0-alpha.6 usehooks-ts: ^3.0.0 uuid: ^10.0.0 yaml: ^2.3.2 zustand: ^4.3.9 - checksum: de0ad2b00c4b1f8fdcc8cfed08201c583a76c704f69a9e038b3842ca0a91adbf71101c73e8db1e144b91d97d6083b7d78a8209d6fb28c7054860a25ad0655725 languageName: node - linkType: hard + linkType: soft "@kie-tools-core/backend@npm:0.32.0": version: 0.32.0 @@ -7790,19 +7789,19 @@ __metadata: languageName: node linkType: hard -"uniforms-bridge-json-schema@npm:4.0.0-alpha.5": - version: 4.0.0-alpha.5 - resolution: "uniforms-bridge-json-schema@npm:4.0.0-alpha.5" +"uniforms-bridge-json-schema@npm:4.0.0-alpha.6": + version: 4.0.0-alpha.6 + resolution: "uniforms-bridge-json-schema@npm:4.0.0-alpha.6" dependencies: invariant: ^2.0.0 lodash: ^4.0.0 tslib: ^2.2.0 - uniforms: ^4.0.0-alpha.5 - checksum: 7968c9a72f249189050c387a9dad7605d74fc28589c70c7dc323237596e01a56fc77950774eb42b49028a9e3efb747120e2470fec63fd0300f63a555c991d0e3 + uniforms: ^4.0.0-alpha.6 + checksum: 88bb00953ee37894e71e682b94111a701634c465882728897f02cdef0b933311eb983010af2b60a2277f4d10ee5d82b98e2b49caddf0c5300aa6057e3bb77804 languageName: node linkType: hard -"uniforms@npm:4.0.0-alpha.5, uniforms@npm:^4.0.0-alpha.5": +"uniforms@npm:4.0.0-alpha.5": version: 4.0.0-alpha.5 resolution: "uniforms@npm:4.0.0-alpha.5" dependencies: @@ -7815,6 +7814,19 @@ __metadata: languageName: node linkType: hard +"uniforms@npm:^4.0.0-alpha.6": + version: 4.0.0-alpha.6 + resolution: "uniforms@npm:4.0.0-alpha.6" + dependencies: + invariant: ^2.0.0 + lodash: ^4.0.0 + tslib: ^2.2.0 + peerDependencies: + react: ^18.0.0 || ^17.0.0 || ^16.8.0 + checksum: 033057936957755550564e700665f67df1a755be0d270ebd29cbe9cd9fa58571eb1fe3b9e3205e93ad8ef32a714282b46eaae656c38f7c491db9e63c31a54a3f + languageName: node + linkType: hard + "unique-filename@npm:^3.0.0": version: 3.0.0 resolution: "unique-filename@npm:3.0.0"