-
Notifications
You must be signed in to change notification settings - Fork 39
[김치영] sprint7 #168
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
Closed
Chiman2937
wants to merge
42
commits into
codeit-bootcamp-frontend:React-김치영
from
Chiman2937:React-김치영-sprint7
Closed
[김치영] sprint7 #168
Chiman2937
wants to merge
42
commits into
codeit-bootcamp-frontend:React-김치영
from
Chiman2937:React-김치영-sprint7
The head ref may contain hidden characters: "React-\uAE40\uCE58\uC601-sprint7"
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… mount 초기에 setstate가 실행되도록 수정
…ld에서만 처리하는 Logic은 유지)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
요구사항
기본
체크리스트 [기본]
상품 상세
상품 상세 페이지 주소는 "/items/{productId}" 입니다.
response 로 받은 아래의 데이터로 화면을 구현합니다.
=> favoriteCount : 하트 개수
=> images : 상품 이미지
=> tags : 상품태그
=> name : 상품 이름
=> description : 상품 설명
목록으로 돌아가기 버튼을 클릭하면 중고마켓 페이지 주소인 "/items" 으로 이동합니다
상품 문의 댓글
=> image : 작성자 이미지
=> nickname : 작성자 닉네임
=> content : 작성자가 남긴 문구
=> description : 상품 설명
=> updatedAt : 문의글 마지막 업데이트 시간
심화
배포
https://sprint-mission-kcy.netlify.app/
주요 변경사항
스크린샷
반응형 디자인(PC)
반응형 디자인(TABLET, MOBILE)
댓글 없는 페이지
문의하기 버튼 활성화
댓글 수정
로딩 스피너 적용
멘토에게
1. z-index 관리
케밥버튼 및 드롭다운 구현할 때 아래와 같이 다음 댓글에 의해 드롭다운이 가려지는 문제가 있었습니다. (예시)

z-index state를 만들어서 드롭다운이 활성화 된 댓글만 z-index 우선순위를 높이는 방식으로 해결하려고 했는데요, 현재 컴포넌트 구조는 이렇습니다.
(굳이 CommentView가 있는 이유는
CommentCard안에서CommentView와CommentEditForm중 하나를 렌더링 하기 위해서 입니다)├─ CommentsContainer
│ ├─ CommentCard
│ │ ├─ CommentView
│ │ │ ├─ KebabMenu(DropDown)
CommentCard가 댓글 한개의 최상위 컴포넌트여서 여기에 z-index를 적용하려면 KebabMenu의 isKebabSelected State를 Comment Card까지 끌어올려서 사용해야하는 문제가 있었고,

이 문제를 최대한 해결하기 위해 CommentCard에서 별도로 z-index state를 만들었고, handleKebabOpen, handleKebabClose 이벤트를 KebabButton에 props로 전달해서 z-index State를 변경하도록 만들었습니다.
이런식으로 해결은 했는데 결과적으로 KebabButton의 props는 늘어났고.. 이게 최선의 방법인지 모르겠습니다. 더 좋은 방법이 있을까요?
2. DropDown 커스텀
DropDown을 커스텀하면서 아래와 같이 Button과 DropDown을 하나의 컴포넌트로 구현했는데요, 따로 나눠서 만드는게 더 확장성이 좋을까요?
3. 컴포넌트 분리
이번 미션7은 진행하면서 최대한 가독성/역할 분리에 초점을 맞추고 진행을 했는데 개선해야 할 점이 있는지 궁금합니다.
그 외
처음에 완전히 플랫하게 작업 한 후, 필요에 따라 컴포넌트를 분리하는 식으로 작업하고 있는데 이 부분에서 시간이 상당히 많이 걸리는 것 같습니다... 연습하다보면 빨라지겠죠? 처음부터 어느정도는 분리를 해주면서 작업을 해야할까요? 😂