FIO-8731: Update fix to nested hidden components #128
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: