Skip to content

Search#153

Merged
crongro merged 14 commits intocode-squad:sally4405from
sally4405:search
Mar 9, 2020
Merged

Search#153
crongro merged 14 commits intocode-squad:sally4405from
sally4405:search

Conversation

@sally4405
Copy link
Copy Markdown

https://sally4405.github.io/demoPage/search/searchUI.html
커밋 로그를 좀 더 신경 쓰라고 하셨는데 아직 익숙하지 않아서 방학때 좋은 커밋 로그 작성법과 깃에 대해 집중적으로 공부해보고 개선하겠습니다!
json 파일은 임시로 카드 ui 때 올려놓으신 파일을 사용하였습니다. sh로 시작하는 단어로 테스트 가능하고 아직 단어를 선택하는 기능은 구현하지 못했습니다.

sally4405 and others added 14 commits February 10, 2020 18:10
…지 넘어가는 기능 구현

amazon : html 과 css 기본 구조를 작성 / 화살표 버튼과 이미지 버튼 클릭시 이미지 넘어가는 기능 구현
js 버튼 클릭과 메뉴 클릭시의 index 변화를 하나로 통일해서 관리.
img child 와 text child 묶어서 container child 로 변경.
메뉴 버튼, 화살표 버튼, 슬라이드로 클래스 나누어서 구현중.
버튼 클릭시 슬라이드의 변화를 콜백 함수를 이용하여 구현하려고 함.
단어의 선택을 구현하기 위해? class를 사용하여 구조를 변경할 예정.
json 파일은 임시로 이전에 사용한 amazon cardUI 의 json 파일 사용.
Copy link
Copy Markdown
Contributor

@crongro crongro left a comment

Choose a reason for hiding this comment

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

좋아요!
기능을 좀더 완성해보시죠.

리뷰는 참고해서 수정하시고요.

일단 request changes 상태로 반려해둡니다.
계속 개발하시고 커밋&푸시 하세요.

]
},
{
"_id": "5b9777925890ef59b72912f7",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unique한 id설정을 잘 하신 듯!

<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Search UI</title>
<link href="searchUI.css" rel="stylesheet" type="text/css">
<script src="searchUI.js"></script>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

script선언위치가 위쪽인데, 보통은 body 마지작쪽에 선언하기도하고,(왜 그런지 알죠?)
아니면 위에 선언하고 defer나 async 속성을 추가하기도 합니다. (이렇게 추가하면 DOM파싱을 방해하지 않는다고 함)

@@ -0,0 +1,40 @@
window.addEventListener('DOMContentLoaded', () => {
let c = [];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

화나셨나요?

.then(response => response.json())
.then(users => {
let output = '';
users.forEach(function (user) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

고차함수안의 인자로 들어가는 함수는 간단하게 람다표기법으로 arrow function!

.then(response => response.json())
.then(users => {
let output = '';
users.forEach(function (user) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

forEach를 공부해서 reduce로 바꾸어보시죠.

if (event.keyCode === 8) {
c.pop();
}
else if (event.keyCode === 32 || (65 <= event.keyCode && event.keyCode <= 65 + 25)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

키코드는 주석으로 설명하던지, 변수로 저장해서 표현하던지~

let c = [];

//document.getElementById('fetchUserDataBtn').addEventListener('click', fetchUserData);
document.getElementById('searchInput').addEventListener('keydown', onkeydowns);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

keydown과 change 이벤트 차이는 무엇일까요?

@crongro crongro closed this Mar 9, 2020
@crongro crongro reopened this Mar 9, 2020
@crongro crongro merged commit 9b3201b into code-squad:sally4405 Mar 9, 2020
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.

2 participants