As an editor I want to connect the query conditions via OR to fetch the results if any one of the conditions in my query is true.
Problem:
The visual queries currently connect every condition with AND. There is no option to query for conditions connected with OR instead.
Example:
- Query for instance of songs and genre with 'jazz' or 'rock'
Screenshots/mockups:
creating OR conditions
removing OR conditions
Going from OR to AND
BDD
GIVEN a visual query with two or more query conditions
THEN editor can choose either 'OR' / 'AND' concatenation
AND then results are displayed based on the chosen condition.
Acceptance criteria:
- Have option to choose AND / OR conditions to query
- Run the visual query with OR statements
- Default setting of toggle button group is always "and"
- Connector is always centered behind the active button
Notes:
- no change in spacing for layout 4
Sparql Example:
?song wdt:P31 wd:song. { ?song wdt:genre wd:rock. } UNION { ?song wdt:genre wd:jazz. }
Complete SPARQL Based on current Generator:
SELECT DISTINCT ?item ?itemLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". } { SELECT DISTINCT ?item WHERE { ?item (p:P31/ps:P31) wd:Q7366. { ?item (p:P136/ps:P136) wd:Q8341. } UNION { ?item (p:P136/ps:P136) wd:Q11399. } } LIMIT 100 } }