Pagination, Privacy Policy, Bug Fixing and Testing in the User Story system in GSOC’20

Published: 08/10/2020

I started this week with a heavy heart. I entered the last coding phase of the best experience of my life. I made my mind that I will keep contributing to this project and organization and make the most of this awesome learning opportunity. I will not let it end here. I can already imagine a smile on my mentors face as they read this. You are the best people I have ever met and worked with. Now lets jump to my magic work. :)

“Many solutions will work but keep solving the problem till you optimize it and reach the best possible solution.” I do not know which genius said this but I my mind got stuck with this and I decided to spend some time to add pagination for our beloved users. This means users can reach any page with a click and we do not have to load all stories in one go. Imagine our free Heroku servers burning on hitting the API to load 500+ stories in one go. LOL!

The most important thing before going live was telling users how we are going to use their data. I worked on the privacy policy page and created a new model in the back end so that admins can manage its contents and update the privacy policy when needed.

This also means that we have to notify users of a privacy policy update. I wrote a custom lifecycle hook in Strapi which automatically creates a notification when the old policy is deleted and a new one is created. This special notification is displayed as a popup modal on the home page for users who are already logged in. They have the option to accept the new policy. If they do not accept then they can continue using our system but are logged out. This means they can only read existing stories.

New users will not see the modal as they can access the updated policy when they register into our system.

After pushing these heavy changes to production I fixed some bugs related to the my stories page and pagination not working along with product filters.

Finally I studied Cypress docs for some time. I set up Cypress for our client side so that we can write, run and debug tests easily.

I have identified some bugs on the client side and I will spend some time to fix them.

I will try to give the remaining time for writing tests as they are really important to future proof our application.

I have a lot of exciting new features in mind like Slack integration, email notifications etc and I will add them only if time permits.

I understand that the best things take time and patience and I will keep adding a thousand more features to user story even after GSOC. :)

It is natural to get stuck while trying to do the best things.

I got stuck at multiple places while trying to make the pagination feature work along with other filters. Covering all possible cases for the privacy policy model was also a bit tricky. Discovery of new bugs might be a bit easy but they can be difficult to solve. Cypress and software testing in general was absolutely new to me.

I do not give up easily and kept trying to overcome all obstacles by the end of the week. All my efforts were really worth it. I learnt a lot.

I am also blessed to have such awesome mentors for support and motivation. They work really hard everyday and I learn a lot just by observing them. :)