Page MenuHomePhabricator

GSoC 2021 Proposal - Commons Android app - Custom pictures selector which indicates what pictures have been uploaded already
Closed, ResolvedPublic

Description

Custom pictures selector which indicates what pictures have been uploaded already

Profile

Name: Aditya Srivastav.
Email: iamaditya2009@gmail.com
Education: NIT warangal, Telangana India
Linked-in: Aditya-Srivastav
Github : 4D17Y4
Other communication modes: Hangouts, discord, Zulip, Slack.
Location during GSoC: Lucknow/Warangal India.
Typical Working hours (include your timezone) during GSoC: 4:00 pm to 2:00 am (IST) UTC+5:30

Synopsis

App
Wikimedia Commons, an android app by the Wikimedia Foundation that allows users to browse and upload pictures to the Wikimedia commons repository from phones/tablets. Users can select images from the gallery or directly from the camera for an upload.

Project:
The project is about adding a Custom Picture selector activity that also indicates what pictures have been uploaded to the Commons server.
Issue link : https://github.com/commons-app/apps-android-commons/issues/175

Implementation

To be implemented
  • A custom image selector to select the image(s) for upload from the phone. This will be a simple image selector which will provide basic integration and will support further customization whenever required. For reference, I'll be using some open source image selectors such as
  • Differently showing the images which have been uploaded already.
Mock UI

Screen 1.

Screenshot_20210402-155708.png (2×1 px, 75 KB)

Screen gallery

  • A grid view of all the albums on the phone arranged by the last modified data (camera, all media given higher priority).
  • Display the name, count of media items on the respective folder.
  • Show the thumbnail of the most recent item as the cover image for the folder.

Screen 2 .

Screenshot_20210402-155654.png (2×1 px, 108 KB)

a) Picture selector

  • A grid view of pictures in the folder ordered by last modified.
  • Display an overlay image to indicate that the image is already present on Commons.
  • Show the thumbnails of the pictures.

Screenshot_20210402-155648.png (2×1 px, 116 KB)

b) Selected images view

  • Multiple image select activity
  • Show differently the selected images.
  • User not allowed to select already uploaded images.

Features:

  • Smooth scroll.
  • Lazy load in recycler view.
  • Asynchronous data fetch

Extra features if time permits:

  • Hold tap to get an image preview.
  • "No coordinates" overlay for the images that do not have location EXIF data.
  • Save the selector state to continue where the user left.
Implementation Strategy
  • Finalize UI
Create UI screens.Define layout attributes, create XML files for both screens
Initialize classes.Create java files handling UI functionalities such as display folder name and item count, click listeners, scroll and animations.
Load the images.Create a data loader class, get the data from content resolvers, and load thumbnails in the UI using glide.
  • Differentiate uploaded images
Load API.Fetch the API data from the Commons API.
Cache the data.Cache the API data with the images to reduce the time and server load.
Deferentially show the uploaded images.Use the API information to show differently the images that are already uploaded to the repository.
  • Integrate with the contributions activity
Link with fabCreate a new button under contributions FAB for image selector ( options to use default selector and camera available )
Forward activity result.Integrate the custom image selector activity with Commons app image upload activity.
Mentors

@Nicolas_Raoul
@Madhurgupta10

Timeline

Period ClassificationTasks
May-18 to June-6Community bonding periodGet to know mentors and community, Reading the documentation, Familiarize with app structure, Reading about Commons API.
DeliverableCommunity bonding report, Blog
Week 1 (June-7 June-13) DeliverableInitializing the User Interface, Creating classes.
Subtask 1Finalize the best UI strategy.
Subtask 2Completing the layout and initializing the classes.
Week 2 (June-14 June-20)DeliverableAdd the functionalities to the classes to extract the images from the gallery classified by folders, create models, and view models.
Subtask 1Create models and data source classes to fetch the data using content resolvers.
Subtask 2Create ViewModels to handle the data.
Week 3(June 21- June 27)DeliverableComplete UI integration with data, load the data to the UI.
Subtask 1Create all the required functions to handle the data.
Subtask 2Load the fetched data to the UI.
Week 4(June 28 - July 4)DeliverableImprove UI, add lazy load and improve scrolling, Demo UI run.
Subtask 1UI improvement, Demo Run.
Subtask 2Major and minor Bug fixes.
Week 5(July 5- July 11)DeliverableComplete Unit test for UI, bug fixes.
Subtask 1Test the UI.
Subtask 2Complete Unit tests for UI.
Subtask 3Blog post.
Week 6(July 12 - July 18)DeliverableIntegrate Commons API to fetch the data asynchronously.
Subtask 1Create data repository classes to handle the asynchronous load.
Subtask 2Evaluation.
Subtask 3Fetch the details of the image
Week 7(July 19- July 25)DeliverableImplement caching the data with images.
Subtask 1Implement caching the API data with the image.
Subtask 2Integrate caching to load data from the cache.
Week 8( July 26- Aug 1)DeliverableImprove the performance, complete test for API, caching.
Subtask 1Bug fixes and performance improvement.
Subtask 2Complete tests for API, caching.
Week 9( Aug 2- Aug-8)DeliverableIntegrate with the UI.
Subtask 1Make the required changes to the UI, models to integrate the API data with UI.
Subtask 2Load the API data to the UI and show the images to indicate uploaded to the Commons.
Week 10(Aug 9- Aug 15)DeliverableIntegrate with Commons upload.
Subtask 1Merge all the components and integrate the feature with Commons upload activity.
Subtask 2Improvement of the interface and functionalities.
Subtask 3Complete unit test on all UI features.
Week 11(Aug 16- Aug 23)DeliverableFinal Submission.
Subtask 1Final Evaluation
Subtask 2Major bugfixes, Ui improvement.
Subtask 3Remaining tests, code cleanup, documentation.
Subtask 4Overall Blog post.

About Me

I am Aditya Srivastav, a sophomore at National Institute of Technology Warangal, India pursuing Btech in Computer Science and Engineering (expected 2023). I am an active member of WSDC (Website and software development cell) the official website and app development team of the institute.

I love android development and have been doing it since my first year at college. Have developed several apps and have decent knowledge about android.

I like to sketch and paint in my free time. I love reading books and have a blog on book reviews. I am a Cybersecurity enthusiast and enjoy playing CTFs.

Achievements
WSDC hackathon - First position in android domain.
Phantom CTF - 2nd position (Oboy)
Recipient of College Merit Scholarship.
Recipient of UPSTSE scholarship 2016-2018.
Competitive coding

  • Codeforces-1423(Specialist)
  • Codechef- 1735
How did I hear about this program

I heard about GSOC in an open-source event conducted by my college. I participated in the Hacktober fest the next year and enjoyed collaborating. Since then I’ve been contributing to open-source projects and wanted to take part in Google Summer of Code.

Availability
  • Are you eligible for Google Summer of Code ? I’ve read the eligibility criteria and I am eligible to apply for Google Summer of Code.
  • Do you plan to submit any other proposal apart from this one ? No, I am only submitting this proposal.
  • Do you have any other plans during the period of GSoC ? No, I don’t have any other plans during the period of GSoC.
  • How many hours can you dedicate to this ? I have no other commitments this summer. I’ll be able to give 40+ hours per week. If required I can put in more time to finish up the goals for the week. I do not have any examinations in the Gsoc period. A major portion of the Gsoc ( week1 - week9 ) is contained within my summer vacation for the year. To successfully complete the project I've planned my last 2 week's timeline to accommodate any important academic classwork in the period.
  • Have you been selected to GSoC before ? No, this is my first time participating in GSoC.
What Excites me about this project

