-
Notifications
You must be signed in to change notification settings - Fork 354
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
feat(DHIS2-17506): enable configuring a section display options #17891
Conversation
4bfd4a1
to
1965747
Compare
Hi @flaminic , could a description be added to this PR, giving some info around why the change is needed, the approach being taken and any future plans regarding display option properties? The PR guide is handy to be aware of. |
1965747
to
c4c7bbe
Compare
Hey, I hope now it's better :) |
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.
Looks good.
As David said we usually try to add at least a test for something surfacing in API but since this is purely for the UI I don't see a need to test this as part of the backend as it should be tested as part of the app using it.
I might have already said it in the PR for Section
that I don't think it is such a good idea adding UI concerns to the backend model. Especially since you want JSON there is the datastore which is a perfect fit to use for settings like these. But that boat has sailed, I guess. I vaguely remember a conversation and that the solution should only be "temporary"? Or it is just me hoping it is 😂
I guess what we have no good support for yet is datastore values that are "auto-cleaned" on deletion of a metadata object. We maybe should build that feature so there are no excuses to not use the datastore :)
Awesome, thanks @jbee . |
41cdb4e
to
b2846fc
Compare
b2846fc
to
cf7e884
Compare
0d6ded1
to
347926c
Compare
Quality Gate passedIssues Measures |
@flaminic we discussed the datastore feature I suggested today in the platform backend meeting and one reason to keep this information in the metadata objects themselves is that often people want this to transfer with the matadata object. So if you were to export a dataset you want the system that imports it to also get the display options. Thus it is better to have it as part of it so this information always stays together. We said that going forward what we will aim for is to consolidate all display related settings in one JSON(B) field like the one added in this PR. |
Amazing thanks @jbee. Tagging @Birkbjo as he might be interested in the above comment. |
This PR adds display configuration option to the data stets, similarly to what was done for the sections metadata. This is needed in order to allow users to select the directions of tabs, if they choose to render a section as tab - Implements DHIS2-17506.
Implementation details
The displayOptions was added as a JSON type to allow us flexibility to add more options without updating the back-end, similarly to what was done for sections. See discussion in this PR for
The change includes a migration to create the new columns (applied in v42)
Background
We are aiming to add more form configuration options as part of an initiative to provide configurations natively to data entry forms to reduce the necessity for custom forms. Users are currently building custom forms as a workaround for shortcomings of the configuration options (ability to transpose, or customise a cell design) or implementation (such to avoid issues with RTL issues).
This is an RFC that describes the approach and the priorities for form configuration options. This is based on a thorough investigation by the functional design team for custom form use cases in real-life implementations. Based on that investigation, the ability to show section tabs vertically were one of the main reasons people choose to go the custom forms route so we're tackling these first.
UI
The ui is still work in progress but it will look like similar to this:
Screen.Recording.2024-06-25.at.16.05.35.mov
Related PRs:
data entry app
maintenance app