cern-sis / react-formule

User-friendly, extensible form builder for React based on JSON Schema and RJSF
https://cern-sis.github.io/react-formule/
MIT License
7 stars 3 forks source link

Evaluate analysis_reuse_mode #46

Open miguelgrc opened 1 month ago

miguelgrc commented 1 month ago

analysis_reuse_mode in TabFieldMenu.jsx is used from CAP for an specific use case in the CMS experiment. We need to evaluate if we need to keep it in formule or if it makes sense to get rid of it or to generalize it further to cover more universal use cases.

An ideal option would be to have a way to define and visualize (jsonschema) dependencies so that you can for example say: if this number field has a value > 10 we show this other object. However this is complicated in terms of UI/UX (how do we specify the conditions - jsonschema's if-then-else - and how do we define and show the dependencies in the tree) and would likely require us to manually define all the possible cases (e.g. number field > or < or integer vs float, text field has value x, select field has value x, switch is on or off) for each field type. A possibility would be to use rjsf's additionalProperties and let the users add arbitrary properties, them being responsible of making sure they comply with the jsonschema specification.

This needs refinement, so I propose we consider tackling this later on in the future but not right now.