Profile Information
- Name: Kabir Singh
- Github : kabir-afk
- Phabricator:GonFreeaks
- Location: Delhi, India
- GSoC full time : Part time (avg 20h over 8 weeks)
- Workload: 175h
- Timezone: UTC+05:30
Synopsis
The "SignIt extension" project allows you to translate a word into French sign language on any web page. When you read a text and come across a word you don't know, highlight that word, right click and click on the Sign it icon: the sign in LSF and the definition of the word in French will appear on a window. The aim of this project includes migrating from manifest V2 to V3 and then later exploring cross browser format.
How it Benefits Wikimedia Projects:
SignIt is Wikimedia project to increase visibility and usability of our signed languages lexical resources (video). As Manifest v.2 is being phased out by Chrome Webstore, the project is under critical threat.
Manifest V3 extensions recoding will secure and expand Wikimedia's SignIt presence on Chrome and Firefox's web stores. It will also, de facto, create a « click-to-translate » web extension codebase, reusable by other Wikimedian or non-wikimedian open source enthusiasts.
Mentor
Have you contacted your mentors already?
Yes, I have initiated communication with my mentor,@Yug and I have successfully completed and fixed some microtasks in collaboration with the mentor.
Deliverables / Timeline
Main
- July 31st : Working, fully recoded manifest v3.0 web extension modular, easy to maintain code for
- Firefox
- Chrome
- August 31st : Web extension available extensions stores :
- Firefox extensions store
- Chrome extensions store
June 23, 2024
Coding Phase begins !!!
Week 1 June 23 -Jun 28, 2024
Migrating to service worker as per me is the biggest challenge of this project which needs to be overcome. Hence the long duration. Since there are many content scripts to deal with , moving their DOM and window calls to offscreenAPI is going to be a big task. Popup.js might not show many such calls , but other files like signit.js and wpintegration.js which seem to be the integrating files have many calls to deal with, including the ones that are responsible for triggering other components .Not only direct window and DOM calls but even the ones which manipulate DOM indirectly , like using jQuery post requests could also be moved to such offscreenAPI without having to change the request much.
The project has already used browser.storage.local api to much extent and utilizes its full potential , but as per V3 , we can no longer use the state variables like we used to since service workers terminate and re run multiple times during a single session, which might lead to not loading of these variables since the previous context was torn down. To get around this we’ll have to persist these state variables as well inside the storage API. Benefit of using it is that it’ll be available to all the content scripts and hence unnecessary message passing won't be needed. Those set states can then be easily accessed using chrome.storage.local.onChanged method, which is convenient.
Keeping the service worker alive is another thing to be taken care of during this period. Other things are there as well when migrating to service worker but they cam be taken care in a day or two - like converting timers to alarms.
Week 2 July 1 -July 5, 2024
Updating API calls doesn't require much time and one week should be more than enough.The only thing that has to be taken care of is replacing callbacks with promises. In the contributions I have mentioned down below , I have already updated tabs.executeScript() and tabs.insertCSS() with scripting.executeScript() and scripting.insertCSS(). Besides that, unsupported APIs have to be replaced.
Week 3 July 8 - July 13, 2024
Replace blocking web request listeners
In order to handle specific network requests , earlier we used to , programmatically tinker with them , but now is not the case, we can lay a rule sheet and make good use of it by giving declarativeNetRequest permission in the manifest.I haven’t explored it much but based on what I have read , it should enhance the security of the extension as well make for a long lasting future proof extension.
Week 4 July 15 - July 20, 2024
Improving extension security involves:-
- Removing execution of arbitrary strings.
- Removing remotely hosted code
- Updating content security policy.
- Removing unsupported content security policy values
Out of the 4 above , 2 have been partially addressed in the contribution mentioned below , issue id 55. The CSP has been updated as per manifest V3 and unsupported wikimedia-commons CSP has been removed. That only leaves us removing execution of arbitrary strings and removing remotely hosted code.
Mid-Term Evaluation
The timeline is made keeping in mind the Chrome MV2 deprecation stable rollout which is not clear as of now but as per resources it’ll take place in June 2024 + 1-X months , so safe to assume , at the very least , till mid-july. By midterm the extension will be having:-
- Full functionality with Manifest V3 , along with some isolated functionalities that rely on Manifest V2.
- Simplifying Localization such that i18n functions are exposed and accessible to all the content scripts.
- Retention of language settings throughout the user experience
- Improved extension security.
In the midterm evaluation phase, I will be addressing the reviews of the mentor and will be working to improve on them. By this time I’ll make sure that Beta version of the extension is readied and works to some degree both on chrome as well as firefox.
Week 5 July 25 - July 27
- In this period I wish to focus on cross browser compatibility by changing API namespaces and the way asynchronous events are handled have to be dealt with.
- With the introduction of Manifest V3, all the main browsers adopted the standard of returning Promises from asynchronous methods. Firefox and Safari have full support for Promises on all asynchronous APIs. Starting from Chrome 121, all asynchronous extension APIs support promises unless documented otherwise.
To take advantage of promises , WebExtension browser API Polyfill has to be reinstated and worked around . . . says mdn web docs_
- Resolving background scripts vs service worker by implementing browser_speciifc_settings.
Week 6 Final Submissions and Results (July 30 - August 3)
- Submit all final code contributions, documentation updates, and testing reports.
- Await the official Google Summer of Code results and acknowledge them promptly.
Week 7 Extended Coding Period (August 6 - August 11)
Continue contributing to SignIt if unable to meet the tasks in the scheduled timeline.
Final Evaluation
By the end of the GSOC – 2024 program (final evaluation), apart from fully functioning recoded manifest V3 extension , it shall also be having cross browser compatibility ready to be published on both chrome and firefox web store.
Final Submissions and Results (August 31)
Finalize any remaining contributions .
Participation
Communication Plan:
I am active on Phabricator ,email and discord. I plan on regularly updating my progress to the mentors, and getting feedback for the same.
Seeking Help:
Whenever stuck, I will notify on community channels or discord groups in order to seek help. Additionally, I will actively participate in the weekly meetings with mentors to discuss progress and address any issues as well as try to provide daily updates on code.
This plan outlines goals, benefits, mentorship, and a detailed timeline, showcasing a strategic and organized approach for Wikimedia Lingua Libre's SignIt extension during Google Summer of Code.
About Me
Education
I am currently a 2nd year student pursuing Bachelors in Computer Applications from Amity University,Noida.
How did you hear about this program?
I started writing code during my initial years of college. I have built various mini projects, and have collaborated on others as well.I participated in Hacktoberfest 2023 which further taught me how to contribute to open source . I came to know about GSOC from my friends and some online research .
Will you have any other time commitments, such as school work, another job, planned vacation, etc, during the duration of the program?
No, I do not have any other time commitments, such as school work, another job, planned vacation, etc., during the duration of the program and shall be contributing more to the organization.
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)?
No, I plan on participating only in Google Summer of Code 2024, with Wikimedia Foundation.
What does making this project happen mean to you?
Open sourcing has always fascinated and excited me sherely because of the potential it has . The learning opportunities that come with this project are even bigger and better. I get hands-on experience of what it's like to make an extension work as well as migrate it to a higher version.
Past Experience
I have been contributing since January, and have submitted patches to Lingua Libre SignIt. This helped me to get familiar with the codebase. Here are some of my contributions to the extension.
| Id | Title | Status | Notes |
|---|---|---|---|
| #49 | Onboard @kabir-afk | Merged | Changed Manifest file from V2 to V3 |
| #55 | Manual installation error on Chrome and Edge | Merged | Removed insecure CSP and replaced it with V3 comaptible CSP along with sandbox key |
| #63 | Migration to service worker initiated | In-Review | Removed polyfills |
| Introduced type checking for cross browser compatibility | |||
| Successfully imported banana module inside service_worker as well as restored its functionality in popup script. | |||
| Updated browser APIs. | |||
| Partially restored popup and modal functionality wrt V3. | |||
| Replaced jQuery post requests with fetch API. | |||
| declared Icontext variable in popup.js | |||
Describe any relevant projects that you've worked on previously and what knowledge you gained from working on them.
Ip-Address-Tracker: This project honed my skills in using React’s useEffect hook for side effects management and integrating Leaflet for interactive IP geolocation visualization. It sparked exploration of best practices for user experience with maps.
Coding skills
- I’m skilled in React.js and well acquanited with other full-stack technologies like node and express.js.
- In databases I am well versed with both MySQL as well as MongoDB.
- I utilize Postman as a core tool within my API testing workflow.
- I’ve had some experience with C/C++ as well while I was learning DSA.
- I also have little experience with Blender and 3js for a personal project I was working on.
Any Other Info
Hacktoberfest 2023: I was among the first 50,000 participants to have their first 4 PR merged and had the privilege to plant a tree in my name. Additionally, I received a coveted Swag kit as recognition for my contributions and dedication to open-source projects.Here are my badges and Tree-Certificate
Leetcode 2023: I had 500 submissions in the past 1 year and last year I was also awarded with 50 days Badge 2023.
CSSBattles : I have global rank 605 in cssbattles with over a 100 targets played and a total score of 70193.53, click here to see.
Frontend Mentor : I am frequently active on the said platform with a mentor score of 1000, see here.