Skip to content

Conversation

@ShipFriend0516
Copy link
Member

@ShipFriend0516 ShipFriend0516 commented Nov 28, 2024

Note

스터디 시작 및 중지, 질문 넘기기, 사이드바 접기 구현, 진행 중인 세션에 대한 처리 등을 구현했습니다. 조금 늦었는데 시연 영상 찍는거 도와드리겠습니다..!

관련 이슈 번호

  • 작성자: 서정우
  • 작성 날짜: 2024.11.28

✅ 체크리스트

  • 코드가 정상적으로 작동하는지 확인했습니다.
  • 주요 변경사항에 대한 설명을 작성했습니다.
  • 코드 스타일 가이드에 따라 코드를 작성했습니다.

🧩 작업 내용

  • 스터디 호스트만 사용할 수 있는 도구, 일반 도구를 컴포넌트 분리
  • 사이드바를 접을 수 있는 Container 구현
  • 스터디 시작하면 스터디 진행 중 인디케이터 구현
  • 스터디 기능 구현 (질문, 스터디 시작 중지 등)

📝 작업 상세 내역

호스트 권한 관리 및 도구 분리

  • 상세 설명: 호스트만 사용할 수 있는 도구와 일반 유저들도 사용할 수 있는 도구 컴포넌트를 분리
  • 컴포넌트 분리를 통한 코드 구조 개선
  • 권한 별 기능 접근 제어 구현

사이드바 개선

  • 상세 설명: 사이드바를 접을 수 있는 Container 컴포넌트 구현
  • 스터디 진행 중 필요에 따라 사이드바를 숨길 수 있는 기능 추가

API 연동

  • 상세 설명: 스터디 기능 API 연동 및 스터디 시작 API 연동
  • 현재 질문과 이전 질문들의 기록을 서버와 연동하여 표시

📌 테스트 및 검증 결과

  • 프로그래스바 오버플로우 문제 해결 확인
  • 호스트/일반 유저 권한별 기능 접근 테스트
  • 사이드바 접기/펴기 기능 동작 확인
  • API 연동 테스트 진행

💬 다음 작업 또는 논의 사항

  • pnpm-lock 관련 이슈 해결 필요

🐥 리뷰 받고 싶은 포인트

  • 컴포넌트 분리가 적절하게 되었는지
    • /components/sessions/Toolbar 나 /Sidebar 폴더 아래에 세부적으로 분리해봤습니다. 괜찮은지 리뷰 부탁드립니다

- 스터디가 진행 중일 경우 참가를 막는 핸들러
- 서버에서 인덱스 변경 정보가 내려오면 인덱스 정보를 수정하는 핸들러
- 서버에서 스터디가 시작되었는지 내려오면 inProgress 상태를 수정하는 핸들러
- 시작과 중지시 토스트 메시지 안내하도록 구현
Comment on lines +241 to +246
socket.on(STUDY_LISTEN_EVENT.INDEX, handleChangeIndex);
socket.on(STUDY_LISTEN_EVENT.CURRENT, handleChangeIndex);
socket.on(STUDY_LISTEN_EVENT.NEXT, handleChangeIndex);
socket.on(STUDY_LISTEN_EVENT.START, handleProgress);
socket.on(STUDY_LISTEN_EVENT.STOP, handleProgress);
socket.on(STUDY_LISTEN_EVENT.PROGRESS, handleRoomProgress);
Copy link
Member

@yiseungyun yiseungyun Nov 28, 2024

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.

맞습니다 그 질문 넘기고 스터디 시작하는 기능들에 대한 이벤트에요. useSocketEvents로 분리되어있으니까 너무 편하게 구현했습니다👍👍🐽🐽

@ShipFriend0516 ShipFriend0516 removed the request for review from twalla26 November 28, 2024 12:25
}
};

return (
Copy link
Member

Choose a reason for hiding this comment

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

세션 페이지 자체가 어쩔 수 없이 길어지는데 제가 느끼기엔 비즈니스 로직과 UI를 분리하면 좋을거 같습니다. 이게 우선순위가 높은거 같아요. MyPage가 파일 자체는 별로 없는데 지금 UI랑 로직 분리해둔 상태입니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

아 네네 함수 구현 먼저하고 옮기려고했는데 깜빡했네요 감사합니다

roomId,
isHost,
}: Props) => {
const { openModal } = useModalStore();
Copy link
Member

Choose a reason for hiding this comment

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

모달은 modalStore가 아닌 useModal로 modal 인스턴스를 가져와서 사용하면 될거 같습니다. 이전 PR에 사용법을 적어두었습니다. #258
이 PR 참고하시면 좋을거 같아요!

if (!roomMetadata?.inProgress) return;
const interval = setInterval(() => {
setUptime((prev) => prev + 1);
}, 1000);
Copy link
Member

Choose a reason for hiding this comment

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

여기 1000은 무슨 뜻인가요? 스터디 진행 시간 측정하는건가요?

Copy link
Member

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.

넵 좋습니다

@ShipFriend0516 ShipFriend0516 merged commit dc08b84 into boostcampwm-2024:dev Nov 28, 2024
@ShipFriend0516 ShipFriend0516 deleted the feature/study-in-session branch December 5, 2024 16:50
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.

2 participants