-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add Harness.loadContactForm
method
#174
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Kenn Sippell <[email protected]>
Yes @derickl I would say these are related, but what I am trying to achieve with this PR is a bit different. If I am understanding it correctly, #162 supports loading and filling both create and edit contact forms. This PR, on the other hand, is for separating the loading from the filling so there is a separate public method that can be used to just load contact forms (without filling them). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you mention - we had previously deprecated the loadForm interface as part of #40.
These interfaces seem useful but confusing.
Feels weird to make a PR just to add a new deprecated interface, but I'm not really sure what else to consider here. Should we "undeprecate" both of these interfaces if they prove useful and we are planning to keep them?
Approving as-written since this is pragmatic and adds consistency/symetry. But it does feel a bit like kicking the can with the deprecated tag.
As a part of the form validation that I am working on in the upgrade helper for the Enketo uplift, I am trying to initialize each of the forms in the config to check for runtime errors (and its working 🎉). I am not trying to submit any answers to questions, but I am just using the test-harness to init the forms in a "real" Enketo context.
There is the existing (deprecated)
loadForm
method for loading app forms, but there is no functionality exposed for doing the same for contact forms.Obviously it seems less than ideal to build functionality off of deprecated methods, so if you have any thoughts about a better way to do this, I am all ears! What I have right now in this PR is the minimum changes that I thought were necessary to achieve what I needed. But, I am happy to work on a more sophisticated solution if we can come up with something that makes more sense!