Right now, we have a pretty simple syntax for input generators and commands. I’ve been thinking through some possibilities to add some additional capabilities:
- sliders
- vector3 (e.g., translations, rotations, or unit cell vectors, etc.)
- color (bring up the color picker)
- element (bring up the periodic table)
- image (much like we have plain text)
- action buttons
- group / layout arrays (i.e., expanding on the hard-coded theory / basis and charge / multiplicity groupings)
{ "userOptions": [
{ "id": "element", "type": "element", "label": "Element", "default": 6 },
{ "type": "group", "label": "Translate", "layout": "row", "controls": [
{ "id": "tx", "type": "float", "suffix": " Å", "decimals": 2, "default": 0 },
{ "id": "ty", "type": "float", "suffix": " Å", "decimals": 2, "default": 0 },
{ "id": "tz", "type": "float", "suffix": " Å", "decimals": 2, "default": 0 }
]},
{ "id": "frame", "type": "integer", "style": "slider+spin", "minimum": 1, "maximum": 100 },
{ "id": "play", "type": "action", "label": "Play", "icon": "play" },
{ "id": "preview", "type": "image", "source": "centers/4-tet" }
]}
Thoughts? I’d still like to add some level of hide / show and enable / disable syntax, which would be useful in larger dialogs.
Here’s my proposal about a simple visibility syntax:
visibleWhen,enabledWhenequals,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)