Page MenuHomePhabricator

[Bug] Display error in the TreeMap when embedded
Closed, ResolvedPublic

Description

When a query viewed in TreeMap is displayed via embed.html, some problems occurs: both background color and text color are white, so the text can't be read, and other minor css problems. When displayed in the query page, no bug occurs.

unnamed.png (937×1 px, 46 KB)

Example of a query

Same example embedded

Tested on Firefox 52.0 and Chromium with same results.

Possible cause: embed.html and the main query service page doesn't use exactly the same CSS and JS. In the main page, the graph is included in a div with attributes

id="query-result" style="display: block;"

In the embed page, this div has only

id="query"

Modifying DOM and the attributes makes embed.html displaying the graph correctly.

unnamed2.png (821×1 px, 124 KB)

Event Timeline

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

Change 342546 had a related patch set uploaded (by EdouardHue):
[wikidata/query/gui] Using same result div id in embed as main page

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

Just submitted a patch. Changing div id was just a workaround, a little more hacking seems necessary.

Change 342546 merged by jenkins-bot:
[wikidata/query/gui] Using same result div id in embed as main page

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