Oppia is an online learning tool that enables anyone to easily create and share interactive activities (called 'explorations'). These activities simulate a one-on-one conversation with a tutor, making it possible for students to learn by doing while getting feedback.
Oppia uses Angular as it's frontend framework. TypeScript used in Angular provides the project with a compiler option called strict. This turns on a set of type checking rules and is referred to as strict mode.
This is because code that passes these checks has several benefits:
- The code becomes more self-documenting
- Edge cases are caught, thus reducing potential runtime errors
- The written code will be more robust
My project was to enable strict typescript checks for files present in the codebase. The project was divided into two milestones, for each milestones a set of around files were made strictly typed.
Added strict typing for a set of 120 files.
- Milestone 1.1: Make TypeScript checks strict for some files
- Milestone 1.2: Make TypeScript checks strict for some files - (2)
- Milestone 1.3: Enables strict typescript checks for some files - (3)
- Milestone 1.4: Enables strict typescript checks for some files - (4)
- Milestone 1.5: Enables strict typescript checks for some files - (5)
- Milestone 1.6: Enables strict typescript checks for some files - (6)
- Milestone 1.7: Enables strict typescript checks for some files - (7)
- Milestone 1.8: Enables strict typescript checks for some files - (8)
- Milestone 1.9: Enables strict typescript checks for some files - (9)
- Milestone 1.10: Separate MockTranslatePipe from Unit-test.utils.ts
Added strict typing for a set of another 120 files.
- Milestone 2.1: Added unit-tests and strict type checking for state-property.service
- Milestone 2.2: Refractors UrlInterpolationService to not return null at interpolateUrl
- Milestone 2.3: Enables strict typescript checks for some files - (2.1)
- Milestone 2.4: Enables strict typescript checks for some files - (2.2)
- Milestone 2.5: Enables strict typescript checks for some files - (2.3)
- Milestone 2.6: Enables strict typescript checks for some files - (2.4)
- Milestone 2.7: Enables strict typescript checks for some files - (2.5)
- Milestone 2.8: Enables strict typescript checks for some files - (2.6)
- Milestone 2.9: Enables strict typescript checks for thread-data-backend-api.service
- Milestone 2.10: Removing nits from files covered in Milestone 2
I wrote a guide on strict types covering all major cases encountered in codebase and published it in Oppia wiki. You can read it here.
I was also a part of release testing team in Oppia. Here are the various issues found by me while release testing and developing Oppia.
- Broken image of author at "subscriptions" Tab
- No Option to Reorder Explorations at "Play Later" list
- Drag and Drop sort interaction gives some console errors
- Language of Delete and Export account buttons should also change like rest of the preferences page
- Audio Bar can be fixed or synced with Top-navigation-bar
It was an awesome learning experience working with Oppia this summer. Special thanks to Srijan Reddy Vasa who was my mentor for helping me whenever I faced any problem in completing this project. I would also like to thank Oppia for giving me this opportunity.
I would also like to acknowledge the help from other members of the community, who were always available whenever needed, just a small chat away. I strongly intend to continue contributing to Oppia.
Also, thanks to Google for this amazing program.