Page MenuHomePhabricator

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

Description

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.

Details

Related Gerrit Patches:
mediawiki/extensions/Graph : masterBar graphs displaying properly after a save

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 added a subscriber: ferdbold.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 19 2015, 10:16 PM
ferdbold set Security to None.
Jdforrester-WMF triaged this task as High priority.Sep 26 2015, 6:17 PM
Jdforrester-WMF moved this task from To Triage to Blocked on the VisualEditor board.
Jdforrester-WMF edited a custom field.
ferdbold moved this task from Backlog to In Progress on the Graph-VisualEditor board.
ferdbold added a subscriber: Yurik.EditedNov 17 2015, 1:16 AM

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

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

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

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