Page MenuHomePhabricator

[GSOC 2024 Proposal]: Improve upload queue management and 'Nearby' feature of the Commons app
Open, Needs TriagePublic

Description

Profile

Name: Shashwat Kedia
Location: Chennai, Tamil Nadu, India
Education: B. Tech, Indian Institute of Technology Madras (Expected graduation year: 2027)
GitHub: ShashwatKedia
LinkedIn: Shashwat Kedia
Other Communication Modes: Zulip, Slack, Discord
Typical working hours during GSoC: 9 am - 10 pm (IST) UTC+5:30

Synopsis

The Commons app is an open-source Android app that allows anyone to upload pictures to Wikimedia Commons (the image repository used by Wikipedia, Wikinews and other projects).
Commons Android app repository: GitHub

Project

This project aims to fix upload queue management and improve the 'Neaby' of the Commons app.
GitHub issue: Fix upload queue management

Mentors

@Nicolas_Raoul @RitikaPahwa4444

Have you contacted the mentors already?

Yes.

Deliverables

I have broken the proposal into 3 major tasks:

  1. Improving Upload Queue Management (#5589), Implementing best possible UI for pending uploads(#5587), and Fixing erratic pause and resume button (#5524)
  2. Fixing different cases and problems related to failing uploads (#5603, #5284, #5283, #5280)
  3. Improving the 'Nearby' feature: Loading pins as the user moves the screen, caching pins, and removing the "search this area" button (#5664)

Implementation Strategy

Task 1

(i) Improving Upload Queue Flow (#5589, #5524): Currently, the uploads which have not started have either a Queued tag or a non-started progress bar animation (which is sometimes allocated randomly). I propose to remove the non-started progress bar animation for uploads yet to be started and instead give them all the tag Queued (N), where N is the position of that image in the upload queue. This will help the user know which image will get uploaded after which one, as the N will be updated after every successful image upload.

Also, I propose to address an extra task, #5524, as I thought that it's imperative to fix the pause/resume button behaviours to improve the upload management task as a whole. It would be easier for one already working on the upload queue management to fix the pause/resume button behaviours simultaneously rather than working on it later.

Proposed upload queue flowchart:

Upload Flowchart Designed.png (1×1 px, 686 KB)

(ii) Improving Upload Queue UI/UX (#5587): There can be two possibilities for the best UI/UX of pending uploads.
the first approach is that we keep the pending uploads in the contributions fragment (which is what the app currently does). There are some problems with this approach:
(a) Currently, only 2-3 images are visible at a time and if multiple images are uploaded then user has to scroll a lot to view the status of the images.
(b) If the topmost upload fails/is paused, but the next images get uploaded successfully, then the uploaded images go to the top of the screen and the failed/paused image gets hidden as it moves down

The second possibility is that we can create a separate PendingUploads screen, that’s completely focused on managing the in-progress uploads of a user and providing them with more flexibility to manage them seamlessly. I'm also thinking of adding a CTA when the new PendingUploads screen has no pending uploads, something along the lines of these designs, where the text can be "No pending uploads. Upload images now to see them here!" Though, thinking about the best possible UI/UX for the app is a part of GSoC itself, I've made some UI mockups which can improvised upon after taking feedback from my fellow contributors on GitHub :)

Task 2

(i) Uploads never get stuck(#5603): Upload hundreds of upload-worthy images to reproduce and debug the issue and find potential solutions to it.

(ii) Prevent retries for genuinely failed uploads(#5284): As discussed in the issue and a draft PR related, prepare a list of cases of 'genuine' reasons for failure. Add logic to prevent retry of upload if it failed for 'genuine' reasons and show the user the reason for failure.

(iii) Enqueue failed uploads(#5283): As discussed in the issue, this happens potentially because of a UI error, as the progress bar seems to move for only 1 image, even though two of them have it.

(iv) Never show successfully uploaded images as "Failed"(#5280): Intensively debug to reproduce the issue and fix the problem associated with it.

Task 3

Load pins automatically, cache them and remove the "search this area" button (#5664): Using the hints given in the issue description and comments:
(i) Write the logic to automatically load pins as the user moves through the map, like Wikishootme does
(ii) Write cases of cache invalidation to remove old cached pins
(iii) Safely remove the existence of the "Search this area" button

Timeline

TimeframeClassificationTask Description
1 May - 26 MayCommunity Bonding PeriodConnect with the mentors and learn more about the community, familiarise with the app structure, and understand more about the upload queue by uploading hundreds of upload-worthy pictures. Discuss the best UI/UX for the pending upload queue with the mentors and fellow contributors.
Partial UnavailabilityPartially unavailable from 5 May to 16 May due to university end-semester examinations
TASK 1: Issue #5589, #5524
27 May - 31 MayDeliverableReport key findings and finalise implementation strategy
Subtask 1Intensively test the upload queue under different scenarios and network parameters and record observations
Subtask 2Analyse the scenarios and prepare a report on the observations recorded
Subtask 3Discuss and finalise the implementation strategy for improving the upload queue
1 June - 10 JuneDeliverableFix upload queue management and pause/resume behaviour
Subtask 1Implement the finalised strategy
Subtask 2Fix pause and resume behaviour
Subtask 3Intensively test the application for any new bugs
11 June - 16 JuneDeliverableImplement the finalised UI for pending uploads
Subtask 1Implement the finalised UI for 'Pending uploads'
Subtask 2Intensively test the application for any new bugs
17 June - 21 JuneDeliverable Unit Tests
Subtask 1Write/Modify unit tests for the implemented changes
Subtask 2Intensive manual testing for all possible cases and network issues
22 June - 25 JuneDeliverableFinalise changes for Task 1
Subtask 1Complete any pending task(s)
Subtask 2Implement any changes suggested by mentors
Subtask 3Report/Blog about the project status
TASK 2: Issues #5603, #5284, #5283, #5280
26 June - 30 JuneDeliverableReport key findings for different cases of failing uploads
Subtask 1Debug intensively to figure out possible reasons for the erratic behaviour of the upload queue while dealing with Failed images and images getting stuck
Subtask 2Prepare a list of all genuine cases of Failed uploads
Subtask 3Analyse the scenarios and prepare a report on the observations recorded
1 July - 7 JulyDeliverable Fix #5603 and #5283
Subtask 1Enqueue failed uploads instead of uploading simultaneously
Subtask 2Fix queued uploads getting stuck and implementing a more robust retry upload function
Subtask 3Intensively test the application for any new bugs
8 July - 11 JulyEvaluationMid-term evaluation
Subtask 1Finalise the changes
Subtask 2Report/Blog about the key findings and accomplishments
12 July - 18 JulyDeliverableFix #5284 and #5280
Subtask 1Preventing retry for uploads according to the "Genuinely Failed" list.
Subtask 2Preventing the app from showing successfully uploaded images as Failed
Subtask 3Intensively test the application for any new bugs
19 July - 24 JulyDeliverableUnit tests
Subtask 1Write/Modify unit tests for the implemented changes
Subtask 2Intensive manual testing for all possible cases and network issues
25 July - 28 JulyDeliverableFinalise the changes for Task 2
Subtask 1Complete any pending task(s)
Subtask 2Implement any changes suggested by the mentors
Subtask 3Report/Blog about the project status
TASK 3: Issue #5664
29 July - 13 AugDeliverable Improve Nearby Feature: #5664
Subtask 1Load pins automatically as user moves on Nearby map
Subtask 2Cache loaded pins and write cases of cache invalidation
Subtask 3Remove "Search this area" button
14 Aug - 19 AugDeliverableUnit tests
Subtask 1Write/Modify unit tests for the implemented changes
Subtask 2Intensive manual testing for all possible cases
20 Aug - 26 AugDeliverableFinalise all the changes
Subtask 1Complete any pending task(s)
Subtask 2Code cleanup and documentation
Subtask 3Implement any changes suggested by mentors
Subtask 4Final Report/Blog about key findings and accomplishments

Previous Contributions to Commons

I have been contributing to the Commons Android app since December 2023. You can find all my pull requests here.

Total: 14
Merged: 12
Open: 2

Pull Requests

1. Successfully enhanced the flow of UploadMediaDetails by calculating all the image qualities in the background and showing any problems ASAP, as oppposed to the earlier method of making the user wait for every image by calculating the quality (individually) only on NEXT button click (which also wasted user time as they would type the caption and description of the image, only to be told later that the image is already on Commons, or some other problem exists with the image):

S. No.Issue No.Issue DescriptionPR No.Tasks PerformedStatus
1.#4704Remove Please Wait and do image quality verification task in the background#5570Calculated and stored the qualities of all the images in the background and successfully displayed dialogs ASAP. Rigorously tested for different cases and types of images and wrote code to accommodate all scenariosMerged
2.#5511, #5286Problems with UploadMediaDetails flow and UX#5527Optimised the flow and kept the location comparer & No Location dialog from popping up multiple timesMerged

2. Standardised the location-related flow of the app. Facilitated the successful switch to OSMDroid by resolving crucial logical errors during the switch, which caused the Map fragments not to behave normally and intensively tested for different scenarios:

Please Note: PR #5494 has been under review for the past 2 months as it's a crucial PR ;)

S. No.Issue No.Issue DescriptionPR No.Tasks PerformedStatus
1.#5413App crashed when opening Nearby tab when app does not have location permission#5418Assigned mapCenter to lastKnownLocation instead of it being null, when location permission was denied. It was a crucial PR, as this particular bug was causing a lot of problems in testing the Nearby fragmentMerged
2.#5256, #5461, #5490Standardise the location-related flow of the app and remove redundant code of location-based features. Nearby not working as intended. Explore tab crashing and not working as intended after switching to OSMDroid#5494Changed the location flow of the fragments which require location-related services, to one standard flow. Removed most of the redundant code by using and updating the LocationPermissionsHelper wherever possible. The switch to OSMDroid brought about issues related to the normal behaviours of Nearby and Explore tabs, especially when the location permission was denied. The PR resolved these issues by enhancing the flow and intensively testing for different scenarios and resultsOpen

3. Added a compass in the neaby home banner, which shows direction to the nearest place and highlights the nearest place on clicking the banner. Also enhanced the banner to update direction and distance from the nearest place as the user moves:

S. No.Issue No.Issue DescriptionPR No.Tasks PerformedStatus
1.#2239Request to add compass feature in home nearby banner#5433Computed the bearing between the 2 locations and rotated the compass in direction of the bearing. Works even when phone is held vertically :)Merged
2.#5445Request to highlight nearest place on clicking the banner#5453Changed marker colour of nearest place and also highlighted bottom sheet details. Additionally, solved the bug of the nearby home banner disappearing after clicking it onceMerged
3.#5444, #5455Updating distance as user moves Banner compass does not change direction after walking past it.#5459Updated nearby banner whenever user moves slightly, which resets the distance as well as direction of the nearest location.Merged
4.#5483Compass flickering as user moves#5486Removed initial direction set of compassMerged

4. Minor bug fixes and UI Improvements:

S. No.Issue No.Issue DescriptionPR No.Tasks PerformedStatus
1.#4664Migrate from Kotlin extensions and Butterknife#5506Moved the SettingsActivity from Butterknife to ViewBindingMerged
2.#4513Scrollbar was not visible until user actually tried to scroll it#5420Added property fadeScrollbars and set it to false. Also added background colour and width to the scrollbar , without which it doesn’t show up on some devicesMerged
3.#2307Making achievements activity more visible#5442Making achievements activity more visibleMerged
4.#5194Some icons are barely visible in dark mode#5410Changed colour-tint of required icons to primaryLightColourMerged
5.#5411Incorrect orientation of the arrow in media details card#5412Rotated image button by 180 degrees and renamed the arrow image fileMerged

Pull Request Review

S. No.Issue No.Issue DescriptionPR No.Tasks Performed
1.#5474App crash on switch from Light/Dark mode in the LocationPickerActivity.#5500Found a crucial case of the app crashing due to the changes and the reason for the crash. Suggested some code formatting improvements as the code style was a bit off.

Participation

  • I plan to create an Excel sheet which will be updated everyday with the work done on that particular day. It's link will be shared with the mentors to monitor my progress.
  • I will communicate with mentors on Zulip and GitHub based on the nature of the discussion.
  • I plan to take feedback from the community on GitHub for any specific changes required or any preferred UI/UX, as it's essential to incorporate changes suggested by the fellow developers :)

About me

I am Shashwat Kedia, a first-year undergraduate student at the Indian Institute of Technology, Madras, currently pursuing my B. Tech in Biological Engineering. I have been a software geek since my high school days and have a knack for problem-solving.

How did you hear about this program?

I got to know about this program from a senior at my university, who also happens to be a two time GSoC alumnus.

We advise all candidates eligible for Google Summer of Code and Outreachy to apply for both programs. Are you planning to apply to both programs and, if so, with what organization(s)?

I am eligible to apply for Google Summer of Code only and am applying only to the Wikimedia Foundation.

Past Experience

I have worked as an Android developer intern (3 months), wherein I worked in a team of 3 members to develop an application which collects and stores data of potential Parkinson's patients. That data is analysed and used to predict and diagnose the patient.

Apart from this, my personal projects include:

Be Alert: Women Safety App: Developed a unique Android app, which triggers the SOS Alert can be started by just shaking the device hard once, even if the app is closed. When the emergency is triggered, the app sends a message to selected contacts with your current location and also captures images from the back and front camera while recording audio of about 45 seconds. Then the app will dial up a selected contact and put the call on speaker automatically (currently, the speaker feature is supported only by Android devices running Android version 8.0 and below due to restrictions posed by Android)

Test Your Brain: Bull & Cow: Digitised the classic game of 'Bulls and Cows' into an Android app with a clean and attractive UI. Has different modes such as single-player, multiplayer and online room.

My personal homepage: https://shashwatkedia.github.io/PersonalHomepage/

Volunteer Experience

  • Coordinator, Institute WebOps and MobOps Team, IIT Madras
  • Deputy Coordinator, AI Club, IIT Madras
  • Deputy Coordinator, WebOps and Blockchain Club, IIT Madras

Relevant Skills

  • Experience in Android development with Java, Kotlin, XML
  • Understanding of Git and GitHub
  • Unit tests and instrumented testing
  • Proficiency in using SQL and Room Database
  • Understanding of Retrofit, RxJava, Jetpack Compose
  • Knowledge of Wikimedia APIs

Motivation for applying

I have always used Wikipedia for all my school projects, as we didn't have any ChatGPT at that time ;) and it was the most reliable source for all information. The images in the articles were of great quality and relevance. Since the Commons Android app is used to upload images which might be used in articles, it's my chance to give back to the Wikimedia Foundation. I am fortunate enough to have skills which can be used to help build and maintain the Commons Android app, so I would like to utilise them to the fullest through this program. While contributing to the app, I learnt a lot of skills and stuff which can never be taught in any Android development course and thus want to apply these for the betterment of the app itself.

Availability

Are you eligible for Google Summer of Code?

Yes.

Do you plan to submit any other proposal apart from this one?

No, I plan to submit only this proposal.

Do you have any other plans during the period of GSoC?

No, I do not have any other plans during the contribution period. Google Summer of Code is my topmost priority this summer.

How many hours per week can you dedicate to this?

Since a major portion of the contribution period would be covered under my summer break (up to July 29), I can dedicate approximately 35-40 hours per week. I can even increase the number of hours if and when required for the tasks to be completed on time.

Have you been accepted to GSoC before?

No. I am applying to the GSoC program for the first time.

Why I am the ideal candidate

  • I have been an active contributor to the Commons repository since December 2023 and have worked in almost all parts of the app, ranging all the way from UploadMediaDetails & Achievements to Nearby & Explore fragments. Thus, I am familiar with almost the whole of the code base, the code style and other norms followed by the app and the community.
  • I have solved issues which required intensive manual testing of the app in different cases and scenarios and optimising logic for all those scenarios, which is similar to the target of this GSoC, as it will be required to intensively test and optimise logic for different scenarios of the upload queue with it's new UI as well as the improved Nearby map.
  • I have patiently and efficiently implemented all minor changes and tweaks, as instructed by the maintainers during the review of a PR, sometimes over a period of 2 months (like in #5494 ).
  • Many times, I have independently found solutions and ideal flows when the maintainers couldn't reply/take a look due to a time crunch ( like in #5570 )
  • I understand the vision of the founders and maintainers of the Commons Android app, which is to expand the reach of free Wikipedia, especially to the most under-represented regions like Africa, by making it more fun and convenient to upload pictures. I align with the same thoughts and want to help achieve this goal by contributing to this project.
  • I wanted to participate in the Wikimedia Hackathon 2024 but couldn't apply, as its dates clashed with my university end-semester examinations. Thus, GSoC is my only chance this year to work intensively on this project.

Post-GSoC Involvement

My journey with the Commons Android app has been truly amazing, and I have learnt a lot while contributing. I have gained such exclusive knowledge about the workings of Android, which no formal course could teach me. It's the first open-source organisation to which I am contributing and will always hold a special place in my heart. Irrespective of whether I am selected for GSoC this year, I will keep contributing to the organisation as much as I can and help it achieve greater heights. If the maintainers feel so, I can also volunteer to mentor for next year's GSoC program, and it will be an honour for me to do so.

Event Timeline

@Nicolas_Raoul @Kaartic @RitikaPahwa4444 Can I please get an early review of my proposal so that I can make changes to it accordingly? Also, I have added an extra task #5524, as I thought that it's imperative to fix the pause/resume button behaviours to improve the whole upload management task. It would be easier for one already working on the upload queue to fix the pause/resume button simultaneously rather than working on it later. I hope that's not a problem :)

Great proposal!

Could you please sort the pull request section so that merged PRs appear first in the tables? With the ones you are most proud of first. And sort the tables from major to minor (if that's not the order already).

Thanks!

Thank you so much for taking the time to review my proposal :)

Um, what I have done is segregated PRs into groups with the group I'm most proud of on top and following descending order. In each group, the PRs follow a descending order as well. Should I continue this or make them into a normal table with all the PRs in it, following ascending order (merged ones at the top and open at the bottom)?

Several tables is fine. Would you mind putting merged PRs first though? Thanks :-)

@Nicolas_Raoul I've implemented the required changes. Just one doubt, the tasks mentioned here at points 2 and 3 seem to be mostly completed, except 3 B. I think adding only 3 B would be too small for the proposal, so I would like to add additional issues related to the upload queue, such as #4174, #5083. What are your thoughts on theses as alternatives to the task of 'Migration to ViewBinding' for a GSoC? Would you want me to add any other task as well?

Thanks for pointing this out!
I replaced 3A with a similarly sized task.

Do you have a task to suggest in replacement of 2? I think there are some other modernization tasks :-)

Thanks for replacing 3A!

I think there is one modernization task of Migration from RxJava to Kotlin Coroutines & Flows #4665, but it seems to be too big to be implemented as a whole, as the major chunk of time is to be allotted to improving the upload queue management. I think 3A and 3B are worthy enough to be implemented instead of the current task 2, which is Migration to ViewBinding. Even #2425 could be a good task.

@Nicolas_Raoul, another small doubt: will those open PRs not be considered, which have been under review for the past 2 months, but due to the time crunch of the reviewer, they are still open and being reviewed?

Very sorry for the review delays! What PR(s) are you thinking about in particular?

Absolutely no issues, @Nicolas_Raoul, I can understand how hectic it might be for you to manage all this :)
I was thinking about #5494 in particular, which has been under review by Sivaraam for the past two months and is yet to be merged ;)

Ah yes please put a special line for that one. Thanks for all of your hard work! 🙂

It's my pleasure to do so :) Sorry to bother you again, but what exactly am I supposed to do in "putting a special line for that one"? Should I write near the PR section that #5494 has been under review for the past two months or something similar?

ShashwatKedia051005 renamed this task from [GSOC 2024 Proposal]: Improve upload queue management and modernize the app to [GSOC 2024 Proposal]: Improve upload queue management and 'Nearby' feature of the Commons app.Mar 28 2024, 1:32 PM
ShashwatKedia051005 updated the task description. (Show Details)