You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[🐛 Bug]: A few scenarios lead to loosing of the user input in the workflow editor #3684
To address the issue of losing user input in the workflow editor, you can implement the following strategies:
Track Changes: Ensure that the hasChanges state is used to track unsaved changes in the editor. This is already implemented in the MonacoYAMLEditor component, where the state is updated whenever the editor's content changes.
Save Workflow: Implement a save function that updates the workflow with the current editor content. This is done in the handleSaveWorkflow function, which checks for changes and updates the workflow using the updateWorkflow function.
Prevent Unintended Navigation: Add a browser event listener to warn users about unsaved changes when they attempt to navigate away from the page. This can be done as follows:
Disable Actions: Disable the "Save" button when there are no changes to prevent unnecessary saves. This is already implemented in the MonacoYAMLEditor component by disabling the "Save" button when !hasChanges.
By implementing these strategies, you can help ensure that user input is not lost during interactions with the YAML editor [1].
Activity
dosubot commentedon Feb 25, 2025
To address the issue of losing user input in the workflow editor, you can implement the following strategies:
Track Changes: Ensure that the
hasChangesstate is used to track unsaved changes in the editor. This is already implemented in theMonacoYAMLEditorcomponent, where the state is updated whenever the editor's content changes.Save Workflow: Implement a save function that updates the workflow with the current editor content. This is done in the
handleSaveWorkflowfunction, which checks for changes and updates the workflow using theupdateWorkflowfunction.Prevent Unintended Navigation: Add a browser event listener to warn users about unsaved changes when they attempt to navigate away from the page. This can be done as follows:
Disable Actions: Disable the "Save" button when there are no changes to prevent unnecessary saves. This is already implemented in the
MonacoYAMLEditorcomponent by disabling the "Save" button when!hasChanges.By implementing these strategies, you can help ensure that user input is not lost during interactions with the YAML editor [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other