-
Notifications
You must be signed in to change notification settings - Fork 5
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
[FE] 라운지 화면 구현 #952
[FE] 라운지 화면 구현 #952
Conversation
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.
새로운 페이지 구현하느라 고생많았습니다! 굉장히 깔끔해용요
페이지 이름에 관해서는.. MainPage는 어떨까 생각이 들어요. 기존에는 랜딩 페이지가 MainPage로 쓰였으니까요..!
client/src/pages/lounge/Lounge.tsx
Outdated
}; | ||
|
||
return ( | ||
<ContentItem label={{left: '나의 행사목록', right: '전체보기', onRightClick: navigateCreatedEventsPage}}> |
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.
right, onRightClick이렇게 분리하는 것보단 클릭 핸들러가 부착된 컴포넌트 자체를 넘기는 것은 불가능할까요?
아마 Text, TextButton으로 분기시켜 구현하기 위해서 이렇게 분리된 듯 한데, 만약 children이 string이면 Text로 쓰고, 그 외는 전부 그냥 children 자체를 넘기면 가능 할 것도 같아서요,,!
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.
확실히 left, leftClick이 조금 보기 어려울 수도 있을 것 같아요. 아래 방식으로 개선해봤는데 괜찮을까요?
labels prop으로 ReactElement를 받도록 해서 label을 직접 컴포넌트로 넣어주는 방식으로 개선했어요.
<ContentItem
labels={
<>
<ContentItem.Label>나의 행사목록</ContentItem.Label>
<ContentItem.Label onClick={navigateCreatedEventsPage}>전체보기</ContentItem.Label>
</>
}
>
...
</ContentItem>
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.
구현해주신 라운지 페이지 잘 확인했습니다!
이번에 새로 생긴 이 페이지의 이름은 라운지 아니면 웨디가 말해준 것처럼 랜딩페이지를 MainPage가 아닌 LandingPage로 변경하고 이 페이지의 이름을 MainPage라고 해도 좋을 것 같아요!
그리고 CreatedEvent과 CreatedEventItem는 말씀해주신 것처럼 디자인만 존재하는 것은 아니고 또, 다른 곳에서 재활용될 것 같지는 않아서... 파일 위치를 이동하거나 혹은 기능을 완전히 분리하고 디자인만 남기는 것도 괜찮다고 생각합니당!
@@ -1,6 +1,6 @@ | |||
const EVENT = '/event'; | |||
const EVENT_WITH_EVENT_ID = `${EVENT}/:eventId`; | |||
const MY_PAGE = '/mypage'; | |||
const LOUNGE = '/lounge'; |
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.
제 pr과의 충돌을 매우 조심해야 할 부분이군요...
@@ -74,7 +74,7 @@ const EventPageLayout = () => { | |||
<DesktopShareEventButton onCopy={trackLinkShare} /> | |||
)} | |||
{isKakaoUser && ( | |||
<Link to={ROUTER_URLS.myPage}> | |||
<Link to={ROUTER_URLS.lounge}> |
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.
이런 파일들도 저랑 merge할 때 lounge로 잘 되어있는지 확인해요!
client/src/pages/lounge/Lounge.tsx
Outdated
{slicedEvents.map(event => ( | ||
<CreatedEventView key={event.eventId} {...event} /> | ||
))} |
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.
생성된 행사가 아무것도 없을 때, 다른 문구가 보여지면 좋을 것 같아요!
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.
오... 확실히 좋을 것 같아요
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.
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.
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.
회원의 기본 계좌번호가 없을때 뜨는 문구니까 기본 계좌번호를 입력했을 때 '회원에게 이득'이 되는 문구면 더 좋을 것 같아요!
음.. '기본 계좌번호를 설정하여 매 행사마다 입력해야 하는 번거로움을 해소하세요' 같은.. 근데 좀 간결한?!
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.
행사 목록 없을때 띄워지는 것도 너무 좋네요! 다만 문구에서 '아래'는 없어도 될 것 같아요!
그냥 '행사버튼을 ~'로 해도 충분할 것 같습니당
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.
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.
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.
* feat: mypage -> lounge 디렉토리 명 변경 및 탈퇴 관련 삭제 * feat: ContentItem 디자인 컴포넌트 제작 * feat: ContentLabel 컴포넌트 제작 * refactor: CreatedEvent에서 View 부분 분리 * design: content item VStack width 100% 추가 * fix: 생성 퍼널에서 뒤로가기 누를 때 -1로 대체 * feat: 라운지 페이지 기능 구현 * design: CreatedEvent 패딩 설정 변경 * refactor: left, right가 아니라 컴포넌트를 받는 방식으로 변경 * feat: 행사 생성 목록이 비었을 때 fallback 보이도록 추가 * feat: 계좌번호가 비었을 때 안내 문구 설정 * fix: 계좌번호 입력이 비었을 때 문구 변경 * fix: 행사 목록이 비었을 때 '아래' 문구 제거
issue
구현 사항
ContentItem, ContentLabel 디자인 컴포넌트 생성
라운지 페이지에서 프로필, 계좌번호, 행사 목록을 감싸는 컴포넌트를 생성했습니다.
props로 label, 수정 아이콘, children을 넣어줄 수 있습니다.
먼저 label부터 살펴보면 label은 왼쪽과 오른쪽, 각각을 클릭하는 콜백을 넣어줄 수 있습니다.
콜백을 넣어주면 TextButton이 되며, 콜백을 넣어주지 않으면 단순 Text 컴포넌트가 됩니다.
또한 label이 없으면 ContentItem의 패딩은 상하좌우 16px이고, 있으면 상하 8px, 좌우 16px이 되도록 구현했습니다.
다음으로 onEditClick은 수정 버튼을 클릭했을 때 실행되는 콜백으로 넣어주지 않으면 수정 아이콘이 보이지 않게 됩니다.
그리고 children으로 원하는 컨텐츠를 넣어주면 됩니다.
컴포넌트 사용법을 아래 예시로 남길게요!
라운지 페이지 기능 구현
회의 결과 이전 마이페이지를 (라운지 or 홈)과 설정으로 분리하기로 결정되어 이를 구현했습니다.
디렉터리와 그 하위 파일을 이동하게 됐고 이 영향으로 files changed가 많아요.
우선은 라운지 페이지라 명명했으나 네이밍에 대한 피드백을 주시면 반영하겠습니다~
아래는 구현 결과
CreatedEventItem에서 View 분리
나의 행사목록을 구현하기 위해 CreatedEvent 컴포넌트를 재사용하려고 했지만 이 컴포넌트는 안에 Input 검색을 포함하고 있어 가져올 수 없었습니다. 그 하위의 ContentEventItem을 재사용하려고 하니 그 안에는 체크박스와 수정모드에 대한 props가 있어 이것도 재사용 할 수 없었습니다. 그래서 정산 상태와 행사 이름 만을 포함하는 컴포넌트를 하나 만들어서 이를 CreatedEventItem과 Lounge에서 사용하기로 했습니다.
논의하고 싶은 부분
CreatedEvent과 CreatedEventItem의 위치
CreatedEvent과 CreatedEventItem은 Design 디렉터리 안에 있지만 디자인 기능 이외에 다른 기능이 들어가 있어서 이를 외부로 꺼내는 것은 어떨지 생각이 듭니다.
HStack, VStack width 100%에 대해
스토리북 문서에는 기본적으로 width 100%가 적용된다고 설명되어있는데 실제 사용을 해보니 따로 100%을 주지 않으면 100%가 되지 않는 것 같아서 이 점 논의하고 싶어요.
🫡 참고사항