Page MenuHomePhabricator

WDQS graph visualization shows images with a wrong aspect ratio
Closed, ResolvedPublic

Description

The Wikidata Query Service (WDQS) shows square images when running a query and visualizing its results via #defaultView:Graph. Images have only a wrong aspect ratio until the user interacts with the graph.

This issue didn't happen before and can be reproduced. at least, in Firefox and Chromium.

Event Timeline

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

Pretty sure this is an upstream bug: https://github.com/almende/vis/issues/3203 – we could mitigate by downgrading vis back to 4.19.1 for now, since I don’t think there’s anything we need from 4.20.0. (@Smalyshev can you confirm that the deployed version is 4.20.0?)

Example query (link):

#defaultView:Graph
SELECT ?node1 ?node1Label ?rgb ?image ?node2 ?node2Label WHERE {
  VALUES ?item1 { wd:Q42 wd:Q350 wd:Q21 wd:Q84 wd:Q1860 wd:Q145 }
  VALUES ?item2 { wd:Q42 wd:Q350 wd:Q21 wd:Q84 wd:Q1860 wd:Q145 }
  ?item1 ?wdt ?item2.
  ?property a wikibase:Property;
            wikibase:directClaim ?wdt.
  
  VALUES ?toggle { true false }
  BIND(IF(?toggle, ?item1, ?property) AS ?node1)
  BIND(IF(?toggle, ?property, ?item2) AS ?node2)
  BIND(IF(?toggle, "77FFAA", "FFFFDD") AS ?rgb)
  
  OPTIONAL { ?node1 wdt:P18 ?image. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Upstream have fixed the issue and put out a new release (4.20.1), so an npm update with the next deployment should fix this. (As far as I can tell, grunt deploy does not include this – the auto_install step installs missing packages, but doesn’t upgrade outdated ones.)

I did deploy from current master that includes vis@4.20.1 - should be up on Monday. You can check it out from https://github.com/wikimedia/wikidata-query-gui-deploy/tree/production if you want to test.