-
Notifications
You must be signed in to change notification settings - Fork 10
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
MS2: Blockly Editor for Script Tasks #445
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor things, but it looks good
Maybe you could also add a loading animation to the script editor, because it initially opens the menu to select between js and blockly and then it jumps to the correct editor.
...anagement-system-v2/app/(dashboard)/[environmentId]/processes/[processId]/blockly-editor.css
Outdated
Show resolved
Hide resolved
) { | ||
const blocklyEditorRef = useRef<Blockly.WorkspaceSvg | null>(null); | ||
|
||
const validateBlockScript = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to check if a block has an empty field, for example if the setVariable block isn't given a value it produces invalid code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now changed the js-transformation of the setVariable block so that the default value for setting a variable is null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That solves that particular instance of the problem, but I still think we should check for empty fields, I'm going to merge this PR, but I think that we should check them in future
...anagement-system-v2/app/(dashboard)/[environmentId]/processes/[processId]/blockly-editor.tsx
Outdated
Show resolved
Hide resolved
...management-system-v2/app/(dashboard)/[environmentId]/processes/[processId]/script-editor.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail if the variableValue
is false
or undefined
and write null
instead
This comment has been minimized.
This comment has been minimized.
When accessing the value attribute in blockly, the value is always returned as a string by the javascriptGenerator of blockly. |
✅ Successfully created Preview Deployment. |
Summary
Added the visual editor blockly for creating script tasks.
Details