Evaluate all dependencies conjunctively #1678
Open
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.
Fixes an oversight where #704 only correctly applied to scalar dependency values.
Previously, for editors with multiple dependencies, each with multiple possible values, only the last dependency was considered.
Now all dependencies must be fulfilled, bringing the behaviour in-line with the behaviour of scalar dependency values.
Manual Test Case
https://json-editor.github.io/json-editor/?data=N4Ig9gDgLglmB2BnEAuUBXRBTA+vAhgLa75RQBOMARulFsihelgDQgTliHQ5VYBmYcrgAmWADZY6qJqxCZRA/OnFQcAN3zjmDWW0L4AHjjHQAFqgAMbGmQQ5EUUrkJgxqAIxsAxvmwOsJBhYdVwOSCxyKABPAPxybwtGcmY2RDMwAHccSM5yBhAYeDpyfG9YBBA2cO41CD86HANjSXgAcygzHGEysywRVH4tbDZhV1CcIfF/cIhI2HpB4blAwQTcbwRHJem5SDUinEyYETapVBBErG8AayowQyrCzfhxagvBYvxM+i4sAFYnmAqAAra5qcT4aJgWgXeBCAziJ6IK4GVCgYQAR3QMGEAxQAG0QHRHB4cPgniSoGSqJT6FAAEzkumOJm0gC61U4cyiMEWaGJ9LJFIFMTmF3uYEk+HgIAAvmwqTT0cTouKUCBJdLZQrBaTyeT4CJeCqxVgJWApVgZUDoHAkCrTIExPBvHyGKAlczkqk9dSTT6sHLg4r6UyRZ61eaNUU6GdyE9AuhCKgCdYvAz2bqqWzTVGLrGsPHE/Bk6n0yxM9mwwaZcbaaL8xqtdbZWx9vaPSAnUbAm7+Z6ayKCRnOX7c4TR8GQ6r1eBQeD5Yq+sQLWAoI5ShAACzyuVAA===
Observe that previously,
test2_a_and_bwould show fora in (0,1,2) && b in (1,2).Observe that previously and now,
test1_a_and_bonly shows ifa==true && b==true.Observe that now,
test2_a_and_bonly shows ifa in (1,2) && b in (1,2).Template
Why are the tests failing?
Because
tests/README.mdis either wrong, or my machine shows unexpected bevahiour, andI don't care to look deeper into it.Okay, I lied. I looked a little deeper:
helpers.Puppeteer.show = truewhich seems wrong for a headless environment.http://localhost:9100/tests/pages/*but it doesn't.