Projects:Grid Display Logic as Read Only/Specs
Display Logic allows to show or hide a field based on some conditions (such as other fields' values). Currently, this logic is implemented when a record is being visualized/edited in form view, but when visualizing/editing in grid view, this logic is not taken into consideration at all.
This causes that users can edit values that should be hidden.
Grid Display Logic
Implementing read only logic in grid view has several technical problems:
- UX: the field cannot be completely removed from grid, as display logic could apply only for some of the records in the grid whereas some others might be still visible. Displaying non visible fields as empty wouldn't be a solution because their value is not empty but hidden.
- Grid Filtering/Sorting: when filtering/sorting by a column with display logic, the records where this field is not visible, shouldn't be taken into consideration. In order to accomplish this behavior, display logic for these fields should be computed in backed when fetching data, as filtering by several columns is allowed this computation could potentially cause a big performance degradation.
- Display logic can be based on fields that are not directly within the record (ex. Auxiliary Inputs). This would require to also fetch, if needed, these values causing, again, a performance degradation.
- Display logic for all records in grid (not only the one being currently edited) should be computed, as potentially any field can have a display logic, this client side computation could be very resource demanding, which would cause the UI to be frozen until it is completed.
Because of all these technical issues, grid display logic implementation has been discarded.
Alternative approach: Display Logic as Read Only
An alternative and pragmatic approach to implement display logic in grid, would be to implement it as read only logic, it would be solely applied when a record is edited in grid view but not for the rest of records in the same grid.
Read Only logic is already implemented both for grid and form views. This implementation would be extended when editing in grid view to handle also display logic in the same manner.
This approach wouldn't have any of the problems mentioned in the section above.
Different UX alternatives:
- 1. Same visualization as current read only: not read only fields are displayed with a grey font, the box around them is removed and any picker to select value they might have is also not seen.
- 2. Fields with read only logic applied would be kept as they are now, fields with display logic would be hidden with a grey box on top.
The decision regarding the implementation of UX is the first option. Display logic will be taking into account in grid view and it will be implemented it as read only logic.