Comment on Improving JSON widget syntax
ghutchis@discuss.avogadro.cc 8 hours ago
Here’s my proposal about a simple visibility syntax:
"Solvent": {
"type": "stringList",
"values": ["Water", "Acetonitrile", "Benzene", "..."],
"visibleWhen": { "key": "Solvation Model", "notEquals": "None" }
},
"UV States": {
"type": "integer",
"enabledWhen": { "key": "Calculation Type", "in": ["TD-DFT", "EOM-CCSD"] }
}
- Two properties:
visibleWhen,enabledWhen - Operators:
equals,notEquals,in,notIn,greaterThan,lessThan. (isCheckedis justequals: true.)
I think that handles a large number of cases (e.g., hiding or disabling parts of an input generator)