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

UI feature request: Hide empty fields when reading a material sample record #1

Open
jgrieb opened this issue Jan 20, 2025 · 1 comment
Labels
enhancement New feature or request wanted-by:SGN

Comments

@jgrieb
Copy link
Collaborator

jgrieb commented Jan 20, 2025

Is your feature request related to a problem? Please describe.
Test users at SGN have struggled with the readability in DINA when viewing a single material sample (/collection/material-sample/view?id=*). Often (especially in the collection event part), only a few out of the many available fields actually contain information (see image below). Nevertheless, the user has to scroll down a lot to see the full record information.

Describe the solution you'd like
For every field in the UI in reading mode (/**/view/*), hide the field when it does not contain a value (css: display:none).

Describe alternatives you've considered
Form templates would be an alternative but do not work out completely as a solution, because they are optional, so a record could contain more information than in the fields defined by the form template. Main use case of this feature is to get quickly a full overview of the completeness of a material sample/all its information in the system. Other possible alternatives would be placing some visual markers for example at the top of every section which indicate the percentage of filled out fields, but this would require an in depth discussion on the desired visual design.

Additional context
Example screenshot:

Image

I could provide a proposal implementation in dina-ui for the material sample and collection event views, but would like to hear some feedback first, as I am also aware that this is a visual design decision.

@jgrieb jgrieb added enhancement New feature or request wanted-by:SGN labels Jan 20, 2025
@cgendreau
Copy link
Contributor

There is no doubt that readability can/should be improved.

I think for complete sections like Collecting Event Fields Extension and Attachments in the screenshot it is simply not implemented, there is no real reason why it's not hidden when empty.

For fields within a section it could be slightly different. Usually the challenge is to keep the display consistent when a field is hidden vs when there is a value. If I take the example with Preparations, if we look at 2 records with values in different fields we would expect the fields position on the page to be comparable.

There is also a difference between a field that is not used due to the nature of the collection (where Form Template can be used) and when a field has no value for a specific record. We tend to use the approach to mostly to display all fields that could contain a value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wanted-by:SGN
Projects
None yet
Development

No branches or pull requests

2 participants