Skip to content
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

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

jkuester
Copy link
Contributor

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!

@jkuester jkuester requested a review from kennsippell May 26, 2022 20:29
@derickl
Copy link
Member

derickl commented Jul 30, 2022

@jkuester There's some similarity to #162

@jkuester
Copy link
Contributor Author

jkuester commented Aug 1, 2022

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).

Copy link
Member

@kennsippell kennsippell left a 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.

Base automatically changed from enketo-uplift to master January 9, 2023 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants