Skip to content

Conversation

@zelkovaria
Copy link
Member

@zelkovaria zelkovaria commented Feb 23, 2025

이슈번호

요약(개요)

길드의 카테고리 및 채널 정보 조회, 채널 생성 기능을 구현합니다

작업 내용

  • 길드 카테고리 조회
  • 채널 생성 모달 구현 및 api 연결
  • 공통컴포넌트 toggle 구현

집중해서 리뷰해야 하는 부분

기타 전달 사항 및 참고 자료(선택)

공통 컴포넌트로 쓰일 toggle 컴포넌트를 만들어놨어요! 해당 컴포넌트에 예시 및 prop 설명을 함께 뒀어요!

2025-02-23.5.56.40.mov

Copy link
Collaborator

@chysis chysis 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 27 to 31
const handleChannelNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const newName = event.target.value;

if (newName.length !== 0) setChannelName(newName);
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

image
length가 0이 아니어야 한다는 조건 때문에 채널 이름을 완전히 지울 수 없는 버그를 발견했습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

버그 제보 감사합니다!! 생각치 못했던 부분이었네요 🫠 버튼 활성화 여부도 함께 포함해서 수정해둘게요!

Comment on lines 21 to 35
background-color: ${({ theme, $isSelectedType }) =>
$isSelectedType ? theme.colors.dark[350] : theme.colors.dark[600]};

svg {
color: ${({ theme }) => theme.colors.dark[400]};
}

span {
color: ${({ theme }) => theme.colors.dark[400]};
}

&:hover {
cursor: pointer;
background-color: ${({ theme }) => theme.colors.dark[350]};
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

사소하지만, 선택되거나 호버했을 때 배경 색상을 조금 더 어둡게 하는 것은 어떨까요? 폰트 색상과 큰 차이가 없어서 읽는 데 영향을 줄 수 있다고 생각해요!

혹은 폰트 색상을 더 밝게 하는 것도 방법이 될 것 같아요 :)

Copy link
Member Author

Choose a reason for hiding this comment

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

좋은 것 같아요!
이전에는 밝은 감이 있는 것 같아요 ㅎㅎ
image
와 같은 색상을 아래처럼 수정해놨어요!
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

UI가 더 예뻐졌네요!! 👍

Comment on lines 24 to 28
const handleCategoryNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const newName = event.target.value;

if (newName.length !== 0) setCategoryName(newName);
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

이 부분도 categoryName이 완전히 지워지지 않는 버그를 발견했습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

channel이랑 함께 반영해둘게요 :)

Comment on lines 18 to 27
export const CategoryName = styled.div`
cursor: pointer;
display: flex;
justify-content: space-between;
width: 100%;

svg {
color: ${({ theme }) => theme.colors.dark[300]};
}
`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

image
align-items: center 속성이 필요할 것 같습니다 :)

Copy link
Member Author

Choose a reason for hiding this comment

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

매의 눈 👍🏻 반영해둘게용!

Comment on lines 34 to 36
<S.Channels key={channel.channelId}>
<BodyRegularText>{channel.name}</BodyRegularText>
</S.Channels>
Copy link
Collaborator

Choose a reason for hiding this comment

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

채널 타입에 따라 channel.name 앞에 맞는 아이콘을 넣으면 좋겠어요! 당장 반영하지 않아도 괜찮습니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

image
다음과 같이 반영해놨어요! 👍🏻

Comment on lines 29 to 31
export const Channels = styled.div`
display: flex;
`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

사소하지만, channel의 경우 padding-left로 indent를 주면 가독성이 더 좋아질 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

사소함이 굉장히 큰 변화네요 ✨ 덕분에 가독성이 훨씬 나아진 것 같아요!

isOn: boolean;
onToggle: () => void;
}
const Toggle = ({ isOn, onToggle }: ToggleProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

애니메이션 동작까지 좋아요 👍
컴포넌트 이름을 ToggleButton으로 두는 것은 어떤가요?

Copy link
Member Author

Choose a reason for hiding this comment

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

Toggle, ToggleSwitch, ToggleButton 등 다양하게 불리는 것 같은데 전 Toggle이 깔끔해보여서 요건 그대로 유지해둘게요! 의견 감사합니당 :)

Comment on lines 29 to 31
export const Channels = styled.div`
display: flex;
`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

cursor: pointer도 주면 좋을 것 같습니다 :)

Copy link
Member Author

Choose a reason for hiding this comment

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

:완완:

Copy link
Collaborator

@chysis chysis 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 79 to 87
export const CreateButton = styled.button<{ $disabled: boolean }>`
width: 11rem;
height: 4rem;
border-radius: 0.8rem;

color: ${({ theme }) => theme.colors.white};

background-color: ${({ theme, $disabled }) => ($disabled ? theme.colors.dark[400] : theme.colors.blue)};
`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

image

disabled가 버튼의 기본 속성을 활용하는 게 아니라서, $disabled가 true인 경우에는 click 동작을 막아야 할 것 같아요. 지금은 이름 없는 카테고리나 채널이 만들어질 수 있네요...!

(pointer-events?)

Copy link
Member Author

Choose a reason for hiding this comment

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

뜨헉 버튼 속성을 위한 disabled 추가할게요! 😅 추가로 cursor도 not-allowed 처리해둘게요 ㅎㅎ

Copy link
Collaborator

Choose a reason for hiding this comment

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

disabled, $disabled를 모두 사용해도 스타일 prop으로 구분돼서 크게 어색하진 않네요!

Copy link
Collaborator

@chysis chysis left a comment

Choose a reason for hiding this comment

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

수정 사항 확인했어요! 고생하셨습니다 😊

@zelkovaria zelkovaria merged commit 2cfa574 into main Feb 23, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FE] feat - 길드 카테고리 영역 및 설정 구현

3 participants