feat: added ReactFlow-based node graph #11

Merged
j.gerla merged 68 commits from feat/visual-programming-interface into dev 2025-10-28 11:59:03 +00:00
j.gerla commented 2025-10-12 12:10:20 +00:00 (Migrated from git.science.uu.nl)

Added ReactFlow to dependencies (@xyflow/react). Added a basic ReactFlow template to test the functionality of ReactFlow and to build the visual programming UI on top of. Also created a basic dummy implementation to start editor development.

The current features include:

  • state management using Zustand: can be tested by seeing if editor behavior works as expected, and nodes can be moved, connected and deleted.
  • Nodes can be added to the Graph from a drag and drop panel at the top of the editor window: to test, left-click and drag a node from the panel into the editor window, then release the left mouse button to drop it into the graph.
  • A node can be moved inside the graph by dragging it: to drag, press and hold the left mouse button over a node inside the graph, and move the mouse to drag the node around
  • A node can be connected to another node by creating an edge. To do this, left-click on a handle and release the left mouse button when hovering over a different handle. Connections flow from source to target nodes; a target handle cannot link to another target handle.
  • A node can be deleted by clicking on the node inside the graph, which opens up the node toolbar. This currently contains one button, namely the delete button; click this to delete the selected node. Start and End nodes cannot be deleted, thus the delete button will be greyed out when a Start or End node is selected.
  • To remove an edge between two nodes left left-click close (but not on) one of its connected handles and drag the edge away from the node, then release the left mouse button to drop the edge and remove the connection from the graph.

to run the unit tests use "npx jest" in the terminal

ref: N25B-114

Added ReactFlow to dependencies (@xyflow/react). Added a basic ReactFlow template to test the functionality of ReactFlow and to build the visual programming UI on top of. Also created a basic dummy implementation to start editor development. The current features include: * state management using Zustand: can be tested by seeing if editor behavior works as expected, and nodes can be moved, connected and deleted. * Nodes can be added to the Graph from a drag and drop panel at the top of the editor window: to test, left-click and drag a node from the panel into the editor window, then release the left mouse button to drop it into the graph. * A node can be moved inside the graph by dragging it: to drag, press and hold the left mouse button over a node inside the graph, and move the mouse to drag the node around * A node can be connected to another node by creating an edge. To do this, left-click on a handle and release the left mouse button when hovering over a different handle. Connections flow from source to target nodes; a target handle cannot link to another target handle. * A node can be deleted by clicking on the node inside the graph, which opens up the node toolbar. This currently contains one button, namely the delete button; click this to delete the selected node. Start and End nodes cannot be deleted, thus the delete button will be greyed out when a Start or End node is selected. * To remove an edge between two nodes left left-click close (but not on) one of its connected handles and drag the edge away from the node, then release the left mouse button to drop the edge and remove the connection from the graph. to run the unit tests use "npx jest" in the terminal ref: N25B-114
j.gerla commented 2025-10-12 12:11:04 +00:00 (Migrated from git.science.uu.nl)

assigned to @j.gerla

assigned to @j.gerla
0950726 commented 2025-10-21 09:52:41 +00:00 (Migrated from git.science.uu.nl)
        <Link to={"/editor"}>Editor →</Link>

Make this capitalized like other links (sorry, nit pick)

```suggestion:-0+0 <Link to={"/editor"}>Editor →</Link> ``` Make this capitalized like other links (sorry, nit pick)
0950726 commented 2025-10-21 09:56:30 +00:00 (Migrated from git.science.uu.nl)

This link is no longer necessary, cause the main App defines a header with a link to home.

After this link is removed, the only thing left will be <VisProgUI>. I suggest putting the contents of ./components/VisProgUI.tsx to this file, making code navigation easier.

This link is no longer necessary, cause the main `App` defines a header with a link to home. After this link is removed, the only thing left will be `<VisProgUI>`. I suggest putting the contents of `./components/VisProgUI.tsx` to this file, making code navigation easier.
0950726 commented 2025-10-21 10:15:23 +00:00 (Migrated from git.science.uu.nl)

We should avoid using inline styles. Performance is worse, and some of this can be done very easy with the CSS classes in App.css. Namely: padding, display, flexDirection and gap can be covered with just three classes, like className="flex-col gap-lg padding-md".

