The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons. Commons is not only the image repository for Wikipedia, but an independent project that seeks to document the world with photos, videos and recordings.
Commons Android App Repo (for UI): https://github.com/commons-app/apps-android-commons/
Commons Misc Repo(for APIs): https://github.com/commons-app/commonsmisc
The project is about adding a leaderboard based on user's edits using Commons. The feature will include only edits made with the mobile app, and users who have shown interest in this activity.
- Update UI of achievements activity to display level (current activity) in first tab and Leaderboard in second tab (based on uploads).
- Designing and implementing the APIs for calculating and displaying ranks of the User (all time, monthly, weekly). These would be Python APIs in commons-misc repo.
- Display user's Avatar and rank on Leaderboard screen fetched from API.
- Designing and implementing the APIs for displaying leaderborad (user list) based on 2 parameters - duration (all time, monthly, weekly), type (uploads, nearby, images used).
- Use the APIs to fetch leaderboard (user list) based on uploads via mobile app (all time) and display it in Leaderboard screen.
- Add pagination in the leaderboard screen to load more users on scrolling down.
- Add duration filters in leaderboard screen and show results based on selected filter (weekly, monthly, yearly, all time). Change the UI to show and select filter.
- Change the UI to show 3 different results (based on uploads, nearby, used). - add 2 more tabs
- Tapping the name of a user in the leaderboard should open the gallery of that user's pictures, probably as a browser URL for now.
- Write unit tests , documentation, fix bugs and Release (at least in alpha) - (2 weeks)
- If time permits, Add option for users to change Avatar, Store user's Avatar in cache for a month.
The score could reuse some numbers from achievements, but should only count edits done with the mobile app, because otherwise Vicuna/etc users will dominate the top of the leaderboard even if they don't use the mobile app.
Actually, I suggest listing in the leaderboard only the users who have ever opened the achievements activity. We must keep track of that information server-side. So the leaderboard would only list app users who have an interest in this kind of game.
Tapping the name of a user in the leaderboard should open the gallery of that user's pictures, probably as a browser URL for now. Knowing they are being watched by their peers will probably reduce the temptation to "cheat" (for instance by uploading 1000 pictures of the same spoon)
The user's name should be highligthed. Random idea: The length of the leaderboard could be dynamic, for instance if I am 3rd it could be 10 people, but if I am 13rd it could be 20 people. Or just make more people appear when scrolling down.
There could be weekly (last 30 days) rankings, yearly (last 365 days) rankings, all-time rankings.
To make it more visually attractive, I suggest using as a kind of avatar the user's most successful picture (the one which is used the most in the wikipedias/etc, or a random one if the user's pictures are not used yet anywhere). Random idea: Users like to personalize their avatar, so we could also offer the option to select one of the user's uploads as an avatar picture, but that may lead to more selfies, so this option could be an privilege to unlock (only users who are above level 5 for instance).
There is a lot of data to show, so we have to think the UI carefully. Here is just an idea:
The vegetable is a placeholder for the user's avatar.
I forgot to write the position number (1, 2, 3, etc). It is important because I want to know whether I climbed from 37th to 36th, and counting is boring.
The leaderboard lists should probably be calculated on the server where we currently perform achievement calculations, and cached (re-serve the same results if less old than 1 hour). The user will probably upload a few more pictures in 5 minutes and come see the leaderboard again. So we could recalculate only that user's new scores (and let the other people's scores the same until the next hour comes). In other words, only the users who keep looking at the leaderboard would have their score grow at smaller intervals than 1 hour. That 1-user-only recalculation itself should be cached something like 1 minute because a picture can not be neatly uploaded in less time, and to avoid useless server load.
The avatar miniatures (generated by mediawiki) should be cached by the app for like a month.
How should the user start showing up in the leaderboard?
Automatically when the user performs one of the actions. We can automatically add the user in the leaderboard, once he performs any of these actions
- or upload
- or nearby upload
In our backend, we are planning to have:
- a list of users(with option 1 or 2) for whom we need to calculate statistics
- periodically fetch the statistics (every 1 or 4 hours). Update the statistics in our tools forge DB
- When the Commons app does an API call to get leaderboard info, serve the statistics using tools forge DB instead of calculating real-time.
- Android SDK
- Android UI design
- Understanding of RxJava
- Basic knowledge of Wikimedia APIs
- Familiarity with Python
- Unit testing for Android
Nice to have skills
- Familiarity with Kotlin
- Startup guide for new contributors: https://github.com/commons-app/apps-android-commons/wiki/Volunteers-welcome%21
- Talk with us: Hangouts for an invite https://hangouts.google.com/group/j9fB13Dhyqs0aHp02 or ping Vivek Maskara(@maskaravivek) at maskaravivek [at] gmail.com or drop a message at email@example.com
- Some possible micro-contributions: https://github.com/commons-app/apps-android-commons/issues?q=is%3Aissue+is%3Aopen+label%3A%22beginner+friendly%22