Fix false positive warning about broken component conditionals - #6631
Merged
sergei-maertens merged 2 commits intoSep 9, 2026
Conversation
…etection Conditionals inside editgrids get namespaced with the parent editgrid key, and when building a flattened map of all components, that namespacing logic needs to be replicated to detect broken conditionals. The builder iterComponents keeps track of this relation, so we can opt-in to fully qualified keys. This is not the default, because there are other call sites that rely on the current behaviour where the direct key value (without namespace) is being compared. One other call site checks this map for the unique key generation, and that one *is* a candidate to opt-in to these namespaced keys because editgrids do not technically require child components to have unique keys (but we cannot currently do this yet as our backend works under this assumption, and just opting it would not enable this yet as the global namespace still creates unnecessary restrictions...)
sergei-maertens
commented
Sep 8, 2026
| carry[configuration.component.key] = configuration.component; | ||
| // You can either index by `key` or `dataPath`, where the latter is the fully qualified | ||
| // path with parent keys (for editgrids). | ||
| const flattenComponents = (components, indexBy = 'key') => |
Member
Author
There was a problem hiding this comment.
I really, really miss typescript for these kind of things 😭
Contributor
There was a problem hiding this comment.
Yeah, thats the kind of stuff typescript can nicely gatekeep. Hopefully one day.. 🙏
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6631 +/- ##
=======================================
Coverage 97.25% 97.25%
=======================================
Files 859 859
Lines 33275 33275
Branches 2998 2998
=======================================
Hits 32363 32363
Misses 603 603
Partials 309 309 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
robinmolen
approved these changes
Sep 9, 2026
sergei-maertens
deleted the
issue/6621-false-positive-warning-form-designer
branch
September 9, 2026 12:18
sergei-maertens
added a commit
that referenced
this pull request
Sep 9, 2026
…etection Conditionals inside editgrids get namespaced with the parent editgrid key, and when building a flattened map of all components, that namespacing logic needs to be replicated to detect broken conditionals. The builder iterComponents keeps track of this relation, so we can opt-in to fully qualified keys. This is not the default, because there are other call sites that rely on the current behaviour where the direct key value (without namespace) is being compared. One other call site checks this map for the unique key generation, and that one *is* a candidate to opt-in to these namespaced keys because editgrids do not technically require child components to have unique keys (but we cannot currently do this yet as our backend works under this assumption, and just opting it would not enable this yet as the global namespace still creates unnecessary restrictions...) (cherry picked from commit ca603a1) (cherry picked from commit 21f808c) Backport-of: #6631
Member
Author
|
Backports:
Older versions aren't affected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #6621
Changes
flattenComponentsto return properly namespaced keys for comparisonChecklist
Check off the items that are completed or not relevant.
Impact on features
Dockerfile/scripts
./binfolderCommit hygiene
Documentation