Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag'n'drop of a node to another route is not working and breaking UI in some cases #1903

Open
apupier opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working canvas/visualization Canvas-related issues

Comments

@apupier
Copy link
Member

apupier commented Jan 8, 2025

Describe the Bug

when it is a node at first level in the route, it i simply not working.
When it is from a node inside a container to a node not in a container there is an erro page
image
and there are 2 errors in the console log:

base-node-mapper.ts:77 Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at base-node-mapper.ts:77:41
    at Array.reduce (<anonymous>)
    at BaseNodeMapper.getChildrenFromBranch (base-node-mapper.ts:76:38)
    at BaseNodeMapper.getVizNodesFromChildren (base-node-mapper.ts:60:21)
    at base-node-mapper.ts:41:37
    at Array.forEach (<anonymous>)
    at BaseNodeMapper.getVizNodeFromProcessor (base-node-mapper.ts:40:29)
    at RootNodeMapper.getVizNodeFromProcessor (root-node-mapper.ts:29:19)
    at NodeMapperService.getVizNode (node-mapper.service.ts:23:31)
entities.ts:69 The above error occurred in the <Canvas> component:

    at Canvas (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:391240:19)
    at ErrorBoundary (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:387610:9)
    at CanvasFormTabsProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403263:90)
    at div
    at Visualization (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:394455:112)
    at ActionConfirmationModalContextProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403199:90)
    at CatalogModalProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403321:82)
    at DesignPage (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/…m_pages_Design_router-exports-multiplying-architecture_js.bundle.js:116:78)
    at RenderedRoute (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:351885:5)
    at Outlet (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:352488:26)
    at div
    at div
    at KaotoEditor (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:402775:78)
    at RenderedRoute (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:351885:5)
    at RenderErrorBoundary (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:351832:5)
    at DataRoutes (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:350455:5)
    at Router (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:352509:15)
    at RouterProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:350242:5)
    at RegisterNodeInteractionAddons (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:394542:42)
    at NodeInteractionAddonProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:394662:41)
    at RegisterComponents (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:394499:31)
    at MetadataProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403695:29)
    at Suspense
    at RenderingProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:391104:30)
    at VisibleFlowsProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:404008:78)
    at VisualizationProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:101801:34)
    at CatalogTilesProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403392:77)
    at CatalogLoaderProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403455:94)
    at SchemasLoaderProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403869:94)
    at RuntimeProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403751:94)
    at Provider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:394972:185)
    at https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:402620:74
    at SettingsProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403936:108)
    at EntitiesProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403549:70)
    at SourceCodeProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:403965:88)
    at div
    at EditorEnvelopeViewRef (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:49067:42)
    at I18nDictionariesProvider (https://file+.vscode-resource.vscode-cdn.net/home/apupier/git/vscode-kaoto/dist/webview/KaotoEditorEnvelopeApp.js:50776:55)

the resulting source code looks like:

- route:
   id: route-3558
   from:
     uri: timer:yaml
     parameters:
       period: "1000"
     steps:
       - null
       - to:
           id: to-1775
           uri: arangodb
           parameters: {}
- route:
   id: route-3474
   from:
     id: from-1735
     uri: timer
     parameters:
       period: "1000"
       timerName: template
     steps:
       - to:
           id: to-8101
           uri: activemq
           parameters: {}
       - choice:
           id: choice-1617
           otherwise:
             id: otherwise-2449
             steps:
               - log:
                   id: log-9848
                   message: ${body}
           when:
             - id: when-3224
               steps:
                 - log:
                     id: log-1713
                     message: ${body}
               expression:
                 simple:
                   expression: ${header.foo} == 1

Steps to Reproduce the Bug or Issue

  1. create 2 routes
  2. add a choice to one of them
  3. drag n drop a step from iside a when to the other route

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 0.30.0]
@apupier apupier added the bug Something isn't working label Jan 8, 2025
@apupier apupier changed the title Drag'n'drop of a node to another route is not working Drag'n'drop of a node to another route is not working and breaking UI in some cases Jan 9, 2025
@apupier apupier added the canvas/visualization Canvas-related issues label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working canvas/visualization Canvas-related issues
Projects
Status: New
Development

No branches or pull requests

1 participant