Skip to content

Conversation

@SeonghoJin
Copy link

이렇게 하면 되는건가여? 풀리퀘처음해보네요 ㅎㅎ

Copy link
Collaborator

@Tetramad Tetramad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load함수의 사용 방식이 인상적이었습니다. 👍
localStorage 사용 방법에 대해서 많이 배워갑니다. 제가 찾던 저장 방식이네요. 😀
다만, 코드 스타일에 일관성이 없는 것은 용서할 수 없습니다. 😠
쌍따옴표(") 관련 버그는 수정해주시기 바랍니다. 🔧
todoMVC 내용은 제거하시고 올려주셨으면 합니다!

@@ -0,0 +1,56 @@

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

첫 줄을 비워두시는 이유가 있을까요?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아무도 보지 않은 것이라고 생각해서 엉망진창으로 코딩했네요..

Comment on lines +2 to +56
html{
text-align: center;
font-style:italic;
}

input{
width : 400px;
height : 50px;
font-size : x-large;
}

main{
display:inline-block;
width : 400px;
}

input::placeholder{
font-style:italic;
font-size: x-large;
font-weight : bold;
}
#createToDo{
border: none;
margin : 0px;
box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}

#contents{
padding :0px;
text-align: center;
margin : 0px;
}

.content{
box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
text-align:left;
display: inline-block;
position: relative;
width : 400px;
height : 50px;

}

.content h1{

margin : 0px
}

.destory{
position : absolute;
top : 13px;
right :10px;
font-weight: inherit;
color: #cc9a9a;
} No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ CSS property 표기의 일관성이 떨어지는 것 같습니다.

property: value
property : value
property:value

위 세 가지 중 하나만 사용하시는 것을 권장합니다.
직접 맞추기 힘드시다면 Prettier 확장 프로그램을 추천해드립니다.
code style을 맞춰주는 툴은 항상 편합니다! 👍

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 정보감사합니다 ㅎㅎ

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettier 저도 알아갑니다 총총...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seki님 말씀 메모메모

}

.content h1{

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

가독성과 무관한 빈 줄은 제거해주세요.

function enterkey(){
let input = document.getElementById("createToDo");

if(window.event.keyCode == 13){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KeyboardEvent.keyCode는 deprecated된 기능입니다.

let input = document.getElementById("createToDo");

if(window.event.keyCode == 13){
console.log(input.value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

디버깅을 위한 console.log는 PR전에 제거해 주세요!

let button = document.createElement("button");

button.setAttribute("class","destory");
button.setAttribute("onclick", "remove(" +"\""+val+"\""+")")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

event object를 사용하는 것이 더 좋을 것 같습니다.

Suggested change
button.setAttribute("onclick", "remove(" +"\""+val+"\""+")")
button.setAttribute("onclick", remove)

🔧할 일 이름에 쌍따옴표(")가 들어가면 동작하지 않는 문제가 있습니다.

Comment on lines +3 to +32
<html>
<head>
<meta charset="utf-8">
<link rel = "stylesheet" href = "CSS/index.css">
<title>vanilaToDoList</title>

</head>
<body>
<header>
<div>
<h1>
Seongho's vanilaToDoList
</h1>
</div>
</header>
<main>
<div>
<input onkeyup = "enterkey()" id = "createToDo" placeholder="Enter to save your task" autofocus>
</div>
<ul id = "contents">
</ul>
</main>
<footer>
<div>

</div>
</footer>
<script src = "JS/index.js"></script>
</body>
</html> No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

원래 HTML 작성하실 때 탭을 사용하시나요?
아니라면 위랑 동일하게 Prettier 사용을 권장합니다.

@Tetramad Tetramad requested review from HodaeSsi, PParkJy, Parkhyunseo, Tetramad, leaf-upper, loin3 and mywnajsldkf and removed request for Tetramad May 11, 2020 04:39
@leaf-upper
Copy link

MVC패턴을 이용해서 구현하셨는데 정말 고생하신것 같습니다. 바닐라 JS에서 이렇게까지 할 수 있다는게 놀랍고, 직접 css짜신게 seki님과 마찬가지로 정말 대단하신것 같습니다!

@SeonghoJin
Copy link
Author

아이고, 제가 정리하지않고 올린것이라서 vanilajs안에 todoMVC라는 내용도 들어가버리게되었습니다. ㅜㅜ 죄송합니다.. 풀리퀘란 것이 이렇게 진행되는거였군요.

Copy link

@PParkJy PParkJy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고 많으셨습니다!!

Comment on lines +1 to +13
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "openHtml",
"type": "shell",
"command": "index.html",
"problemMatcher": []
}
]
} No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 파일의 역할은 무엇인가욥??

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual Studio Code 기능 중 하나인 Task에 관련된 파일입니다. 자주 사용하는 명령어를 포맷에 맞게 등록해두면 [Tasks>Task 이름]으로 바로 실행하게 해줍니다.

Comment on lines +2 to +56
html{
text-align: center;
font-style:italic;
}

input{
width : 400px;
height : 50px;
font-size : x-large;
}

main{
display:inline-block;
width : 400px;
}

input::placeholder{
font-style:italic;
font-size: x-large;
font-weight : bold;
}
#createToDo{
border: none;
margin : 0px;
box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}

#contents{
padding :0px;
text-align: center;
margin : 0px;
}

.content{
box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
text-align:left;
display: inline-block;
position: relative;
width : 400px;
height : 50px;

}

.content h1{

margin : 0px
}

.destory{
position : absolute;
top : 13px;
right :10px;
font-weight: inherit;
color: #cc9a9a;
} No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettier 저도 알아갑니다 총총...


</div>
</footer>
<script src = "JS/index.js"></script>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index.js를 html 시작 부분이 아니라 뒷 부분에 사용하신 이유가 있으신가요?

Copy link

@mywnajsldkf mywnajsldkf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vanila.js는 처음인데 궁금하네요! 잘 봤습니다.

Comment on lines +2 to +56
html{
text-align: center;
font-style:italic;
}

input{
width : 400px;
height : 50px;
font-size : x-large;
}

main{
display:inline-block;
width : 400px;
}

input::placeholder{
font-style:italic;
font-size: x-large;
font-weight : bold;
}
#createToDo{
border: none;
margin : 0px;
box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}

#contents{
padding :0px;
text-align: center;
margin : 0px;
}

.content{
box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
text-align:left;
display: inline-block;
position: relative;
width : 400px;
height : 50px;

}

.content h1{

margin : 0px
}

.destory{
position : absolute;
top : 13px;
right :10px;
font-weight: inherit;
color: #cc9a9a;
} No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seki님 말씀 메모메모

Comment on lines +7 to +11
if(localStorage.getItem(input.value) == null && input.value != "")
{
localStorage.setItem(input.value,JSON.stringify(input.value));
draw(makecontent(input.value));
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 이해가 잘 가지 않는데 설명 부탁드립니다!

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.

5 participants