sorgerlab / OMERO.forms

Extension to OMERO.web to enhance metadata input and provide provenance
GNU Affero General Public License v3.0
7 stars 4 forks source link

Example from react-jsonschema-form not working in OMERO form designer #10

Open sebherbert opened 1 year ago

sebherbert commented 1 year ago

Hi,

I've been struggling to create a form using the One Of object. A code that is working perfectly on the test website pointed in the doumentation but is not running on our OMERO form designer page (live validation doesn't update). With Will's help on this image.sc post, I've tracked this bug down to the One Of object to realize that a few of the examples are not running in the forms designer page. To be specific from a quick test,

I believe this could be due to conflicting versions between the designer and the react website?

Starting the forms.designer outputs the following warnings in the browser log:

Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `App`. See https://fb.me/react-warning-keys for more information.
    in li (created by App)
    in App [designer.js:1746:18](https://omerodev.biozentrum.unibas.ch/static/forms/js/designer.js)
Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `Assigner`. See https://fb.me/react-warning-keys for more information.
    in tr (created by Assigner)
    in Assigner (created by App)
    in div (created by App)
    in App [designer.js:1746:18](https://omerodev.biozentrum.unibas.ch/static/forms/js/designer.js)

This was tested on a Firefox from a Linux Mint and OMERO.web 5.9.1. Please let me know if there's anything more I could test or install differently maybe?

ehrenfeu commented 1 year ago

Cc @dpwrussell @ehrenfeu @will-moore

will-moore commented 1 year ago

I'm afraid I don't know if OMERO.forms was ever tested with One Of rules, or what dependencies it's using that might differ between the test website and the forms app. Those warnings are from React.js and are just warnings, so I don't think they're responsible. The forms app is not actively maintained now, so I'm afraid you'll have to manage as best you can.

sebherbert commented 1 year ago

Hi @will-moore. Thanks for the feedback. That's a shame since that seemed to be the only user friendly interface to add many additional information to uploaded images in a controlled and reactive way. We'll do our best.