Skip to content
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

Merged
merged 43 commits into from
Nov 16, 2024
Merged

[FE] 방 생성, 수정 기능 추가(#743) #746

merged 43 commits into from
Nov 16, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 9, 2024

📓 스토리북 링크

바로가기

📌 관련 이슈

✨ PR 세부 내용

1. 방 생성 플로팅 버튼 띄우기

-CoReA.Code.Review.Area.-.Chrome.2024-11-10.00-44-20.mp4

2. 입력폼 유효성 검사하기

완료 버튼 누르면 아래처럼 유효하지 않은 폼에 대해 에러메세지를 보여줍니다.

image
image

3. 키워드 생성하기

  • Enter 키 누르면 키워드 생성
  • 키워드 클릭하면 키워드 삭제

image

-CoReA.Code.Review.Area.-.Chrome.2024-11-14.13-09-53.mp4

4. 상세페이지 ControlButton 생성하기

MANAGER 일 때
image

PARTICIPATED 일 때
image

@github-actions github-actions bot added FE 프론트 개발 관련 작업 리팩터링 리팩터링 작업 기능 기능 구현 작업 디자인 디자인 관련 작업 labels Nov 9, 2024
Copy link
Contributor

@jcoding-play jcoding-play left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~! 👍

Comment on lines 62 to 63
overflow: hidden;
padding: 3rem 2rem 3rem 3rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

image

스크롤이 박스에 딱 붙어서 생기는 게 안 예뻐서 아래 ModalBody에 padding-right: 1rem을 추가하였더니 가운데 정렬이 안 맞았습니다.

그 이유로 ModalContent의 오른쪽만 2rem으로 변경하여 가운데 정렬로 맞췄습니다!

const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.key === "Enter") {
e.preventDefault();
const trimmedKeyword = keyword.trim();
Copy link
Contributor

Choose a reason for hiding this comment

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

스페이스만 치고 엔터키를 눌렀을 때는 제출이 되지 않게 하려고 trim을 추가하였습니다.

Comment on lines +93 to +100
<>
<div ref={firstChildRef} tabIndex={-1} aria-hidden />
{hasCloseButton && (
<S.CloseButton onClick={handleModalClose} ref={closeButtonRef} aria-label="모달 닫기">
&times;
<Icon kind="close" size="2.4rem" />
</S.CloseButton>
)}
{children}
</div>
<S.ModalBody>{children}</S.ModalBody>
Copy link
Contributor

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를 두었습니다.

Comment on lines 1 to 7
const validators = {
title(value: string): string {
if (this.isStringEmpty(value)) {
return "제목을 입력해주세요.";
}
return "";
},
Copy link
Contributor

Choose a reason for hiding this comment

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

더 추가해야할 유효성 검사가 있으면 이 댓글에 남겨주세요ㅎㅎㅎ!

Copy link
Member

@00kang 00kang left a comment

Choose a reason for hiding this comment

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

텐텐 작업하느라 수고했어요~👍

다만, 생성 페이지가 현재는 라벨과 인풋이 가로로 배치되어 있는데, 세로로 배치하는 건 어떤지 디자인 수정 제안드려봐요 ~

현재 디자인 제안 디자인
image image
출처

<CalendarDropdown selectedDate={selectedDateTime} handleSelectedDate={handleDateChange} />
<TimeDropdown selectedTime={selectedDateTime} onTimeChange={handleTimeChange} />
</>
<div style={{ display: "flex", gap: "1rem" }}>
Copy link
Member

Choose a reason for hiding this comment

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

스타일을 inline 속성으로 넣은 이유가 있을까요?

Copy link
Contributor

Choose a reason for hiding this comment

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

이 두 개의 속성 때문에 파일 하나를 새로 생성하는 것이 비용이 큰 것 같아서 inline으로 넣어두었습니다..!

Comment on lines +56 to +65
<Input
type="text"
placeholder="Enter키를 누르면 키워드가 생성돼요"
value={keyword}
showCharCount={true}
maxLength={20}
onChange={handleInputChange}
onKeyDown={handleKeyDown}
error={error}
/>
Copy link
Member

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;

Copy link
Contributor

Choose a reason for hiding this comment

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

이 파일 내에서만 쓰이는 값들이고 상수화 했을 때 코드가 분산되는 느낌이 있어서 하지 않았는데
상수화 했을 때 어떤 이점이 있을까요???😊

Copy link
Member

Choose a reason for hiding this comment

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

키워드 입력 퍼포먼스 너무 좋네요!!

@chlwlstlf
Copy link
Contributor

다만, 생성 페이지가 현재는 라벨과 인풋이 가로로 배치되어 있는데, 세로로 배치하는 건 어떤지 디자인 수정 제안드려봐요 ~

가로가 700px 밖에 되지 않아 위아래로 배치해도 인풋이 길어지지 않네요! 세로로 배치하는 것으로 디자인 수정했습니다😁

Copy link
Contributor

@pp449 pp449 left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

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

카드 컴포넌트 크기가 변경된것을 스켈레톤에도 반영했군요 😄

Comment on lines 53 to 62
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) === "";
Copy link
Contributor

Choose a reason for hiding this comment

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

해당 로직도 util 에서 처리했다면 조금 더 가독성이 좋을거 같다는 생각이 드네요 ㅎㅎ

Copy link
Contributor

Choose a reason for hiding this comment

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

validateForm 함수를 만들어서 이 부분을 util로 분리했습니다ㅎㅎ😊
e699e6e

@github-actions github-actions bot requested review from 00kang and pp449 November 16, 2024 06:07
@pp449 pp449 merged commit 92975d5 into develop Nov 16, 2024
3 checks passed
@pp449 pp449 deleted the feat/#743 branch November 16, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트 개발 관련 작업 기능 기능 구현 작업 디자인 디자인 관련 작업 리팩터링 리팩터링 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FE] 방 생성, 수정 기능 추가
4 participants