ideditor / schema-builder

🏗🏷 Create tagging schemas for iD
ISC License
12 stars 16 forks source link

allow more complex prerequisiteTags for fields #137

Open tyrasd opened 5 months ago

tyrasd commented 5 months ago

Prerequisite tags might be more complex than a simple key=*, 'key=value, 'key!=value or !key filter. Examples might be !key or key=no or key1=* and key2=* or key=value1 or key=value2. It would be useful if such situation could be expressed in the tagging schema.

tordans commented 2 months ago

Another example is the parking:SIDE:orientation=* which should only be visible when parking:SIDE=* is…

tordans commented 2 months ago

We also need the capability to support multiple prerequisiteTags, so the current object should become an array. This will open the question, if the array uses and AND or OR logic. I think only going for AND would be fine. But we would have to test this out with more cases. Update: https://github.com/ideditor/schema-builder/issues/153 needs an OR.

Update: See https://github.com/ideditor/schema-builder/issues/153#issuecomment-2088051411 for a example that uses the array-format with an OR.