Page MenuHomePhabricator

[Reparaturhilfe] Look into the new version of OSM4Wiki
Open, Needs TriagePublic

Description

Context:
OSM4Wiki is a external tool to parse all kinds of coordinate data from Wikipedia articles and show them as (ideally) labelled markers on a map.

The the maintainer is currently working on a newer version of it and was asking for some review and feedback before it replaces the current version.

Scope:

  • We'll timebox the review to a day of work
  • Click through the given links and look for obvious issues we see with the code or the output
  • Try different browser
  • Try mobile

Out of scope:

  • We'll not look for all different ways on how coordinates are used an stored on articles to find missing parts there.

Open questions:

  • Should/can we also have a look into the source code?

Event Timeline

So far we can only review the user interface and how it behaves. This is what we noticed:

  • In Chromium based browsers the page does have a scrollbar on the very right. It only scrolls down a few pixels. While this is not a big problem it can be a bit distracting when I use the scrollbar in the list on the left side of the screen. This doesn't happen in Firefox.
  • Clicking any of the pins on the example maps opens what we believe is an alert() popup with the text "marker [object Object]". This typically happens when a function expects a string but gets fed with a more complex object instead. The browser's JavaScript engine tries to convert the object to a string, but can't find a dedicated method and instead falls back to "[object Object]" as some kind of error message. This happens in all browsers.
  • While there is a stop button to stop the progressive loading in one of the examples, there is apparently no way to continue it.
  • We are a bit confused what the purpose of the checkboxes is. They don't seem to do much other than hiding individual pins. This seems unnecessary especially when there are only very few pins on the screen.
  • One feature we are missing is a button to reset the zoom and go back to the initial position and zoom factor where all pins are visible.

We hope this helps already.

Thank you very much for the results so far.

  • Indeed, I have to find out why Chrome adds this completely useless scrollbar and how I can avoid it.
  • The alert() popup is simply a replacement for "I have no idea". What could be really useful if somebody clicks on a pin?
  • The stop button is actually a kind of emergency button for the case that you have a bad internet connection and it takes too long time to load hundreds of links. The purpose of the stop button is to give up waiting. That's why there is actually no need to continue. But anyway - I can add a continue button, perhaps it might be useful.
  • Yes, the checkboxes hide pins. There are articles which contain the same coordinates for two or more different subjects, then you can remove pins until only one is left. But this is something I have to think about.
  • A reset button is a nice idea, thank you very much!

BUT...
my main concern is the use of the tool. I wrote the old version for the template "AllCoordinates", but this was many years ago. I have no idea if it is meanwhile used also in other templates and if the new version will work with them well. I also realized that "AllCoordinates" got some changes on its parameters and I don't know if my new version meets all parameters correctly.

The source code
The project directory "osm4wiki" has a directory "/public_html/cgi-bin" which contains two directories "wiki" and "work". "wiki" contains the old version which is still running for Wikipedia. "work" contains the new version. To install the new version, simply rename "wiki" into whatever and rename "work" into "wiki".
In "work" you find a file "Funktion.txt" which describes in German how the program files (some in Perl, some in JavaScript) work together. If needed, I can translate it into English.
I can also upload the source code somewhere else if you want.
Caution: I have a rather poor programming style. I learned BASIC in 1975 and that's why I prefer 1 or 2 letter variable names instead of long self-explaining names.

kmlexport
My old version uses the tool "kmlexport" to get a list of coordinates. There were some issues:

  1. sometimes foreign characters had been displayed in a wrong way. Nobody could find out what was the reason, osm4wiki or kmlexport?
  2. sometimes my tool stucks on list pages or category pages which have too many entries. Nobody knows if kmlexport is still busy collecting coordinates or stopped already working. Users see that nothing is happening and click the refresh button and perhaps again and again...

That's why I replaced kmlexport by self-written routines, and why I implemented the step by step loading of linked pages.
Unfortunately I have to say: if kmlexport is working, it is much faster than my program. And I wonder why. Is there a faster way to read Wikipedia articles by direct database access instead of http access?
Can I get access to the kmlexport source code?

If I asked questions which are not your business, please tell me where is the right place to ask.

  • I'm not sure but I think this is a misunderstanding. We don't have access to the source code. https://toolsadmin.wikimedia.org/tools/id/osm4wiki doesn't mention anything.
  • This is unrelated, but I think it would be cool to add the tool to the new https://toolhub.wikimedia.org.
  • I think the scrollbar is because of a div.check { height: 100%; } in the CSS. This is the list with the checkboxes below the toolbar. The height for this element can only be 100% minus the height of the toolbar above.
  • Personally, I would expect popups similar to the ones rendered by Maps (Kartographer), with a link to the article. Here is an example. But you are obviously free to shape this however you want. Maybe it's better to not do anything on click and instead rely on the highlighting that already happens in the list?
  • Templates like AllCoordinates are in the hands of the community. We don't know much about these. Personally I think a "report a bug" link directly in the tool is your best option to get feedback directly from the users of the tool.
  • I'm afraid there is nothing we can say about kmlexport. Again, https://toolsadmin.wikimedia.org/tools/id/kmlexport doesn't contain any information other than the names of two people. Can you try to contact them?

(Übrigens, danke, dass du mit uns ins Englische wechselst. So können mehr Leute mitlesen. Wir können aber auch gern Deutsch schreiben, wenn dir das lieber ist.)

@Plenz Please let us know if we should have a look at the source code and where to find it, or if there is something else left where we can help. Otherwise we would like to resolve this task as being done.