reverts adding layout component logical branch to eachComponentData
reverts the isParent check in validation subroutine
adds a hiddenChildren processor to core that adds hidden properties to children
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:
[x] I have completed the above PR template
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation (if applicable)
[x] My changes generate no new warnings
[x] My changes include tests that prove my fix is effective (or that my feature works as intended)
[x] New and existing unit/integration tests pass locally with my changes
[ ] Any dependent changes have corresponding PRs that are listed above
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: