Per service definition dynamically configurable form (Simple Form) #165
Labels
No labels
API
Billing
UI/UX
dependencies
bug
change
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: servala/servala-portal#165
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stories
As a user, I want to have a good understanding and accessibility of the fields in the service form, but also the full freedom to change all the parameters.
Implementation Notes
We generate the service form from the fields and structure of the OpenAPI spec of the service definition. While this works, the resulting form isn't user-friendly.
Therefore, we introduce a manually crafted (per service definition) form that is displayed and used by default. The currently automatically generated form will then be hidden behind the "Expert" button.
The configuration of this form should be stored as a JSONField
form_configin the ServiceDefinition model.Once a ServiceDefinition record has content in this field, it is used as the default form for service creation or editing.
Example (idea input):
To be discussed: Should we already be able to also configure "tabs" in this configuration, to choose where the field gets displayed?
Refine Dynamic Service Form Handlingto Refine Dynamic Service Form UXRefine Dynamic Service Form UXto Introduce Simple and Expert configuration formIntroduce Simple and Expert configuration formto Per service definition dynamically configurable form (Simple Form)Some fields, like "name" should probably be hard-coded as they are mandatory for evey service. There will be other upcoming fields that will be mandatory for every service.
Would configuration-in-code be alright for hardcoded fields? In that case, I'd put a constant somewhere like this:
And then the form configuration from the issue could look like this:
So we would still name the field in the form configuration, in order to be able to determine ordering/placement, but we wouldn't repeat all other information. Editing the form information would show an error or a warning if a mandatory field is missing. If necessary, the form could even override parts of the mandatory field definition (e.g. offer a more detailed help text, or even explicitly exclude a field in special cases.
Perfect!