-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Team-21] RaQQoon Sidedish #18
[Team-21] RaQQoon Sidedish #18
Conversation
[Raccoon dev] 협업을 위한 기본 폴더구조 완성
Add. customHooks 생성
Sidedish raccoon dev 공통 컴포넌트 작업
Header UI 작업 마무리
Move. Header파일 Nav폴더로 이동
Add. Menu 파일 생성, 컴포넌트 분리
Add. Menu Component 분리
Sidedish raccoon dev
Fix. 머지 후 정상 작동 상태
Modify. carousel 카테고리 버튼 분리중
Feature/tab UI
Add. 카테고리 전체 보기 버튼 구현
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요 리뷰를 맡은 스노우입니다. ☃️
전체적으로 컴포넌트 나누기나, 로직 분리가 너무 잘되어 있어 코드 읽는데 불편함 없이 너무 편하게 봤네요, 저보다 더 잘하시는거같아요! 👏👏👏
남은 진행사항들 완성하면 다시 한 번 코드를 구경하러 오고 싶군요 😃
<link | ||
href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap" | ||
rel="stylesheet" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
폰트 로드 방법 및 최적화에 대해 한번 공부해보면 좋을 것 같습니다.
preload와 font-display: swap; 와 같이 웹 폰트를 불러 오거나, 로컬 폰트를 로드하는 다양하고 적절한 방법에 대해 공부해보시기를 권장드립니다.
TAG_EVENT, | ||
TAG_LAUNCHING, | ||
} from 'const'; | ||
import { v4 as uuidv4 } from 'uuid'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 uuid! 까지!
</HoverTextBoxDiv> | ||
); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
컴포넌트 구성과 로직분리가 깔끔하여 보기 좋습니다 👍
이미지 컨테이너와 이미지 모두 사이즈를 지정하고 있는데 혹시 이유가 있을까요 ?
만약 이런 경우, 이미지의 사이즈가 불규칙적인 경우에 대해 한 번 고민해보실 필요가 있을 것 같습니다.
width
혹은 height
100%
, overflow: hidden
을 활용해보세요!
return COLOR_LIGHTRED; | ||
default: | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
만약 이런 케이스별 색을 자주 쓰는경우 객체를 통해 관리해도 좋을것 같습니다 👍
지금도 👍 입니다
const moveLeft = () => {}; | ||
|
||
return dishList ? ( | ||
<CarouselStyled> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 경우, Fetch 실패시에도 로딩중으로 떠 사용자 경험에 좋지 않을 것 같습니다.
loading 상태를 추가하여 pending(loading), fulfilled, rejected의 케이스로 구분하는 것이 좋을 것 같습니다!
const data = await res.json(); | ||
const dataBody = await data.body; | ||
setResponse(dataBody); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loading, error state 추가에 대해 고려해주세요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try catch!
export const MSG_BOTTOM = '전국택배'; | ||
|
||
// Size | ||
export const SIZE_LARGE = 'large'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
변수 관리 너무 좋습니다!
객체형태로 관리해도 괜찮을 것 같아요!
<TabListDiv> | ||
{bestData.map(({ category_id, name }, idx) => { | ||
let tabState = DEACTIVE; | ||
if (tabIndex === idx) tabState = ACTIVE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
activeTab으로 index를 기억하는 방식은 어떨까요 ?
Tab이면 TabItem중에 하나만 Active 한 상태를 가질 것 같아서요!
padding-left: 1.5rem; | ||
font-family: Noto Sans KR; | ||
font-style: normal; | ||
font-weight: normal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
자주 쓰는 텍스트의 폰트 스타일을 빼줘서 쓰는것도 좋은 방법일 것 같습니다 !
import CarouselContainer from 'components/carousel/CarouselContainer'; | ||
|
||
const CarouselSection = () => { | ||
const paths = ['main', 'soup', 'side']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paths 라는 단어보다 categories 같은 단어는 어떨까요 ? paths라고 하니 뭔가 한번에 이해가 안되는거 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
categories가 이상하다는 생각에 path로 바꾸었는데 잘못 바꾸었네요 ㅎㅎㅎ 고치도록 하겠습니다!
질문에 대해 답변 드리자면,
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": ["src/*"]
}
}
} |
* Chore: 환경셋팅 및 폴더링 * Feat. MainMenu 마크업, itemCard 샘플 마크업#9 * Chore. 샘플카드 작성 #9 * Chore. Category 컴포넌트 생성 * Feat. Category UI #4 * Style. Add Header Styled Component #18 * Chore : .gitignore 파일 생성 * Chore : 프로젝트 폴더인 BE 폴더 안에 .gitignore 파일 생성 * Chore : side dish 스프링 부트를 이용한 gradle 프로젝트 생성 * Feat : jdbc를 이용한 mysql 연결을 위해 application.properties 설정 * Feat : side dish 프로젝트의 schema.sql 파일 생성 * Chore: .gitignore 추가 * Style. Head style and react icon 추가 #18 * Feat. delivery 작업 중 #9 * Feat: dish 관련 클래스와 레포지토리 생성 기본 프로젝트 골격을 잡기 위해 Dish, DishController, DishRepository, DishService, BestDishResponseDTO의 틀 생성 * Feat: badge 관련 클래스와 레포지토리 생성 기본 프로젝트 골격을 잡기 위해 Badge, BadgeRepository 생성 * Style: Category style #4 * Feat. hover & badge 완료 * Style: Category UI #4 * Delete BE directory * Delete .gitignore * Feat. 초기데이터 fetch 요청 -Fetch custom Hook 작성 -초기데이터: 메인메뉴, 카테고리1번 * Feat. tabClick 효과 구현 #33, MainMenu Fetch #3 * Style. categorySlide 1줄 나열. #4 * Chore. 더보기 버튼 구현시작 #5 * Feat. 상세페이지 폼 구현 - 배경색설정/상세페이지 위치 가운데로 설정/x버튼구현 - x버튼 클릭 시 기존 페이지로 보여줌 #36 * Chore. 불필요한 코드, 파일 제외하여 pr하기 * Feat. 상세데이터 fetch 받아옴 #38 Co-authored-by: eamon3481 <68339352+eamon3481@users.noreply.github.com> Co-authored-by: jeong-inho <derosatam76@gmail.com> Co-authored-by: Jeong InHo <63284310+eNoLJ@users.noreply.github.com>
안녕하세요. 웹폰트 로딩방법이나 에러처리 부분들을 더 공부하고 중복을 최대한 줄여야겠다는 생각이 드네요 또, 아직 부족하지만 칭찬해주시니 더 열심히 해야겠다는 생각도 드네요 ㅎㅎ 다음 PR에 말씀해주신 부분들 수정해서 올리겠습니다! |
ClassPathResource 사용 시 URL이 File프로토콜을 사용하는지 확인한다. 하지만 executable jar로 실행 시, URL이 jar:file:로 되어 file프로토콜로 인식하지 못한다. 따라서 InputStream으로 수정. Closes #18
- DishRepository 생성 및 테스트 코드 추가
- DishController 생성 및 테스트 코드 추가
* Chore. Category 컴포넌트 생성 * Feat. Category UI #4 * Style. Add Header Styled Component #18 * Style. Head style and react icon 추가 #18 * Feat. delivery 작업 중 #9 * Style: Category style #4 * Feat. hover & badge 완료 * Style: Category UI #4 * Feat. 초기데이터 fetch 요청 -Fetch custom Hook 작성 -초기데이터: 메인메뉴, 카테고리1번 * Feat. tabClick 효과 구현 #33, MainMenu Fetch #3 * Style. categorySlide 1줄 나열. #4 * Chore. 더보기 버튼 구현시작 #5 * Feat. 상세페이지 폼 구현 - 배경색설정/상세페이지 위치 가운데로 설정/x버튼구현 - x버튼 클릭 시 기존 페이지로 보여줌 #36 * Chore. 불필요한 코드, 파일 제외하여 pr하기 * Feat: toggle button #5 * Feat. 상세데이터 fetch 받아옴 #38 * Feat: loading 중에 loading 이미지 삽입 #5 * Fix: 호버 이미지에 margin 적용 제거 #4 * Style: cursor and category title * Feat. 배포API주소로 변경 (CATEGORY제외) * Fix. REACT WARNING 수정: HEADER styled-components 선언 위치 수정 * Feat: env 파일에 url 넣기 * Chore: fetch 대신 axios 이용 * Fix: fetch error 임시로 고침 - detail 컴포넌트에서 처음에 fetch 받는 데이터를 유효한 url로 주어서 에러가 나오지 않게 했다. * Fix: fetch error fix - fetch hook 에 null 이 들어오면 fetch 를 하지 않게 해서 처음랜더링 될때 fetch 하지 않게 했음 - 더보기 클릭 연속으로하면 나타나는 warning Warning: Can't perform a React state update on an unmounted component. -> useEffect에 클린함수로 상태값 초기화 시켜줘서 해결 * Fix: loading 화면 띄우게 하기 * Feat: Error handling - useFetch 안에서 error 처리 * Fix: FeedBack 반영 - component 명칭 통일 * Fix: Feedback 반영 - ModalMode => modalMode * Feat: add Modal component * Feat: loading gif MainMenu * Feat: error component * Chore. 복구 * Chore. error 수정 * Feat. portal사용-> modalError 수정 * Fix: header hover 에러 고침 * Feat: stock 0 일시 버튼 disable * Refactor: OrderBtn * Feat. 수량 onChange 작업 중 * Chore. PRICEE + STOCK 관리 추가 MERGING * Feat. 상세페이지 이미지클릭시 대표이미지 변경 * Feat. error 컴포넌트생성 * Feat. errorPage에서 메인홈으로 이동 * Chore. rebase FE * Chore. rebase 2/13 * Chore : .gitignore 파일 생성 * Chore : 프로젝트 폴더인 BE 폴더 안에 .gitignore 파일 생성 * Chore : side dish 스프링 부트를 이용한 gradle 프로젝트 생성 * Feat : jdbc를 이용한 mysql 연결을 위해 application.properties 설정 * Feat : side dish 프로젝트의 schema.sql 파일 생성 * Chore: .gitignore 추가 * Feat: dish 관련 클래스와 레포지토리 생성 기본 프로젝트 골격을 잡기 위해 Dish, DishController, DishRepository, DishService, BestDishResponseDTO의 틀 생성 * Feat: badge 관련 클래스와 레포지토리 생성 기본 프로젝트 골격을 잡기 위해 Badge, BadgeRepository 생성 * Delete BE directory * Delete .gitignore * Chore. merging(error+oath) * Feat. useFetch method전달방식 변경 - Ooath 인증코드 8080 포트로 post요청 -cors blocked * Feat. 캐러셀 상세페이지 적용 * Feat. DetailPage 미니캐러셀 구현 중 * Feat. 재고주문api요청보냄, but실패 * Style : detailpage * - * Feat. LOGIN 요청중 * Chore. 로그인 작업구현중 * Feat. 재고수량 DB 업뎃가능, (새로고침시만) * Fix: error * Feat. Login구현 -atomic component화 * Feat. 받은 토큰으로 다시 get요청 -> 로그인정보 가져오기 구현 * Refactor . 파라미터 분해할당 * Chore. 불필요한 constant파일 삭제 * Feat.로그아웃 api 요청 * Update README.md * Chore. igonore설정 * Chore. * Chore. 끝나지않는 merge * Feat. 범용성있는 Carousel은 전역 폴더링. -기타 중복 파일 삭제 Co-authored-by: eamon3481 <68339352+eamon3481@users.noreply.github.com> Co-authored-by: jeong-inho <derosatam76@gmail.com> Co-authored-by: Jeong InHo <63284310+eNoLJ@users.noreply.github.com>
진행상황
Dropdown 메뉴 구현
TabUI 구현
Carousel 구현
현재 뷰!
궁금한점
단순한 궁금점입니다. css module을 사용하는게 더 성능면에서 좋다고 들었습니다. 현재 styled-components를 활용하여 개발을 진행하고 있습니다. 너무 많은 styled components를 만드는게 아닌가? 그런 생각이 계속 드네요. 아직 잘 활용을 못하기도 하고, css를 import해서 사용하던게 익숙해서 그런지 아직까지 css in js가 어렵게 느껴집니다. 현업에서는 어떤 방식을 더 많이 사용하는지 궁금합니다.
useState의 초기값으로 null값이나 []을 사용하고 있는데, 최초 렌더링시 에러처리를
이런 형태로 하는게 괜찮은지 궁금합니다.
.env
파일을 생성해서path alias
를 했을 때, vsCode에서 컴포넌트를 auto import 할 때, 여전히 상대경로로 import가 되고 있는데 다른 설정이 필요한지 궁금합니다. 그리고 command 키를 이용해서 컴포넌트 내부로 들어갈 수 있어서 편리했는데, 설정을 하고나니 이걸 사용할 수 없게 되어 불편했습니다. 어떤식으로 검색해서 방법을 찾으면 좋을지 모르겠습니다.