formio / core

The Form.io Core Javascript Framework
https://formio.github.io/core
MIT License
9 stars 6 forks source link

FIO-8731: Update fix to nested hidden components #128

Closed brendanbond closed 3 months ago

brendanbond commented 3 months ago

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8731

Description

This commit:

This is not the most ideal solution for two reasons:

(a) it continues ad-hoc iteration over the components tree, which has the potential to be a bottleneck in situations where there are many levels of nested hidden components (there is no mechanism to avoid repeating the hiddenChildren processor). It would better to eliminate this ad-hoc iteration entirely to go with some approach that allowed processors to pass values down to child nested components. (Note that we were already doing this, this PR just codifies it into its own processor.)

(b) Although less of a concern, I can imagine a scenario in which some logic in some deeply nested component actually un-hides the child components, in which case you could potentially run into a scenario where the grand parent component is hidden but one or more children are un-hidden.

However, this issue is blocking a major release, so I propose that we merge this change and file a tech-debt ticket to resolve this issue in a better way.

Breaking Changes / Backwards Compatibility

n/a

Dependencies

n/a

How has this PR been tested?

Automated tests added for the previous solution for this ticket pass, as well as upstream OSS formio tests.

Checklist: