uyuni-project / uyuni

Source code for Uyuni
https://www.uyuni-project.org/
GNU General Public License v2.0
412 stars 171 forks source link

[ReactJS] Change form components to use tree-like structure for the model #3392

Open cbosdo opened 3 years ago

cbosdo commented 3 years ago

InputBase assumes the model is an object with all the form properties... This led to the creation of flattenModel() and unflattenModel() functions in form-utils.ts.

This approach is rather limiting since hacks may be needed to convert the flat form model into a tree-like structure to be passed or fetched from an HTTP request. Hacks like the ones commented on in https://github.com/uyuni-project/uyuni/pull/3381#discussion_r591319788 would be avoided by allowing to use a tree-like data structure as model.

cbosdo commented 3 years ago

@cbbayburt @Etheryte this could be of interest for you

cbosdo commented 1 year ago

Closing: there are way more urgent things to improve... and maybe someday we would use an external library for such form components