Page MenuHomePhabricator

Improve error handling when an invalid marker color is used
Closed, DeclinedPublic1 Estimated Story Points

Description

User might not know what to put into the marker-color property. When saving the page with a broken color value there's currently a very cryptic error message and the map is just broken.

ErrorMessageSaved.png (123×1 px, 20 KB)

We could provide a default fallback color, so the map never renders broken.

We might be able to improve the message. See also T304748: Maps GeoJSON errors are reported as missing "query" when this is not the problem

Event Timeline

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

[mediawiki/extensions/Kartographer@master] Show all GeoJSON validation errors

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

thiemowmde moved this task from Backlog to In sprint on the WMDE-GeoInfo-FocusArea board.
thiemowmde set the point value for this task to 1.
thiemowmde subscribed.

Personally, I think it's fine to validate color codes as part of the JSON schema validation step. A fallback color might be more confusing than helpful. Let's just show the correct error message, as suggested in https://gerrit.wikimedia.org/r/826520.

Change 826520 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Show all GeoJSON validation errors

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

We discussed this in demo time and together with UX we came to the conclusion that the more verbose error is less useful than the previous state. We would like to revert this change and instead replace the existing error message with a clearer one - UX will provide the text.

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

[mediawiki/extensions/Kartographer@master] [POC] Show JSON Schema validation log not as red error

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

For reference, this is what the patch https://gerrit.wikimedia.org/r/831867 does. It's even initially collapsed.

Screenshot from 2022-09-13 15-31-47.png (115×1 px, 16 KB)

Screenshot from 2022-09-13 13-54-09.png (473×1 px, 149 KB)