Page MenuHomePhabricator

Proposal: Allow users to browse Commons from the Android app
Closed, DeclinedPublic

Description

Profile Information

Name: Suchit Kar
IRC nickname on Freenode: diddypod
GitHub: github.com/diddypod
Location: Hyderabad, India and Kolkata, India
Typical working hours: 10:00am - 3:00pm and 9:00pm - 2:00am (UTC + 5:30)

Synopsis

Title: Allow users to browse Commons from the Android app
Task: phabricator.wikimedia.org/T188877
The aim of this project is to bring the functionality of browsing and searching through images, in the site, to the app experience.

  • Add search functionality via the Mediawiki API
  • Restrict the results to images
  • Search for categories
  • Shows sub-categories and the images present in that category
  • Allow users to bypass the Login page and upload images
  • Allow users who aren't logged in to browse and search in app

The application currently only allows registered users to login and upload images to Commons. This project aims to expand the scope of the application to browse Commons, search through images and save them to their phones. Also, similar to the site, the application will be extended to support users who aren't logged in, and allow them to browse Commons as described above. The end goal is to bring the application functionality closer to the site, and make the entire experience more cohesive.

Mentor: @Nes
Co-mentor: @Nicolas_Raoul

Timeline

April 23 - May 14
Community Bonding Period

  • Gain more familiarity with existing code via bug-fixes and micro-tasks
  • Find and fix bugs in current image-list
  • Gain more familiarity with MediaWiki API and usages

May 14 - May 21
Week 1

  • Start implementing basic Search
  • Create UI for Search
    • Add search option in Sidebar, so that non logged-in users may be able to search too
    • UI for Search page, possibly add featured image
    • UI for results list (thumbnail and title)
    • UI for individual results (reuse MediaDetailFragment)
  • Create and link Activity, implement onClickListeners

May 21 - May 28
Week 2

  • Retrieve results via Mediawiki API
    • Create an AsyncTask to handle API calls
    • Handle errors, Exceptions
    • If exact matches, highlight results in list
  • Use an Extractor similar to existing MediaDetailExtractor to populate individual fields

May 28 - June 4
Week 3

  • Load media details and text from API
  • Load actual image in result
    • Optimise resolution based on connection speed

June 4 - June 11
Week 4

  • If time allows, add new fields to existing MediaDetailFragment layout
    • Author (web link to profile)
    • Image usage
    • Picture Metadata (possibly a separate Fragment)
  • Add and implement option to locally save image

June 11 - June 15
Evaluation 1

June 11 - June 18
Week 5

  • Thoroughly test Search as implemented above on multiple devices and emulators
  • Implement bux-fixes, if any

June 18 - June 25
Week 6

  • Finish implementing basic Search
  • Document code and write tests for Search implemented above

June 25 - July 2
Week 7

  • Start implementing Category Search
  • Add option to Search by Category
    • Show dropdown in SearchActivity to choose Search by Category
    • Implement onClickListeners where applicable
  • Create UI for Category Search results (two tab UI)
    • Tab 1 to display groups of sub-categories for each result in collapsible lists by letter (else it is tedious to scroll through longer results lists)
    • Tab 2 to display images in the particular category

July 2 - July 9
Week 8

  • Implement Category Search
    • Opening a sub-category shows its sub-categories and images (recursive)
  • Retrieve Category results via MediaWiki API and populate lists

July 9 - July 13
Evaluation 2

July 9 - July 16
Week 9

  • Show individual image results from groups in Fragment as implemented in Search above
  • Extend Search to find search phrases in description strings
    • Add search by description in dropdown
    • Implement using MediaWiki API and display results as in Search (by Title)

July 16 - July 23
Week 10

  • Finish implementing Category Search
  • Test search by category, search by description on multiple devices and emulators
  • Implement bug-fixes
  • Document and write tests for search by category, description

July 23 - July 30
Week 11

  • If time allows, implement Fast CCI functionality
  • Add and implement sort by Featured and/or Usage to Tab 2 (image) results
    • Traverse list of image results and sort as per criteria
    • Show dialogs or notifications displaying status and progress

July 30 - August 6
Week 12

  • Finish
  • Final testing and bug-fixing
  • Final documentation

August 6 onward
Post GSoC

  • Maintain code and continue contributing to WikiMedia and the Commons app

Other Deliverables

  • Weekly blog posts on progress
  • Regular blog posts on the experience of working for the WikiMedia Foundation and the Open Source Community
  • Updates and regular communication with mentors and community on issues, queries etc.

Participation

The bulk of our communication has been via GitHub and some interactions on Google Hangouts. Going forward, my first stop for queries would be WikiMedia's excellent documentation of its various tools, sites and procedures. If that doesn't solve my problem, or if I need further guidance, I plan to ask about app specific queries on GitHub and for technical questions regarding WikiMedia I will communicate on Wikimedia Developer Support and the IRC channel.

I shall be publishing the source code on my fork of the Commons app, on a separate branch.

About Me

I am an undergraduate, currently pursuing a degree in Electrical and Electronics from Birla Institute of Technology and Science, Pilani. I am currently in my third year, and shall complete this course and graduate in 2019.
I came to know about Google Summer of Code from a couple of friends of mine, Kumar Prasun for Open Astronomy and Srimanta Barua for radare2 who participated in the program in 2017.
For the bulk of the program, I will be at home for my summer vacation, and hence I will be free to work and learn. My college will reopen for a new semester in the first week of August, which coincides very conveniently with the end of the program.

This project is my first foray into Open Source, and coding and working with a community this vast. To have taken this project from a proposed task to a fully implemented feature would mean a lot to me as an accomplishment personally, but it would also improve the experiences of a lot of people who use this application and contribute something meaningful to their lives. To be able to contribute to the world's largest repository of knowledge and the tools used to expand and maintain it while simultaneously learning from its excellent community is a rare privilege.

Past Experience

I work on Android applications as a hobby. I have experience in Java and Kotlin relevant to this project. Other than these, I have worked in C++, Python, JavaScript, HTML, CSS, PHP among others. I use Ubuntu and Windows.

Among past work, I have made a few simple automated data entry scripts and a web based data collection portal for Public Enterprises with a server for the Department of Statistics and Program Management, Government of West Bengal during a summer training program, 2017.

I have also recently started building Android from various sources for my phone (Redmi 2) and I plan to start contributing to Lineage OS soon.

My time with this community is my first experience in working for an Open Source project. So far I have implemented minor bug fixes, and have added a feature to nominate images for deletion.

Currently working on

Event Timeline

Diddypod renamed this task from Insert project title here to Allow users to browse Commons from the Android app.Mar 23 2018, 7:24 AM
Diddypod renamed this task from Allow users to browse Commons from the Android app to Proposal: Allow users to browse Commons from the Android app.
Diddypod updated the task description. (Show Details)

@Nicolas_Raoul, @Nes any feedback on this proposal? Should I add or remove anything?

it's sub-categories -> its sub-categories

Good ideas.
This proposal is quite ambitious.

This proposal is quite ambitious.

Do you think it is too much to do? I feel like I'm up for the task, but would you advise me to reduce the scope?

I don't think "Add and implement option download metadata to a separate .txt, .xml or .json file" is really needed on mobile.

Also, I would suggest switching "Add new fields to existing MediaDetailFragment layout" to Week 4 and "Load actual image in result" to Week 3, and adding "if time allows" to "Add new fields to existing MediaDetailFragment layout"

Finally, please add "if time allows" to "Fast CCI" as it is potentially very time-consuming.

Thanks for the suggestions. I've added them to the proposal.