-
Notifications
You must be signed in to change notification settings - Fork 23
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
Improve developer documentation of submission state and component configuration #4044
Comments
I'd also like a critical review of these service layers - they have grown beyond their initial scope because of certain requirements. Let's figure out what developers need and how we can provide this while keeping the implementation evolvable. |
Refinement: We focus first on documenting existing behaviour and make a list of possible improvements. Focus on the intent of the service layers. Timeboxed on a day + team discussion. @Viicos starts with a rough draft so we can shoot at it. |
Use a single `get_variables` method to access variables. Old behavior (using `variables`/`saved_variables`/`get_prefill_variables`) is still available through arguments. Add docstrings Switch to a normal class, dataclasses are confusing when using field(init=False) Mark some methods are private Add a `load_variables` init arg, to load variables when the wrapper gets created
[#4044] Improve dev documentation regarding forms and submissions
While working on the Objects API registration, I sometimes found it hard to understand how the submission state should be loaded. Here's a couple things I noted:
SubmissionValueVariablesState
(available throughsubmission.load_submission_value_variables_state
) has 11 public methods/attributes, making it hard to find out the right one to use. Naming is sometimes ambiguous (e.g.get_data
). None of them have docstrings.SubmissionValueVariable
name is confusing: it should probably beSubmissionVariableValue
instead. However not sure if it is possible to rename it.I had the same trouble with components configuration:
FormioConfigurationWrapper
class, but is also missing docstrings.{"type": "...", "key": "..."}
structure, it is still unclear to me how that plays with repeating groups and/or nested components. This relates to theFormioData
structure.For this, I would really like having some kind of introduction in the docs to the formio structure, how it is integrated in Open forms and how we manage to extend it.
I would also really like having some kind of "cheat sheet" in docs, stating the recommended ways of dealing with the submission state, the formio configuration wrapper, etc
The text was updated successfully, but these errors were encountered: