-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPIKE] Consider reform alternatives #3192
Comments
I don't think any of ^^ will help because they (1) are abandoned; (2) use jQuery; and/or (3) don't help with nesting. |
This is helpful: https://blog.testdouble.com/posts/2022-08-30-stateless-forms-with-the-rails-attributes-api/ The core problem is how to model associations (and hence nesting) without ActiveRecord. |
Provides a mechanism for dealing with nested ActiveRecord objects; however, does not accommodate nested form objects: https://jaryl.medium.com/disciplined-rails-form-object-techniques-patterns-part-1-23cfffcaf429 But this does: https://jaryl.medium.com/disciplined-rails-form-object-techniques-patterns-part-2-12b8d530143d |
Promising: https://github.com/rootstrap/yaaf |
See https://github.com/sul-dlss/happy-heron/pull/new/form_spike2 What this shows so far: creating and editing multiple level nested forms. What this doesn't show: adding and deleting nested objects, validation of draft forms vs deposit (full validation) forms. |
That seems more understandable than reform to look at |
Spike done. |
While there are conceptual reasons for the form abstraction layer provided by the reform library, in practice the resulting code has proven excessively complex, hard to understand, difficult to debug, rely on magic, require coordination with stimulus controllers, and involve a lot of boilerplate. Therefore, alternative patterns should be considered under this spike.
One possibility: A combination of https://dev.to/jessesbyers/how-to-rails-complex-associations-nested-forms-and-form-helpers-5g5k using the custom writer method and https://www.stimulus-components.com/docs/stimulus-rails-nested-form/
The text was updated successfully, but these errors were encountered: