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.

Event Timeline

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.

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.

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

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.