The idea of collaborating on a global scale, open-source project excites me a lot. Collaborating with such a great community would not only provide great exposure and experience but also would help me building strategies and coming up with solutions through discussion.
Participating in this project for GSOC is a great opportunity to improve my Java, android skills and learn a new set of skills.
Not to mention working for an organization that has the sole motto to provide "Educational content to all" will give me chance to give back to the community to the fullest.

Why should I be selected for the project
  • Skills
    • I am passionate about android and Java development. I’ve worked on android projects for a long time and have a good knowledge of its architecture. I am familiar with the latest android technologies and am well versed in the Java programming language. I have basic knowledge of API and caching in android. I’ve developed an application following professional MVVM architecture and am familiar with jetpack libraries. As a part of my course curriculum, I know Datastructures and Algorithms (DSA) and Databases and Management Systems (DBMS) . Thus, I believe I have the perfect set of skills required for this project.
  • Project
    • I've been contributing to the Commons android project since Dec'20. Fixed many major and minor bugs, reported many issues, helped maintainers in review, helped fellow contributors in bug fixes and contribution.
Past Experience

I’ve worked on many android applications and have developed an official android app for a startup. I’ve contributed and collaborated on several open-source projects. I am familiar with git, GitHub, and version control. I have experience working with amazon amplify as a backend in android application.

Projects
  • NITW Library app[ Open-Source ] - developed under devathon 1.0

    Implemented MVVM and room on a small scale.
  • Orgen Unreleased - developed for a startup dealing with organic products.

    Learned a lot about the backend, data fetching, caching and amazon amplify.
  • Minesweeper [ Open-Source ] - developed a minesweeper android game as a weekend project.

    Learned about the grid views, pop-up menus, and algorithm implementation in java.
  • Fibonacci clock [ Open-Source ] - an android project which shows time in Fibonacci pattern.

    Learned about the widgets in android.
  • Oddball [ Live ] - a web game application. Leaned JavaScript
  • Wsdc - a developer at WSDC, work on official site ( Feature implementation and Maintenance ) Django, SQL

Relevant Skills

  • Familiar with android architecture components.
  • UI design in Android.
  • Android SDK.
  • Jetpack library.
  • Github and git Version control.
  • Unit Tests in Android. ( Familiar with Robolectric environment on Junit framework )
  • Command-line interface.
  • Basics of Kotlin.

Contributions to Wikimedia Commons

Pull request

Link PRs

  • Total: 22
  • Merged: 20
  • Pending: 1
PR TaskStatus
#4128Fixed Contribution Crash on ScrollMerged
#4285Wrong language pre-selected in nearby uploadMerged
#4185Bookmarks not Updated in Picture Section after RemoveMerged
#4328Media details categories editor: categories not addedMerged
#4095Flickering FixedMerged
#4279Image dimensions reduced if too largeMerged
#4215Swiping on the last item in explore takes you to uploaded via mobileMerged
#4212Location not available while fetching location updatesMerged
#4148Theme changeMerged
#4256Added bookmark section in not-logged-inMerged
#4235App crashes on trying to upload media from galleryMerged
#4231Campaign notification is not removed from home even when disabling it in the settingsMerged
#4249Notification in read marks them readMerged
#4119Erroneous data FixMerged
#4265Tapping on the map doesn't close tab in nearbyMerged
#4346Back button in edit categories triggers back of media detailsPending
#4310Tapping multiple items in explore should not be allowedMerged
#4316First item in bookmarks in expanded stateMerged
#4110Author name in Dark theme FixedMerged
#4288Changed column nameMerged
#4319Added locationUtilsTesttMerged
Issues

Link Issue

  • Created: 14
  • Closed: 11
  • Open: 1
