Skip to content

Feature(#82,#83,#84,#85) 화이트보드 다시보기 구현 #252

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

Merged
merged 17 commits into from
Dec 11, 2023

Conversation

Jw705
Copy link
Collaborator

@Jw705 Jw705 commented Dec 11, 2023

작업 개요

벌써 100번째 PR이네요..!

화이트보드 다시보기 프로토타입 데이터 (frontend/public/dummyCanvasData.json)를 가지고 화이트보드 다시보기를 구현했습니다.

close #82 프롬프트의 내용을 클릭 시 해당 시간대로 재생 시간 이동할 수 있다.
close #83 재생/정지 버튼 클릭 시 강의를 재생 정지할 수 있다. 재생/정지 버튼 클릭시 재생, 정지 여부에 따라 버튼을 토글한다.
close #84 강의 재생 정도에 따라 재생바를 표시하고, 강의 진행 시간을 표시한다.
close #85 강의 시간에 따라 화이트보드를 표시한다.

해당 작업과 함께 참여자 페이지 화이트보드 렌더링 과정도 조금 더 최적화 했습니다.

서버에 API요청을 해서 음성과 화이트보드를 불러오는 과정을 마친 후에 새로운 PR을 올리겠습니다.

작업 사항

  • 화이트보드 다시보기 데이터를 불러와 캔버스 화면에 그릴 수 있다.
  • 일시정지 버튼을 눌러 다시보기를 잠시 멈출 수 있다.
  • 진행 시간을 화이트보드에 표시할 수 있다.
  • 데이터가 아직 로드되지 않은 경우 프로그래스 바를 비활성화 한다.
  • 리뷰 페이지에서 브라우저 크기에 맞춰 캔버스 크기를 바로 조정하도록 한다.
  • 프로그래스 바나 logcontainer의 프롬프트를 클릭하여 시간을 조정하고, 해당 시간에 맞춰 캔버스를 다시 그린다.

스크린샷

231211.mp4

Jw705 added 16 commits December 8, 2023 23:40
1차 프로토타입을 구현했습니다. 아직 화면 깜빡임과 같은 오류가 있습니다.
화면 비율 계산 과정에서의 문제점을 개선하여 더 매끄럽게 다시보기가
가능하도록 개선했습니다.
강의자 화이트보드를 불러오는 과정을 최적화하고, 불러오기 함수의 인자를
더 명시적으로 확인 할 수 있게 개선했습니다.
다시보기 페이지에서 일시정지가 가능하도록 개선했습니다.
브라우저창의 크기를 변경할 때 캔버스 크기를 조절할 수 있도록 최적화
했습니다.
경과시간을 progressMsTimeState을 이용하여 관리하도록 했습니다.
resize 이벤트를 강의자의 화이트보드 내용 수신과 별개로 작동하도록 해서
참여자 페이지와 리뷰어 페이지에서 일시정지 상황에서도 브라우저 크기에
따라 resize 이벤트가 일어나도록 했습니다.
프로그래스바의 상태를 prograssBarState로 관리하도록 개선했습니다.
프로그래스바의 재생/정지 버튼 클릭 시 강의를 재생 정지할 수 있고, 재생/정지 버튼 클릭시 재생, 정지 여부에 따라 버튼을 토글합니다.
프로그래스 바 클릭 이벤트와 review 페이지를 연결하고, 일시정지 중에
변경시 원래 일시정지 상태를 유지하도록 했습니다.
시간을 프로그래스 바나 logcontainer에서 변경할 때 화이트보드 내용도 함께
변경하도록 개선했습니다.
마지막 canvas 데이터 재생 이후 onFrame이 멈추는 문제를 해결했습니다.
사용하지 않는 주석과 파일을 삭제했습니다
디버깅에 사용한 console.log를 삭제했습니다.
@Jw705 Jw705 added ✨ Feat 기능 개발 FE 프론트엔드 작업 labels Dec 11, 2023
@Jw705 Jw705 added this to the 6주차 milestone Dec 11, 2023
@Jw705 Jw705 self-assigned this Dec 11, 2023
Copy link

netlify bot commented Dec 11, 2023

Deploy Preview for boarlog ready!

Name Link
🔨 Latest commit a35c4a9
🔍 Latest deploy log https://app.netlify.com/sites/boarlog/deploys/6576bb2600a1400008b2fc6e
😎 Deploy Preview https://deploy-preview-252--boarlog.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -22,46 +22,65 @@ export const saveCanvasData = async (fabricCanvas: fabric.Canvas, currentData: I
currentData.canvasJSON = newJSONData;
currentData.viewport = newViewport;
currentData.eventTime = Date.now() - startTime;
console.log(currentData.eventTime);
Copy link
Collaborator

Choose a reason for hiding this comment

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

혹시 디버깅을 위한 로그라면 제거해도 좋을 것 같습니다!

Comment on lines +25 to +32
interface ProgressBarProps {
className: string;
totalTime: number;
prograssBarState: "disabled" | "playing" | "paused";
play: () => void;
pause: () => void;
updateProgressMsTime: (time: number) => void;
}
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
Collaborator

@Byeonjin Byeonjin left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

엇 netlify에서 빌드 실패했나봐요.
확인하셔서 이 부분도 해결해주시면 좋을 것 같습니다!

스크린샷 2023-12-11 오후 4 23 41

Copy link
Collaborator

@LellowMellow LellowMellow left a comment

Choose a reason for hiding this comment

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

코드 잘 읽었습니다. 기능들에 대한 관련된 코드가 점점 늘어나기 시작하니 슬슬 프로젝트의 전반적인 구조 관리를 시작할 때가 온 것 같다는 생각이 듭니다. 특히나 Header에 들어간 로직들이 많아 많이 복잡해진 것 같습니다. (제 코드가 바로 그 예시입니다.) 역시 한 번에 좋은 구조를 떠올리기는 어렵네요!... 고생 많으셨습니다. 시간 나면 같이 개선해봅시다.

Comment on lines 104 to 105
console.log(replayFileArray);

Copy link
Collaborator

Choose a reason for hiding this comment

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

이 부분도 불필요한 console.log라면 지워주셔도 좋을 것 같습니다.

height: 0
};
// 추후 해당 다시보기의 전체 플레이 타임을 받아올 수 있어야 할 것 같습니다.
let TOTAL_MS_TIME_OF_REVIEW = 200000;
Copy link
Collaborator

Choose a reason for hiding this comment

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

임시로 지정해둔 전체 플레이 타임이군요. 좋습니다.

logContainer 컴포넌트의 인자가 증가해서 생긴 배포 오류를 수정하고 리뷰
내용을 반영했습니다.
@Jw705 Jw705 merged commit f33e196 into boostcampwm2023:dev Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment