Wikidata / SQID

A tool to analyse, browse and query Wikidata
http://tools.wmflabs.org/sqid/
Apache License 2.0
84 stars 17 forks source link

Create a simple SPARQL result list view that can be linked to #33

Closed mkroetzsch closed 8 years ago

mkroetzsch commented 8 years ago

A first spin-off from the current work on a query UI should be a stand-alone view that shows results from a fixed SPARQL query, without providing any UI to change it. This would be used by other views to link to such results. It should be possible to view the full SPARQL query and to go to the query service to edit it, but by default there should simply be a clean result page with the paged list we already have now.

The view can assume that the given SPARQL query has a single result variable of a predefined name (e.g. "entity") rather than having to find it form an arbitrary query string.

arsylum commented 8 years ago

I'm thinking the best way to do this would be to either interact with the queryViewState service from the calling controller before redirecting to /query or implement statefull deeplink support. The latter probably has the benefit of providing useful functionality across more use cases.

Should modifying the query really be impossible? I could imagine making the controlls expandable on demand (I was planning to use an accordion layout for the query view eventually)

mkroetzsch commented 8 years ago

The queries that would be used with this service would at least in part not be of a form that is similar to what the UI would support, hence editing will be very hard. Examples include queries for all (items with) statements that use a certain property in a qualifier or reference.

arsylum commented 8 years ago

Added basic support for this in 81d80e6cd890a271a563a5c7cfa13cd50d934a21 The query is given via the url parameter run, result variable has to be called ?entity.

Example: #/query?run=SELECT%20%3Fentity%0AWHERE%0A%7B%20%3Fentity%20wdt:P31%20wd:Q146%20.%20%7D

textarea and run button are always visible at the moment, I guess they should be collapsed, or completely hidden

mkroetzsch commented 8 years ago

This is used in master and online now for resolving "further results" queries from View. I close this and will create new issues regarding improvements.