Page MenuHomePhabricator

Render images (and other non-text data) in the table view of query results
Open, Needs TriagePublic

Description

Right now if I select an image as one of the fields selected for display on a SPARQL query in the Wikidata Query Service, the default result view (the table view) only shows a link to the image page. I think it would be more intuitive for images to be rendered within the table cells, along with the remaining data.

The image grid view is too focused on showcasing primarily the images -- the arrangement stops being regular, which makes it hard to view the non-image fields of the results since they're not aligned, the text fields are quite small compared to the images; and there's no indication of what value corresponds to what field (unlike the table which has headers).

A middle ground would work better to display non-text data while preserving the tabular format, and not prioritizing one of the result fields over the others. Perhaps, to preserve the current functionality of the table view, a new "rich table" view could be added, that includes rendering for images, geocoordinates, musical notation, geographic shapes, etc.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

A middle ground would work better to display non-text data while preserving the tabular format, and not prioritizing one of the result fields over the others. Perhaps, to preserve the current functionality of the table view, a new "rich table" view could be added, that includes rendering for images, geocoordinates, musical notation, geographic shapes, etc.

It’s worth noting that a few other data types are already rendered specially:

  • IRIs become hyperlinks.
  • IRIs that can be abbreviated are also abbreviated (wd:Q42).
  • IRIs that are entities also get an “explore” button.
  • IRIs that are Wikimedia Commons images get a “media viewer” button (though it seems to be broken at the moment).
  • Datetime literals are formatted as dates.
  • MathML is injected inline.

I think that’s all of them, but I might have missed some.

We’re also thinking about making the table view more configurable in T227702 – that could also be used to make rich view of other data types available, without enabling it by default (in case we don’t want that).

Lucas_Werkmeister_WMDE added a subscriber: Nikki.

Copying from T258896: it could be useful to configure the size of the images in the table, à la

#defaultView:Table{ "image": [ "?image" ], "height": "100", "width": "100" }

We’re also thinking about making the table view more configurable in T227702 – that could also be used to make rich view of other data types available, without enabling it by default (in case we don’t want that).

I would definitely like to be able to choose whether to display images or just links to the images and I'd also prefer not displaying them by default because even when I want to see images, I want to get the query working first.

Another non-text data field that is not currently rendered in the table view are audio files.

Supporting this would be of great help. For example, it would allow audios to be played in a query that lists lexemes with their "pronunciation audio" (link to the property).