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

[Feat] 새로운 그룹 참여 방식 구현 #9

Merged
merged 13 commits into from
Mar 10, 2024

Conversation

js43o
Copy link
Contributor

@js43o js43o commented Feb 6, 2024

설명

완료한 기능 명세

  • 그룹 아이템에 참여자 수, 초대 코드 표시
  • 그룹별 초대 링크 페이지에서 실제 그룹 정보 페칭

스크린샷

bandicam.2024-02-25.22-20-07-529.mp4

리뷰 요청 사항

  • 가입 신청 기능은 다음 PR에서 처리하겠습니다.

@js43o js43o self-assigned this Feb 6, 2024
@js43o js43o force-pushed the group-join-api branch 2 times, most recently from 6a3e4aa to 0a342a9 Compare February 24, 2024 13:27
@js43o js43o changed the title [Feat] 새로운 그룹 참여/가입 신청 방식 구현 [Feat] 새로운 그룹 참여 방식 구현 Feb 25, 2024
@js43o js43o marked this pull request as ready for review February 25, 2024 13:24
Copy link
Contributor

@ttaerrim ttaerrim 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 48 to 51
<div className={styles.membersCount}>
<People width={16} height={16} fill={grayscale200} />
<span>{membersCount}</span>
</div>
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
Contributor Author

Choose a reason for hiding this comment

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

=> 4030925 반영했습니다.

return data;
},
join: async ({ id }: Pick<ResponseGroupsDto, 'id'>) =>
morakAPI.post<null>(`${group.endPoint.default}/${id}/join`),
leave: async ({ id }: Pick<ResponseGroupsDto, 'id'>) =>
morakAPI.delete<null>(`${group.endPoint.default}/${id}/leave`),
findByCode: async (accessCode: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

p3; findByCode보다는 단일 그룹의 정보를 가져오는 거니까 group이라고만 해도 될 것 같다는 생각이 드네요.. (리액트 쿼리도) 서비스 부분의 컨벤션이 딱히 없어서 그런 것 같기도 하고요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

=> 5cda6d7 해당 API 경로(GET /groups/info)에 맞게 groupInfo로 맞추었습니다.

`${group.endPoint.default}/my-groups`,
);
const { data } = await morakAPI.get<
(ResponseGroupsDto & { membersCount: number; accessCode: string })[]
Copy link
Contributor

Choose a reason for hiding this comment

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

p2 : myGroup api의 타입은 ResponseMyGroupsDto를 사용하고 , all, findByCode api의 타입은 ResponseAccessCodeByGroupsDto 타입을 사용할 수 있을 것 같습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

방금 콘솔 로그로 확인해보니 myGroup, findByCode의 DTO에 있는 memberCount가 실제 응답 데이터에서는 membersCount로 오고 있어서 해당 DTO를 쓸 수 없을 것 같습니다. 이번 주 회의에서 의견 나눈 후 반영해 보겠습니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

아 지금 공용패키지 dto에는 memberCount인데 서버 레포지토리단에서 membersCount로 반환하고 있네요.
memberCount로 수정하겠습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

오 감사합니다..! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

=> ba8a7f0 반영했습니다.

Copy link
Contributor Author

@js43o js43o left a comment

Choose a reason for hiding this comment

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

초대 코드 복사 기능이 필요한 그룹은 비공개 그룹인 거죠?
비공개 그룹은 그룹 목록에서 보이지 않는 거였나요?
그리고 초대 코드는 모든 회원이 볼 수 있는 건가요?

  1. 초대 코드는 공개, 비공개 그룹 모두 사용할 수 있게 했습니다. (진짜 '초대'를 위해 필요하다기 보다는 그룹 리스트에서 일일이 해당 그룹을 찾을 필요 없이 링크를 통해 바로 접근할 수 있게 해준다는 의미가 큰 것 같아요)
  2. 비공개 그룹도 공개 그룹처럼 리스트에 노출됩니다. (대신 바로 참여가 불가능하고 가입 신청만 가능)
  3. 초대 코드는 해당 그룹에 참여한 사용자에 한해서 마이페이지 - 내가 참여한 그룹 영역에서만 보이도록 했습니다.

의미가 조금 헷갈리는 것 같기도 해서 '초대 코드' 대신 '참여 링크'처럼 이름을 바꾸는 것도 좋겠다는 생각이 드네요..!

@js43o js43o requested a review from ccxz84 as a code owner March 10, 2024 04:07
@js43o js43o merged commit 4c72259 into team-morak:develop Mar 10, 2024
1 check passed
@js43o js43o deleted the group-join-api branch March 10, 2024 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] 새로운 그룹 참여 방식 구현
4 participants