DEV Community

jsong89
jsong89

Posted on • Edited on

Comeback to first project

Github Repo: Project
Issue: Issue
Pull-Request: Pull-Request

Overview

The final week of Release 0.2 has finally unfolded. I thought a lot about which project to decorate for the last time, and the final conclusion I came to was a return to "to do-app", which was the first project I chose. Because, in fact, in the case of to do-app, it was a very simple api that was made for beginners or junior developers, so I was able to add the functions I wanted relatively easily..!

In the Progress

Therefore, I suggested adding the function to the owner of the project who kindly gave me a chance. It was just the addition of a "done all button". In the existing API, there were only "Delete All" and "Enter" buttons, so something was missing in the design and gave a feeling of emptiness. requested from the owner.

Very kindly the owner asked me basic concepts and then gave me permission to solve the issue. So I immediately started working on fixing the code. Rather than trying to forcefully change or modify the code, I wanted to solve the problem using existing added or modified code blocks and functions as much as possible. So, I arranged the "delete all" feature the way it should, and added a "done all" feature like the one below.

function allDoneStorage() {
  var items = JSON.parse(localStorage.getItem("todos"));
  if (confirm("Do you really want to set all-done?")) {
    items.map(function(e){
      if(!e.completed){
        e.completed = true;
      }
    });
    localStorage.setItem("todos", JSON.stringify(items));
  }
}
Enter fullscreen mode Exit fullscreen mode

We also added CSS to support the design part of that button.

.all-done {
  cursor: pointer;
  background-color: lightseagreen;
  margin-left: 10px;
  outline: none;
  max-height: 50px;
  height: 50px;
  width: auto;
  text-align: center;
  font-size: 1.6rem;
  border: none;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 10px;
  transition: all ease-in 75ms;
}

.all-done:hover{
  background-color: green;
  color: white;
}

.clear:hover {
  background-color: darkred;
  color: white;
}
Enter fullscreen mode Exit fullscreen mode

So..

After all the upgrades were successfully completed, I requested a pull-request, and fortunately, the addition was successful without much. Of course, a very big thank you to "nirajacharyaa", the owner of the repository, who was very helpful with my successful release 0.2. :)

With finishing Release 0.2

This release was very impressive and it was actually a long-term project I had been working on, and it was a very valuable experience that made me realize how difficult it is to bring someone else's code, modify it, and upgrade it. I hope this opportunity will come again next time, and I thought that it would be very good if I could try this learning opportunity by myself as well.

Top comments (0)