bpmn-io / form-js

View and visually edit JSON-based forms.
https://bpmn.io/toolkit/form-js/
Other
411 stars 104 forks source link

Render an informative div inside dynamic list items with no children #1163

Open Skaiir opened 6 months ago

Skaiir commented 6 months ago

Describe the Bug

Currently it is possible to have a dynamic list with no visual elements (expression). This means we can add a bunch of empty rows to a dynamic list. While this affects the state normally, we would rather simply not allow this.

Further investigations: The issue is more complex as it is also needs to consider cases where hide if causes an empty list element. I think we should accept empty items as part of the debugging process, not caring about whether it stems from expressions, hide if, or any other non-visual element. But instead, we should have a more parseable visually empty state instead of what we see below:

image

This is a bit of a pain to handle right now, we should wait on the render refactors for this.

Steps to Reproduce

  1. Add a dynamic list
  2. Add an expression component inside
  3. Items are empty but not very understandable

Expected Behavior

  1. Items should have some information of the type "no visual elements available in item"
Skaiir commented 1 month ago

Following some more considerations, this should not be tackled until we decouple rendering from form state management. I believe we should have a type of "no visual elements" node rendered instead of strictly treating the whole dynamic list as empty (since this is all dynamic relative to hide-if conditions).

So overall, on hold until refactors.