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

Dont make checkbox required always #98

Closed sverhoeven closed 2 years ago

sverhoeven commented 2 years ago

Fixes #67

To test

  1. 1st way repeat steps in #67
    1. Goto haddock3-download app at https://app.netlify.com/sites/wonderful-noether-53a9e8/deploys/62d930fd6466c80009103c7d
    2. Instead of using netlify hosted app you can also run locally from root of repo run yarn && yarn dev and goto http://localhost:3000
    3. Add mdref node to workflow
    4. Expand molecule subform
    5. Press + button, this will add an unchecked checklbox
    6. Submit form
    7. Switch to text mode of workflow to see mol_shape_1 = false, before this PR it would have an invalid form.
  2. 2nd way with story book
    1. from root of repo run yarn storybook
    2. Goto http://localhost:6007
    3. In left sidebar expand Checkbox
    4. Select Unchecked Checkbox In Array Is Submiteable story
    5. Press Submit button, should not complain and in actions tab have a new entry with onSubmit[0].formData key have value [false, true]. The story presses the submit button when opening the story, so you will see 2 actions.
  3. 3rd way with unit test
    1. Change to packages/form/ and run yarn test
    2. It should run packages/form/src/IvresseCheckBoxWidget.test.tsxand pass.

~This PR also adds vitest to form package and upgrades rjsf to latest version.~ Moved to #100

netlify[bot] commented 2 years ago

Deploy Preview for wonderful-noether-53a9e8 ready!

Name Link
Latest commit f57075dd68022fd430a9f6d661f4e797c5213f02
Latest deploy log https://app.netlify.com/sites/wonderful-noether-53a9e8/deploys/62e3944d2c526000084a248c
Deploy Preview https://deploy-preview-98--wonderful-noether-53a9e8.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 settings.

sverhoeven commented 2 years ago

This implementation blocks you from having a checkbox that must be checked to submit form. For example to agree to terms like a license.

sverhoeven commented 2 years ago

Thanks for reviewing