We should avoid using inline styles. [Performance is worse](https://legacy.reactjs.org/docs/faq-styling.html#are-inline-styles-bad), and some of this can be done very easy with the CSS classes in `App.css`. Namely: `padding`, `display`, `flexDirection` and `gap` can be covered with just three classes, like `className="flex-col gap-lg padding-md"`.
0950726 commented 2025-10-21 10:20:26 +00:00 (Migrated from git.science.uu.nl)

Make this a .module.css file to ensure we get no contamination/conflicts/confusion when two classes (coincidentally) use the same CSS classname.

Also requires rewriting the references to these classes, like classname={styles.outerEditorContainer} instead of classname="outer-editor-container".

Make this a `.module.css` file to ensure we get no contamination/conflicts/confusion when two classes (coincidentally) use the same CSS classname. Also requires rewriting the references to these classes, like `classname={styles.outerEditorContainer}` instead of `classname="outer-editor-container"`.
0950726 commented 2025-10-21 10:43:20 +00:00 (Migrated from git.science.uu.nl)

requested review from @0950726

requested review from @0950726
j.gerla commented 2025-10-21 11:59:46 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132616&start_sha=5cbcf30f6838c25ef3f44e5162c455c7765c92cd#520aaaf3bcf49e84fdfead5bdc2b3e40848b9d1d_15_15)
j.gerla commented 2025-10-21 11:59:47 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 9235b82f - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>9235b82f - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132616&start_sha=5cbcf30f6838c25ef3f44e5162c455c7765c92cd)
j.gerla commented 2025-10-21 16:48:28 +00:00 (Migrated from git.science.uu.nl)

Add tests to the code

Add tests to the code
j.gerla commented 2025-10-21 18:31:32 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132705&start_sha=9235b82fa9cf19c67d28d31bea394406794c396e#f9a16de64e681892ee0aa751c23f0004b0d32c06_16_12)
j.gerla commented 2025-10-21 18:31:33 +00:00 (Migrated from git.science.uu.nl)

changed this file in version 3 of the diff

changed this file in [version 3 of the diff](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132705&start_sha=9235b82fa9cf19c67d28d31bea394406794c396e#b35ca2386c53d812677437fa9056bcb01f29d134)
j.gerla commented 2025-10-21 18:31:33 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 7e739ef1 - refactor: changes from feedback on merge request

Compare with previous version

added 1 commit <ul><li>7e739ef1 - refactor: changes from feedback on merge request</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132705&start_sha=9235b82fa9cf19c67d28d31bea394406794c396e)
j.gerla commented 2025-10-22 09:50:51 +00:00 (Migrated from git.science.uu.nl)

added 6 commits

  • 7e739ef1...6c5ccbdd - 4 commits from branch dev
  • f8c152ec - Merge remote-tracking branch 'origin/dev' into feat/visual-programming-interface
  • af7eb5ee - build: added moved depencies for merge with dev

Compare with previous version

added 6 commits <ul><li>7e739ef1...6c5ccbdd - 4 commits from branch <code>dev</code></li><li>f8c152ec - Merge remote-tracking branch &#39;origin/dev&#39; into feat/visual-programming-interface</li><li>af7eb5ee - build: added moved depencies for merge with dev</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132733&start_sha=7e739ef106444d7a2d466f0dbdd15b97b4cb00d2)
j.gerla commented 2025-10-22 09:53:59 +00:00 (Migrated from git.science.uu.nl)

added 3 commits

  • 5a6bcb92 - build: moved dependencies for merge with dev
  • d3c327c1 - fixup! build: moved dependencies for merge with dev
  • 1f56eff9 - Merge remote-tracking branch 'origin/feat/visual-programming-interface' into...

Compare with previous version

added 3 commits <ul><li>5a6bcb92 - build: moved dependencies for merge with dev</li><li>d3c327c1 - fixup! build: moved dependencies for merge with dev</li><li>1f56eff9 - Merge remote-tracking branch &#39;origin/feat/visual-programming-interface&#39; into...</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132735&start_sha=af7eb5ee73fc97e5e4138c0c43c31db382134845)
j.gerla commented 2025-10-22 09:54:01 +00:00 (Migrated from git.science.uu.nl)

marked this merge request as draft from d3c327c100

marked this merge request as **draft** from d3c327c10019dc561d7f971f94fe2e097641ee4b
j.gerla commented 2025-10-22 10:23:55 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • e880e00b - style: changed VisProgUI.css to VisProgUI.module.css and updated relevant references

Compare with previous version

