Page MenuHomePhabricator

Complex query result configuration options
Closed, ResolvedPublic

Description

AFAICT, the only thing a user can set regarding how a query result will be displayed is which default view is set, using the #defaultView:[NAME] comment.

There are numerous other potential settings which could be useful. For example, in the graph layout one might want to organize things vertically, or turn off the behaviour where when an object is clicked on all properties are displayed. When a timeline is used, one may want to not have Jan 1 - June 1 and June 1 - Dec 1 considered as overlapping, which causes a much messier timeline.

There should be a standard format for more specific settings for query results displays.

Details

Related Gerrit Patches:
wikidata/query/gui : masterAllow passing options to Result Views

Event Timeline

Restricted Application added projects: Wikidata, Discovery. · View Herald TranscriptJan 23 2017, 6:43 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Don't have any objections to that, but I guess we need to specify which options we want, and document them on wiki too.

Jonas triaged this task as High priority.Jun 21 2017, 9:06 AM

So I would like to implement something like:

#defaultView:Graph{arrows:'red', layout:'hierarchical', othterOption:'Foo'}

Which would allow you to pass options to default view.

So I would like to implement something like:

#defaultView:Graph{arrows:'red', layout:'hierarchical', othterOption:'Foo'}

Which would allow you to pass options to default view.

One issue with that: How would it handle settings spanning multiple lines? "#" only comments out one line, and if settings get large/complicated enough to be unwieldy without line breaks, having the constraint could be a problem.

@Jonas just a slight change – I’d prefer standard JSON (not sure if you had something different in mind or the differences are only accidental):

#defaultView:Graph{"arrows":"red", "layout":"hierarchical", "otherOption":"Foo"}

@Yair_rand templates have the same problem (and worse, in my opinion – I think templates are generally longer than result view options), but I don’t think we should let that block us from adding this feature (we can improve both things at the same time later: they’re both query metadata).

@Lucas_Werkmeister_WMDE Seems reasonable. Syntax issues and inconsistency between query metadata types can be resolved later.

Restricted Application added a subscriber: PokestarFan. · View Herald TranscriptJul 25 2017, 11:27 PM

Change 385427 had a related patch set uploaded (by Jonas Kress (WMDE); owner: Jonas Kress (WMDE)):
[wikidata/query/gui@master] Allow passing options to Result Views

https://gerrit.wikimedia.org/r/385427

Jonas moved this task from Backlog to Bugs on the Wikidata Query UI board.

Change 385427 merged by jenkins-bot:
[wikidata/query/gui@master] Allow passing options to Result Views

https://gerrit.wikimedia.org/r/385427

Jonas lowered the priority of this task from High to Low.Nov 16 2017, 12:47 PM
Jonas moved this task from Bugs to Done on the Wikidata Query UI board.
Jonas closed this task as Resolved.Jan 4 2018, 5:43 PM