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

FB-05 Node Editor UI - Working w/ function node #14

Merged
merged 19 commits into from
Apr 19, 2024
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b9ea0a3
Begin FB-05
JoshuaCWebDeveloper Apr 12, 2024
b0ce91f
Merge branch 'master' into fb-05-node-editor-ui
JoshuaCWebDeveloper Apr 12, 2024
91c5156
Move overriden methods first in engine.ts
JoshuaCWebDeveloper Apr 12, 2024
ac3c669
Move node drop calculations from flow-canvas to engine
JoshuaCWebDeveloper Apr 12, 2024
95d0cb1
Make connection between react-diagram and flow.slice state two-way
JoshuaCWebDeveloper Apr 17, 2024
6233e75
Finish implementing two-way state with flow-canvas and apply fixes
JoshuaCWebDeveloper Apr 18, 2024
f9f4447
Install and configure redux-persist for flow slice
JoshuaCWebDeveloper Apr 18, 2024
d66792f
Fix current errors in PR
JoshuaCWebDeveloper Apr 18, 2024
d6df467
Correct redux-persist import
JoshuaCWebDeveloper Apr 18, 2024
2eef906
Mock and copy various modules from the Node-RED client for node editing
JoshuaCWebDeveloper Apr 18, 2024
8581d64
Add dom-iterable ts lib
JoshuaCWebDeveloper Apr 18, 2024
52a3451
Import font-awesome
JoshuaCWebDeveloper Apr 18, 2024
40773c3
Store flow node instance in CustomNodeModel config
JoshuaCWebDeveloper Apr 18, 2024
3d414e4
Move Node-RED logic from modules/node to red/
JoshuaCWebDeveloper Apr 18, 2024
b8ea876
New <NodeEditor /> and builder slice for editing nodes
JoshuaCWebDeveloper Apr 18, 2024
1102b92
Write tests for builder
JoshuaCWebDeveloper Apr 18, 2024
e945b11
Fix existing tests
JoshuaCWebDeveloper Apr 19, 2024
148fa36
Write additional tests for flow.logic
JoshuaCWebDeveloper Apr 19, 2024
78186aa
Write additional tests for node redux module
JoshuaCWebDeveloper Apr 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -293,7 +293,7 @@ The backlog is organized by epic, with each task having a unique ID, description

| To Do | In Progress | In Review | Done |
| ----- | ----------- | --------- | ----- |
| FB-05 | | | FB-01 |
| | FB-05 | | FB-01 |
| | | | FB-02 |
| | | | FB-03 |
| | | | FB-04 |
87 changes: 83 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -11,17 +11,24 @@
"type": "module",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-free": "^6.5.2",
"@projectstorm/react-canvas-core": "^7.0.3",
"@projectstorm/react-diagrams": "^7.0.4",
"@reduxjs/toolkit": "^2.2.3",
"dompurify": "^3.1.0",
"i18next": "^23.11.2",
"jquery-i18next": "^1.2.1",
"jsonata": "^2.0.4",
"marked": "^12.0.1",
"monaco-editor": "=0.47.0",
"react": "18.2.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "18.2.0",
"react-is": "18.2.0",
"react-redux": "^9.1.0",
"react-shadow": "^20.4.0",
"redux-persist": "^6.0.0",
"styled-components": "5.3.6"
},
"devDependencies": {
11 changes: 11 additions & 0 deletions packages/flow-client/src/app/app.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '../../vitest-esbuild-compat';
import { render } from '@testing-library/react';
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
@@ -32,6 +33,16 @@ vi.mock('./redux/modules/api/node.api', async importOriginal => {
};
});

vi.mock('redux-persist/integration/react', async importOriginal => {
const real = await importOriginal<
typeof import('redux-persist/integration/react')
>();
return {
...real,
PersistGate: ({ children }: { children: React.ReactNode }) => children,
};
});

vi.mock('./components/flow-canvas/flow-canvas', () => ({
FlowCanvas: () => <div>Flow Container</div>,
}));
5 changes: 4 additions & 1 deletion packages/flow-client/src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import styled from 'styled-components';

import { FlowCanvas } from './components/flow-canvas/flow-canvas'; // Ensure the path is correct
import NodePalette from './components/node-palette/node-palette'; // Import NodePalette
import { NodeEditor } from './components/node-editor';
import { NodePalette } from './components/node-palette/node-palette'; // Import NodePalette

// StyledApp defines the main application container styles.
// It ensures the flow canvas takes up the full viewport height for better visibility.
@@ -21,6 +22,7 @@ const StyledApp = styled.div`
.builder-container {
display: flex;
flex-direction: row;
position: relative;
height: calc(100% - 60px);
.node-palette {
@@ -44,6 +46,7 @@ export function App() {
<div className="builder-container">
<NodePalette />
<FlowCanvas />
<NodeEditor />
</div>
</StyledApp>
);
Loading