Weekly Check-In | GSOC'21 | #7
SundeepChand
Published: 07/19/2021
Hello!
The first evaluation period is over now, and first of all, I would like to thank my mentors, @Cynthia Sanchez, @Sorin Curescu, @Kartikay Bhutani, @Aditya Sharma, @Devesh Vijaywargiya, @Shashank, for guiding me through this journey.
What did I do this week?
This week I worked on updating the Stories section in the homepage, user profile page and my stories page by combining the corresponding parts of code into a single React component, thus leading to almost 40% reduction of code in these pages and giving a unified look to the stories section. You can checkout the PR here. Apart from that I worked on optimising the stories search in the New Story page by dynamically fetching the stories from backend as the user types in the story title (Link to PR).
What is coming up next?
I will work on fixing the Cypress tests that I wrote last week. Even though the tests pass most of the times, on certain instances they fail. I am guessing that its failing due to some sort of race condition, which I will be digging up further, this week. Apart from that I will also work on adding more tests and fix some more issues.
Did I get stuck anywhere?
Yeah, while optimising the stories search, I faced difficulty while implementing debounce along with react-promise-tracker
and react-hook-form
libraries. However, I found some online resources that helped me in accomplishing the goal:
- React: How to prevent unnecessary api calls
- How to use debounce on input change with React-hook-form library
So that's all for this blog post. Have a nice day.
View Blog Post
Weekly Blog Post | GSOC'21 | #6
SundeepChand
Published: 07/12/2021
Hey folks. Hope you are doing well. So we are almost half way through this awesome program.
Implementing file attachments for New story and comments
This week me and my GSOC partner @Harshita Mangla alongwith our amazing mentor @Aditya Sharma worked on implementing support for file attachment feature while creating New Story, and posting comments and comment replies. Implementing the file upload feature required us to figure out the way to handle multipart/form-data in strapi. You can read more about implementing file upload in strapi here. Our mentor helped us setup the file upload feature when creating a New Story. Then we worked on implementing file uploads for comment and comment replies. Here is the link to an article that I referred to, while styling the file input. Apart from that we worked on refactoring that part of code and adding more details to the UI so that the user can add/remove files as per their wish. And here is the link to the final PR.
What's coming up next?
Since the file uploads was a high priority feature, we decided to finish it first. So, I had paused my work on the refactoring of Home.js, MyStories.js and Profile.js and shareable links for search results feature during this week. So I will start working on it next, once the file uploads feature is finalised.
So that's all for this blog post. Have a great day.
View Blog Post
Weekly Check-In | GSOC'21 | #5
SundeepChand
Published: 07/05/2021
Hi There!
What did I do this week?
This week I updated the Cypress tests in this PR to use data-cy to select the DOM elements in a way that is resilient to changes in the markup. You can read more about the Cypress best practices here. Next I started working on shareable search results link feature and here is the PR for that. However, I was stuck in figuring out a better way to manage the search filters state. Also, we decided to work on improving the code quality first, by refactoring the GraphQL queries, resulting in this PR.
What is coming up next?
I will work on improving code quality further by adding a proper state management mechanism, and finish the implementation of shareable search results link feature. Apart from that I will also work on refactoring some of more files as has been suggested by my mentor.
Did I get stuck anywhere?
Yes, I need to figure out, how to replace multiple useState() hooks with a useReducer() hook in our codebase, to improve the state management. Then only I can implement the shareable search results link feature.
So that's all in this blog post, see you next week!!
View Blog Post
Weekly Blog Post | GSOC'21 | #4
SundeepChand
Published: 06/28/2021
Hello Everyone!!
This blog post marks the beginning of the 4th week of my GSOC journey. Talking about the work I did during my 3rd week, I was not able to give enough time as I was a little busy with some of my college society work. However, since I am free from that work now, this week I will be working a little extra to make up for that.
Work done this week
Now talking about the improvements made this week, we have replaced CKEditor 5 with a markdown editor after discussing with my mentors, since customising CKEditor 5 as per our needs would have required us to create and maintain a new build of CKEditor which would have been quite cumbersome. Hence we decided to go for a markdown editor instead for now.
What's coming up next?
I have added shareable search results for product and category filters. I will be expanding it for other filters this week and create a PR soon. Apart from that my mentors suggested about working on improving the code quality for the frontend, since the codebase has grown bigger as more and more features have been added. So it is necessary to remove redundancy and make the components more reusable before adding features further. Hence we will be working in that direction along with the Cypress tests this week, once we are done with the features that are in progress.
So that's all in this blog post. Happy coding :)
View Blog Post
Weekly Check-In | GSOC'21 | #3
SundeepChand
Published: 06/21/2021
Hey Folks! I hope you're doing well.
What did I do this week?
This week the PR to seed the strapi server in test environment got merged. However, after merging it we realised that there were certain issues with my approach of creating the docker images. Basically, the issue was with the way I had tagged the images, so I've submitted a PR fixing the issue. I also updated the previously written Cypress tests, to use the newly seeded data. Once, the docker image setup is fixed this week, we would be all set to write more tests, & run them in github actions.
Apart from that, I also worked on implementing the request templates feature. Creating the strapi collection for this and setting up it on the frontend was simple. However, one of the challenging part is to add the support for custom placeholder text in CKEditor, about which I am researching a bit.
What is coming up next?
I will add the support for custom placeholder in template text. After that I will be updating the test suite, to include some of the newly added features. I will also try to add the shareable search results feature.
Did I get stuck anywhere?
I was stuck in figuring out the implementation of placeholder text, in request templates. I implemented a hacky solution for this, and after discussing about this with my mentors, the general conclusion was that it can be made better. So I spent some time learning the architecture of CKEditor and how to configure it. So far, I have figured out some of the bits and pieces that will be used to implement the feature, and now its time to put it all together.
Next week I will be sharing more about the final implementation request templates feature. So that's all for this blog post, thank you for reading.
View Blog Post