Description
As discussed in #252, we might want to allow the user to edit the associated Wikipedia article to add the image, after the user has successfully uploaded a pic for a Wikidata item. This would complete the "chain" of seamless workflow after the other improvements at #252 are completed during the renewal - users can browse the places that need photos, select one and move to the location, directly upload the photo after taking it (with suggested titles and categories based on the Wikidata item), and THEN add it to the Wikipedia article that is associated with that item.
We could see if the Wikipedia app allows us to do that, or otherwise link to the web view. Otherwise, we could also implement the functionality in our own app if other options don't suit (last resort).
Considerations:
- We must include a tutorial on how to do so
- We must consider the user's Wikipedia language version as well as how to implement the UI in a clean manner
- We should log (or tag) the edits that are made via our app to ensure that we aren't vandalizing articles.
Edit 30 Jan 2020:
Scope of task:
- For images uploaded via Nearby (which have an associated Wikidata item and Wikipedia article), use the /page/media Restbase API to check if the associated Wikipedia article has relevant images. (Make sure you account for cases where there is no associated Wikipedia article, as not all Wikidata items have one.)
- If there is no Wikipedia article, or if the Wikipedia article already has relevant images, do nothing
- Otherwise, in the Contributions list, add a TODO icon to that image, perhaps on the bottom right (@neslihanturan could you please help us create an icon?)
- When user taps the TODO icon, show popup saying "Do you want to add this picture to the ___ language Wikipedia article? Yes/No"
- Selecting "yes" would bring them to the Wikipedia web editor (i.e. open a WebView with the URL of that Wikipedia article, in the edit section). Example: https://en.m.wikipedia.org/wiki/Ursula_K._Le_Guin#/editor/0
- Prior to entering the editor, we should have a popup with basic instructions of what to do, and the wikicode for that image displayed for easy copying
- The icon in the Contributions list should disappear once the edit is made. Perhaps this would require checking the /page/media Restbase API again.
- Log (or tag) the edits that are made via our app - I am actually not sure if this can be done since there will be no server-side indication.