added 1 commit <ul><li>e880e00b - style: changed VisProgUI.css to VisProgUI.module.css and updated relevant references</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132738&start_sha=1f56eff9a851701bb365e26b4862b907b58f4345)
j.gerla commented 2025-10-22 10:32:10 +00:00 (Migrated from git.science.uu.nl)

resolved all threads

resolved all threads
j.gerla commented 2025-10-22 10:34:55 +00:00 (Migrated from git.science.uu.nl)

changed this line in version 7 of the diff

changed this line in [version 7 of the diff](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132741&start_sha=e880e00b6d82b0d98d31ab17011087d1f8394d20#9044be8182ef63a94a5a363663be68dec01b1adb_154_144)
j.gerla commented 2025-10-22 10:34:55 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • b365a875 - style: moved inline styles to VisProgUI.module.css and used some existing...

Compare with previous version

added 1 commit <ul><li>b365a875 - style: moved inline styles to VisProgUI.module.css and used some existing...</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132741&start_sha=e880e00b6d82b0d98d31ab17011087d1f8394d20)
j.gerla commented 2025-10-22 10:39:41 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 34dd48ec - fix: updated jest.config.js to allow for folders in the test directory

Compare with previous version

added 1 commit <ul><li>34dd48ec - fix: updated jest.config.js to allow for folders in the test directory</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132747&start_sha=b365a8754e8222a0986687eb7c5ffa2a18d554f2)
j.gerla commented 2025-10-22 13:12:38 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 6a655f62 - style: moved all logic from VisProgUI.tsx to VisProg.tsx and the css from...

Compare with previous version

added 1 commit <ul><li>6a655f62 - style: moved all logic from VisProgUI.tsx to VisProg.tsx and the css from...</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132777&start_sha=34dd48ecb64dcf29362fec420f5c89cea4f18522)
j.gerla commented 2025-10-22 13:44:27 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 3bd1aa99 - chore: added setupFlowTests.ts for ReactFlow specific testing

Compare with previous version

added 1 commit <ul><li>3bd1aa99 - chore: added setupFlowTests.ts for ReactFlow specific testing</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132793&start_sha=6a655f62f8347858f072adb99ac20669ee0447f3)
j.gerla commented 2025-10-22 14:30:31 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 8513be5a - test: added test for onConnect event

Compare with previous version

added 1 commit <ul><li>8513be5a - test: added test for onConnect event</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132811&start_sha=3bd1aa99e3f6f15c0e7bb5c4cf04242ff756e725)
j.gerla commented 2025-10-25 11:54:27 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • b64d4fbd - chore: added test coverage collection

Compare with previous version

added 1 commit <ul><li>b64d4fbd - chore: added test coverage collection</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132936&start_sha=8513be5a5631a19461e455ce1974c8db94432027)
j.gerla commented 2025-10-25 11:57:43 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • ea79de5e - style: restructured and renamed VisProg.test.tsx to VisProgStores.test.tsx

Compare with previous version

added 1 commit <ul><li>ea79de5e - style: restructured and renamed VisProg.test.tsx to VisProgStores.test.tsx</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132937&start_sha=b64d4fbd01a3c10d80711338ae67cd3ae7f743c6)
j.gerla commented 2025-10-25 12:59:41 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 023e1d2b - test: Added tests for setNodes and setEdges.

Compare with previous version

added 1 commit <ul><li>023e1d2b - test: Added tests for setNodes and setEdges.</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132940&start_sha=ea79de5ee54ad141967bdb65dde5b329d0862597)
j.gerla commented 2025-10-25 13:17:20 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 42357217 - test: Added test for onReconnect

Compare with previous version

added 1 commit <ul><li>42357217 - test: Added test for onReconnect</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132941&start_sha=023e1d2b8b4a06f1afb9b0f0957232cad3127e41)
j.gerla commented 2025-10-25 13:27:56 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 2e2bd587 - test: Added test for onReconnectStart

Compare with previous version

added 1 commit <ul><li>2e2bd587 - test: Added test for onReconnectStart</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132942&start_sha=42357217e583f402ba6a3659dbbd370ac0c1f849)
j.gerla commented 2025-10-25 13:34:56 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 1f2b57fb - chore: updated setupFlowTests.ts to properly handle resetting of the flowState for each test

Compare with previous version

added 1 commit <ul><li>1f2b57fb - chore: updated setupFlowTests.ts to properly handle resetting of the flowState for each test</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132943&start_sha=2e2bd587d09c90b71ed6e544758018a3ec8dc1c0)
j.gerla commented 2025-10-25 13:37:34 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 48dabb86 - test: updated the onReconnectStart test to reflect updated setupFlowTest.ts

