Page MenuHomePhabricator

Bar charts are not displaying properly directly after a save in VisualEditor
Closed, ResolvedPublic1 Estimated Story Points


After saving through VE, bar graphs will be broken in viewing mode. However, reloading the page will make them display correctly, so this issue doesn't get through to wiki readers. Still, it is an minor annoyance for editors.

Event Timeline

ferdbold raised the priority of this task from to Needs Triage.
ferdbold updated the task description. (Show Details)
ferdbold moved this task to Backlog on the Graph-VisualEditor board.
ferdbold subscribed.
Jdforrester-WMF moved this task from To Triage to Blocked on the VisualEditor board.
Jdforrester-WMF edited a custom field.

Figured out what was causing this: Once you apply changes to a page, any boolean values in a spec set to true will show up as either "" or null in mw.config.wgGraphSpecs, causing the graph to not render properly (bar graphs have a band property set to true, which is why they fail but not area and line graphs). Once you refresh the page though, booleans are fine.

This can be circumvented for the time being by wrapping the booleans as strings in JSON. However the user doesn't know that while he's editing a spec, so we still want to fix this behaviour.

@Yurik what do you think?

Change 253521 had a related patch set uploaded (by Ferdbold):
Bar graphs displaying properly after a save

Change 253521 merged by jenkins-bot:
Bar graphs displaying properly after a save