-
Notifications
You must be signed in to change notification settings - Fork 8
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] 방 생성, 수정 기능 추가(#743) #746
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.
수고하셨습니다~! 👍
overflow: hidden; | ||
padding: 3rem 2rem 3rem 3rem; |
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 handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => { | ||
if (e.key === "Enter") { | ||
e.preventDefault(); | ||
const trimmedKeyword = keyword.trim(); |
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.
스페이스만 치고 엔터키를 눌렀을 때는 제출이 되지 않게 하려고 trim을 추가하였습니다.
<> | ||
<div ref={firstChildRef} tabIndex={-1} aria-hidden /> | ||
{hasCloseButton && ( | ||
<S.CloseButton onClick={handleModalClose} ref={closeButtonRef} aria-label="모달 닫기"> | ||
× | ||
<Icon kind="close" size="2.4rem" /> | ||
</S.CloseButton> | ||
)} | ||
{children} | ||
</div> | ||
<S.ModalBody>{children}</S.ModalBody> |
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.
x 버튼을 오른쪽 상단에 고정하기 위해 children을 ModalBody로 감싸고 ModalContent에 position: relative
를 두었습니다.
const validators = { | ||
title(value: string): string { | ||
if (this.isStringEmpty(value)) { | ||
return "제목을 입력해주세요."; | ||
} | ||
return ""; | ||
}, |
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.
텐텐 작업하느라 수고했어요~👍
다만, 생성 페이지가 현재는 라벨과 인풋이 가로로 배치되어 있는데, 세로로 배치하는 건 어떤지 디자인 수정 제안드려봐요 ~
현재 디자인 | 제안 디자인 |
---|---|
![]() |
![]() |
출처 |
<CalendarDropdown selectedDate={selectedDateTime} handleSelectedDate={handleDateChange} /> | ||
<TimeDropdown selectedTime={selectedDateTime} onTimeChange={handleTimeChange} /> | ||
</> | ||
<div style={{ display: "flex", gap: "1rem" }}> |
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.
스타일을 inline 속성으로 넣은 이유가 있을까요?
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.
이 두 개의 속성 때문에 파일 하나를 새로 생성하는 것이 비용이 큰 것 같아서 inline으로 넣어두었습니다..!
<Input | ||
type="text" | ||
placeholder="Enter키를 누르면 키워드가 생성돼요" | ||
value={keyword} | ||
showCharCount={true} | ||
maxLength={20} | ||
onChange={handleInputChange} | ||
onKeyDown={handleKeyDown} | ||
error={error} | ||
/> |
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.
생성페이지의 Input 컴포넌트 전반적으로 maxLength와 placeholder를 상수로 관리해보는 거 어떨까요??
const KEYWORD_CONFIG = {
MAX_LENGTH: 20,
PLACEHOLDER: 'Enter키를 누르면 키워드가 생성돼요'
} as const;
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.
키워드 입력 퍼포먼스 너무 좋네요!!
가로가 700px 밖에 되지 않아 위아래로 배치해도 인풋이 길어지지 않네요! 세로로 배치하는 것으로 디자인 수정했습니다😁 |
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.
생성하기 버튼이 깔끔해서 좋은거 같네요 ㅎㅎ
고생했어요!
`} | ||
|
||
${media.large` | ||
height: 311px; | ||
height: 384px; |
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.
카드 컴포넌트 크기가 변경된것을 스켈레톤에도 반영했군요 😄
validators.title(formState.title) === "" && | ||
validators.classification(formState.classification) === "" && | ||
validators.content(formState.content) === "" && | ||
validators.repositoryLink(formState.repositoryLink) === "" && | ||
validators.thumbnailLink(formState.thumbnailLink) === "" && | ||
validators.keywords(formState.keywords) === "" && | ||
validators.matchingSize(formState.matchingSize) === "" && | ||
validators.limitedParticipants(formState.limitedParticipants, formState.matchingSize) === "" && | ||
validators.recruitmentDeadline(formState.recruitmentDeadline) === "" && | ||
validators.reviewDeadline(formState.reviewDeadline, formState.recruitmentDeadline) === ""; |
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.
해당 로직도 util 에서 처리했다면 조금 더 가독성이 좋을거 같다는 생각이 드네요 ㅎㅎ
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.
validateForm 함수를 만들어서 이 부분을 util로 분리했습니다ㅎㅎ😊
e699e6e
📓 스토리북 링크
바로가기
📌 관련 이슈
✨ PR 세부 내용
1. 방 생성 플로팅 버튼 띄우기
-CoReA.Code.Review.Area.-.Chrome.2024-11-10.00-44-20.mp4
2. 입력폼 유효성 검사하기
완료 버튼 누르면 아래처럼 유효하지 않은 폼에 대해 에러메세지를 보여줍니다.
3. 키워드 생성하기
-CoReA.Code.Review.Area.-.Chrome.2024-11-14.13-09-53.mp4
4. 상세페이지 ControlButton 생성하기
MANAGER 일 때
![image](https://private-user-images.githubusercontent.com/63334368/386823729-e7dc9764-839f-43db-b960-774b402adc36.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MTUxMTEsIm5iZiI6MTczOTUxNDgxMSwicGF0aCI6Ii82MzMzNDM2OC8zODY4MjM3MjktZTdkYzk3NjQtODM5Zi00M2RiLWI5NjAtNzc0YjQwMmFkYzM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA2MzMzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAwYTZkMDliY2E4OTljMzM2NmUwZjY2MjllMGIyMzhlZWQ3YjQ5MzE1YTE3NmRlODNlMDE5YjAyM2I1NmNjNTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.urjgQivchQf5q8lP3zkUSWdga_LtjQO-FUz6CJG3CIw)
PARTICIPATED 일 때
![image](https://private-user-images.githubusercontent.com/63334368/386823738-9f355c8f-7d23-4a89-8a82-a5f20c1133fb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MTUxMTEsIm5iZiI6MTczOTUxNDgxMSwicGF0aCI6Ii82MzMzNDM2OC8zODY4MjM3MzgtOWYzNTVjOGYtN2QyMy00YTg5LThhODItYTVmMjBjMTEzM2ZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA2MzMzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWViZmJiMTY1Y2UwZGY1NmQ4ZjcxNmVkMmExYmIzMzU5NTQ3ZDdkNGMwNWFmNGQ4OTY0YzAyZDE0ZDEyZGNlYjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.J3CGlB36sbUwTIS346ym__QVfL7ixWKY0LQmu_TtuUQ)