Compare with previous version

added 1 commit <ul><li>48dabb86 - test: updated the onReconnectStart test to reflect updated setupFlowTest.ts</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132944&start_sha=1f2b57fbcdd0746da1050f03fe37a7598eccac50)
j.gerla commented 2025-10-25 14:07:57 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • c8484d28 - test: added tests for onReconnectEnd

Compare with previous version

added 1 commit <ul><li>c8484d28 - test: added tests for onReconnectEnd</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132945&start_sha=48dabb86e0df80e2118fe6db82e8efd632f4e913)
j.gerla commented 2025-10-25 14:58:40 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 8c698d1f - refactor: moved delete logic out of the toolbar declaration and into the FlowStore.

Compare with previous version

added 1 commit <ul><li>8c698d1f - refactor: moved delete logic out of the toolbar declaration and into the FlowStore.</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132948&start_sha=c8484d28e5a357fdfaf3a2b42e193973a8b83527)
j.gerla commented 2025-10-25 15:14:52 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 80386741 - test: added tests for deleteNode function

Compare with previous version

added 1 commit <ul><li>80386741 - test: added tests for deleteNode function</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132949&start_sha=8c698d1f8e0e1b65eb5d486d94a5944dbb3a3ca2)
j.gerla commented 2025-10-25 16:13:03 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • e1d131e6 - feat: updated the phase node creation to better assign ids to new phase and norm nodes.

Compare with previous version

added 1 commit <ul><li>e1d131e6 - feat: updated the phase node creation to better assign ids to new phase and norm nodes.</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132950&start_sha=803867416793e59ad8989c49aefd7688768d72d6)
j.gerla commented 2025-10-25 16:30:00 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • b7cd925c - refactor: moved addNode function outside the handleNode definition

Compare with previous version

added 1 commit <ul><li>b7cd925c - refactor: moved addNode function outside the handleNode definition</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132951&start_sha=e1d131e64231b10ef0e2f91348919e0ab58fdbf1)
j.gerla commented 2025-10-25 16:42:05 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • a0324479 - refactor: removed start and end nodes from the addNode functionality as they...

Compare with previous version

added 1 commit <ul><li>a0324479 - refactor: removed start and end nodes from the addNode functionality as they...</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132952&start_sha=b7cd925c2c69a095ffc04f279260a908f08d7d5b)
j.gerla commented 2025-10-25 16:58:47 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • e1d6b08a - refactor: removed start and end nodes from the addNode functionality as they...

Compare with previous version

added 1 commit <ul><li>e1d6b08a - refactor: removed start and end nodes from the addNode functionality as they...</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132953&start_sha=a0324479e6a1ba05aebbe2e964b5f8fc70bb5eec)
j.gerla commented 2025-10-25 18:53:17 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

Compare with previous version

added 1 commit <ul><li>9bfc39af - test: added test</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132959&start_sha=e1d6b08a1c9faafca213442c28c5b179b4d910f3)
j.gerla commented 2025-10-25 18:59:46 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 416025bf - test: added test for nodeId generation

Compare with previous version

added 1 commit <ul><li>416025bf - test: added test for nodeId generation</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132960&start_sha=9bfc39afa10399a979697be93f73b8facd6d4a2d)
j.gerla commented 2025-10-25 19:09:30 +00:00 (Migrated from git.science.uu.nl)

added 1 commit

  • 7b12ae1f - test: added test for addNode error

Compare with previous version

added 1 commit <ul><li>7b12ae1f - test: added test for addNode error</li></ul> [Compare with previous version](/ics/sp/2025/n25b/pepperplus-ui/-/merge_requests/11/diffs?diff_id=132962&start_sha=416025bf3fb200413803872a22f0d4717c407ad1)
j.gerla commented 2025-10-25 19:14:20 +00:00 (Migrated from git.science.uu.nl)

marked this merge request as ready

marked this merge request as **ready**
j.gerla commented 2025-10-25 19:14:21 +00:00 (Migrated from git.science.uu.nl)

changed the description

changed the description
0950726 (Migrated from git.science.uu.nl) merged commit 52b839ae51 into dev 2025-10-28 11:59:04 +00:00
0950726 commented 2025-10-28 11:59:06 +00:00 (Migrated from git.science.uu.nl)

mentioned in commit 52b839ae51

mentioned in commit 52b839ae51d377ebc63231ceee24da5cf87f222f
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: pepperplus/pepperplus-ui#11