Issue Name Status
#4186Crash on tapping last itemClosed
#4215Swiping on last item in exploreClosed
#4232App crash on uploadClosed
#4250Bookmark when user not logged inClosed
#4266Image dimensions in media detailsClosed
#4178Bookmark not updatedClosed
#4123Abnormal behavior on theme changeClosed
#4287Tapping multiple items in exploreClosed
#4230Notification in read sectionClosed
#4211Location not availableClosed
#4098Author name in Dark themeClosed
#4311First Item in expanded stateClosed
#4318Hitbox for info in achievementClosed
#4329Back button in edit categories triggers back of media detailsOpen
PR Review
PR Name Status
#4315Help link in alert DialogueMerged
Helping Fellow Contributors
Issue Name
#4047Fixing truncated tips
#4086Tapping nearby notification
#4159Bookmark first item
#4142Attempting to open bookmark crashes app
#4263Clicking on the map should hide nearby list
#4224Crash on Explore list root fragment
Test PR
PR Test nameStatus
#4319LocationUtilsTestPending
Contribution in other repositories

Link PRs

PRName Status
#8338Don’t show increase new card limitMerged
#8378Type in the answer autofocus for answer fieldMerged
#8353Card browser becomes empty on toggling night mode.Pending
#8402Unit test for CollectionUtils.Merged

Link PRs

#4350Disable commenter image view on load thumbnail set to false.Merged

Event Timeline

First feedback on this proposal:

  • The app uploads pictures to the Commons server. "indicates what pictures have been uploaded to the commons android app" should thus be rephrased to "indicates what pictures have been uploaded to the Commons server".
  • The issue initially suggested cache invalidation, but we retracted that since image checksums do not ever change. Sorry for our indecisiveness. In case you are considering extra features if time permits, a "no coordinates" overlay could be an idea.
  • "Depicts" is a term we use a lot in the project with a different meaning. To avoid ambiguity, how about renaming "Depicts uploaded images" to "Differentiate uploaded images".
  • The third section of "Implementation Strategy" is called "Integrate with commons", I guess it is more "Integrate with the Contributions activity"? "Commons" usually refers to the server side.

Thanks!

AdityaSrivastav2009 set the point value for this task to 0.
AdityaSrivastav2009 removed the point value for this task.

Hi,

First Feedback from my side:

Please mentions the following things in your proposal

  • Do you have any examinations/labwork/classes during the GSoC period? if yes, please mention the dates.
  • Do mention the Unit Testing Libraries or frameworks you will be using/you are familiar with.

Thanks @Nicolas_Raoul, @Madhurgupta10,
I've made the changes.

A small query - Should I distribute the week's time among the subtasks of the week?

Looks pretty good!
No need to divide time in durations smaller than a week.
Minor correction: "commons" as the name of the website should always be uppercase: "Commons".

Thanks!

Few minor changes:

  • Roboelectric -> Robolectric
  • Add a link to view your all PRs/Issues (also for other repos, if any)
  • If the projects you have mentioned are open-source/live on the play store, please add links (not needed otherwise)

Hey @AdityaSrivastav2009

Thanks for showing your interest to participate in Google Summer of Code with Wikimedia Foundation! Please make sure to upload a copy of your proposal on Google's program site as well in whatever format it's expected of you, include in it this public proposal of Phabricator before the deadline i.e April 13th. Good luck :)

@Nicolas_Raoul, @Madhurgupta10, I've made the requested changes thanks for the feedback.

Thanks, @Gopavasanth for the reminder.

GSoC application deadline has passed. If you have submitted a proposal on the GSoC program website, please visit https://phabricator.wikimedia.org/project/view/5104/ and then drag your own proposal from the "Backlog" to the "Proposals Submitted" column on the Phabricator workboard. You can continue making changes to this ticket on Phabricator and have discussions with mentors and community members about the project. But, remember that the decision will not be based on the work you did after but during and before the application period. Note: If you have not contacted your mentor(s) before the deadline and have not contributed a code patch before the application deadline, you are unfortunately not eligible. Thank you!

Nicolas_Raoul closed this task as Resolved.EditedSep 21 2021, 1:38 PM

Implemented and merged into master branch, huge thanks to Aditya!