Page MenuHomePhabricator

Kartographer's VisualEditor dialog doesn't understand "full" (alias 100%)
Closed, ResolvedPublicBUG REPORT

Description

Minimal test case:

<mapframe width="full" height="100" zoom="5" longitude="31" latitude="35" />
<mapframe width="100%" height="100" zoom="5" longitude="31" latitude="35" />

When editing this in VisualEditor weird things happen:

  • The placeholder in the article is the wrong size, only a few pixels wide instead of 100%.
  • The dialog field where the width should appear is empty.
  • The field refuses to accept "full" or "100%".
  • When I try to enter "full" I get an error for each keystroke (see below). This even breaks the dialog to a point where I can't close it any more.
  • When I don't touch the empty field and apply other changes width="NaN" actually appears in the wikitext.
Uncaught Error: Invalid LatLng object: (33.18046807203146, NaN)
at new LatLng
at Object.unproject
at Object.pointToLatLng
at NewClass.unproject
at ve.ui.MWMapsDialog.updateMapArea
at ve.ui.MWMapsDialog.onDimensionsChange
at OO.EventEmitter.emit
at ve.ui.DimensionsWidget.onWidthChange

Event Timeline

Change 886046 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Fix broken support for full-width maps in VisualEditor

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

Change 884387 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Move conversion of deprecated width in % to argument parsing

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

Change 884387 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Move conversion of deprecated width in % to argument parsing

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

thiemowmde moved this task from Ready for story time to In sprint on the WMDE-GeoInfo-FocusArea board.
thiemowmde added a subscriber: Lena_WMDE.

In today's story time we decided to go with the absolute minimum, as done in https://gerrit.wikimedia.org/r/886046: the dialog should not crash, and existing wikitext should not be destroyed. That's all.

Change 886046 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Fix broken support for full-width maps in VisualEditor

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

Change 889818 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Final VE fixes for deprecated (but supported) width in percent

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

Change 889818 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Final VE fixes for deprecated (but supported) width in percent

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