The task described in T141335 was judged to be too complex and out of scope for the Collaboration Team maps engagement. However, we said we want to create an error message to help map creators who create markers in excess of the 99 allowed. @MaxSem @Pnorman @Catrope, can one of you please describe the problem in detail, and suggest a possible error message? I will refine that and move this to RFP. Thanks.
I assume something like what Cite does when there's a problem with a citation: displays an error message and adds a tracking category? Adding a message would require a transition for existing pages that would be affected, though.
This is actually not straight forward at all. It's not just counting how many markers there are, but specifically how many numbered counters there are. If we just count markers, then there are iconed markers who shouldn't be a problem at all. The issue is when the numbered ones are over 99 and start displaying numbers that don't fit the marker area.
My POC commit uses a somewhat hacky way to check how many markers in general (numbered or not) a map has in JS, and we can display a message "Notice: Not all markers are displayed.". I think this is preferable to the Cite method of writing a huge red error message to the reader. This type of error should not stop readers from seeing a map or interacting with it -- it just needs to be enough to notify and alert the editors to fix it.
Here's how the message looks like:
From the info on the ticket it is not clear to me what happens when there are more than 99 numbered markers. Is the marker number 200 not shown at all? is it shown with an empty label? is it shown with the label cropped (i.e., shown as "20" or "00")? or it is just shown as "99" because the maximum is reached? Based on that, we may want to tweak the messaging.
The general direction of the proposed approach seems god to me. However, I'd consider this more a warning than an error, and consider making it a bit less prominent. A couple of ideas:
- Don't use red text. Use black text with an icon instead.
- Show only a compact version of the message initially, and expand to the full message when the user hovers on the area.
- When showing the full message, show it in a separate line.
I illustrate the idea below:
IMHO a warning message is not a solution, but a temporary patch. A solution should be to use icons that will allow to show POI with counter greater than 99, then any editor will decide if it's a good idea (or even necessary) to use such high number of POI.