i-VRESSE / workflow-builder

Graphical interface to build a workflow file
https://i-vresse-workflow-builder.netlify.app/
Apache License 2.0
3 stars 2 forks source link

WIP: save form data onBlur #138

Closed dmijatovic closed 4 months ago

dmijatovic commented 6 months ago

Save all form changes automatically when valid

The data is saved each time the focus on the form element is lost and the data is valid (the form validation has no errors). The form validation during editing the form is therefore enabled.

Some input components, file input for example, have no 'blur' event. However setting on blur event on the form parent element seem to solve the problem and generate blur/lost focus event.

The form buttons, Save, Cancel and Delete are not removed in this version.

This approach should be extensively tested in order to ensure that it does not cause any errors due to premature saving of data.

netlify[bot] commented 6 months ago

Deploy Preview for i-vresse-workflow-builder ready!

Name Link
Latest commit addd737ac659ca92d1835a7dbfa2ed856f3f36b2
Latest deploy log https://app.netlify.com/sites/i-vresse-workflow-builder/deploys/660087c9e26a900008f838f2
Deploy Preview https://deploy-preview-138--i-vresse-workflow-builder.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 46.15385% with 56 lines in your changes are missing coverage. Please review.

Project coverage is 65.64%. Comparing base (2081526) to head (addd737).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138/graphs/tree.svg?width=650&height=150&src=pr&token=ZT000QUOUW&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE)](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE) ```diff @@ Coverage Diff @@ ## main #138 +/- ## ========================================== - Coverage 66.24% 65.64% -0.60% ========================================== Files 57 57 Lines 4076 4154 +78 Branches 338 337 -1 ========================================== + Hits 2700 2727 +27 - Misses 1372 1423 +51 Partials 4 4 ``` | [Flag](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE) | Coverage Δ | | |---|---|---| | [core-unit](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE) | `62.45% <46.15%> (-0.67%)` | :arrow_down: | | [form-unit](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE) | `78.63% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE) | Coverage Δ | | |---|---|---| | [packages/core/src/VisualPanel.tsx](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#diff-cGFja2FnZXMvY29yZS9zcmMvVmlzdWFsUGFuZWwudHN4) | `68.59% <100.00%> (+2.52%)` | :arrow_up: | | [packages/core/src/WorkflowPanel.tsx](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#diff-cGFja2FnZXMvY29yZS9zcmMvV29ya2Zsb3dQYW5lbC50c3g=) | `0.00% <ø> (ø)` | | | [packages/core/src/WorkflowDownloadButton.tsx](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#diff-cGFja2FnZXMvY29yZS9zcmMvV29ya2Zsb3dEb3dubG9hZEJ1dHRvbi50c3g=) | `0.00% <0.00%> (ø)` | | | [packages/core/src/store.ts](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#diff-cGFja2FnZXMvY29yZS9zcmMvc3RvcmUudHM=) | `83.81% <0.00%> (ø)` | | | [packages/core/src/FormActions.tsx](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#diff-cGFja2FnZXMvY29yZS9zcmMvRm9ybUFjdGlvbnMudHN4) | `0.00% <0.00%> (ø)` | | | [packages/core/src/NodePanel.tsx](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#diff-cGFja2FnZXMvY29yZS9zcmMvTm9kZVBhbmVsLnRzeA==) | `84.00% <27.27%> (-16.00%)` | :arrow_down: | | [packages/core/src/GlobalForm.tsx](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#diff-cGFja2FnZXMvY29yZS9zcmMvR2xvYmFsRm9ybS50c3g=) | `59.64% <47.61%> (-40.36%)` | :arrow_down: | | [packages/core/src/NodeForm.tsx](https://app.codecov.io/gh/i-VRESSE/workflow-builder/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=i-VRESSE#diff-cGFja2FnZXMvY29yZS9zcmMvTm9kZUZvcm0udHN4) | `62.50% <37.14%> (-27.75%)` | :arrow_down: |