Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] todo list 만들기 - jeongorl #14

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

[Feat] todo list 만들기 - jeongorl #14

wants to merge 13 commits into from

Conversation

JeongRon
Copy link

@JeongRon JeongRon commented Jun 7, 2024

42gg 프론트엔드 온보딩 1단계

todo list 만들기

  1. todo list 추가하기
  • 입력창에 텍스트를 입력 후, Enter를 누르면 todo list가 추가됩니다.
  1. todo list 삭제하기
  • DELETE 버튼 : todo list가 삭제됩니다.
  1. todo list 수정하기
  • MODIFY 버튼 : 수정 form으로 변환이 됩니다.
    • 수정 form 상태에서 텍스트를 수정할 수 있습니다.
    • SAVE 버튼 : 수정한 텍스트가 이전의 텍스트를 대체하여 todo list에 저장됩니다.
    • CANCEL 버튼 : MODIFY 버튼을 누르기 전의 텍스트의 todo list 상태로 돌아갑니다.
  1. todo list 완료하기
  • 클릭을 통해 todo list 완료 상태 유무를 지정해 줄 수 있습니다.

�todo list

- localStorage에 있는 데이터 todoList 배열에 넣기
- submit 이벤트 리스너 발생 시
   1. todoList 배열에 데이터 넣기
   2. todo리스트 UI 추가하기
   3. localStorage에 데이터 추가하기
1. 함수명 변경
    - saveTodoList() → savesaveLocalStorage() : todoList 안의 데이터들을 로컬 스토리지에 넣기
    - createTodoList() → createTodo() : deleteTodo(), saveTodo() 통일성을 위해 변경
2. 중복 코드 함수 처리
    - createTodoItemElement 함수 추가
3. 이벤트 리스너 코드 리팩토링
    - (e) ⇒ {실행 코드} / 명시적으로 이벤트 발생 시, 특정 코드와 함수가 실행되게 설정
-  todoList : data에서 complete : boolean 추가
- UI : toggle() 이용하여 complete 클래스 추가 or 삭제
-  e.stopPropagation() : 이벤트 리스너 부모 태그도 발생 하는 것 방지
- todoListContainer : box-shadow 추가
- modifyInput : border dashed 추가
- modifyInput : 최대 길이 30 추가
- todoListItemsWrapper : 텍스트 오버플로우시, ellipsis 적용
@siwolee
Copy link

siwolee commented Jun 7, 2024

css의 변천을 즐겁게 보았습니다. 최종 결과물이 나아졌다고 생각합니다.
수정 시 취소 등 구현하신 부분이 좋았습니다.

@irenee-14
Copy link

항목 수정 시 버튼의 역할이 바뀌고, 수정 중에 취소가 되는 부분이 인상깊었습니다.
css가 적용되어 예쁘게 만들어졌네요! gif 도 첨부되어 있어서 좋았습니다~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants