Skip to content

Feat(#209, #240) 다시보기 페이지 프로그래스바 및 프롬프트 기능 구현 #241

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 6 commits into from
Dec 10, 2023

Conversation

Byeonjin
Copy link
Collaborator

@Byeonjin Byeonjin commented Dec 9, 2023

작업 개요

다시보기 페이지 프로그래스바 및 프롬프트 기능 구현

작업 사항

Feature: 다시보기 페이지 영상 프로그래스바 구현 close #209

  • UI
  • progress bar
    • 클릭 시 프로그래스 바 이동 후 진행시간 state 변경(일단은 드래그 기능은 구현하지 않았습니다.)
    • 프로그래스 바 시간 연동
  • play/stop 버튼 구현
    • 다시보기가 끝나면 버튼 disable 및 재생 정지
  • timer
    • setInterval 함수가 실제로 지정한 ms안에 작동하지 않을 가능성을 위해 실제 시간 차이를 계산해 반영하도록 구현.

Feature: 다시보기페이지 진행 시간에 따라 해당 시간대에 해당하는 프롬프트 하이라이팅 및 진행 시간 이동 기능 close #240

  • 시간대에 맞춰 하이라이팅
  • 프롬프트의 스크립트를 클릭시 해당 진행시간으로 이동

고민한 점들(필수 X)

설계

스크린샷 2023-12-10 오전 2 50 58

해당 설계의 이유: 시간이 없다고 생각해 이 컴포넌트를 누군가 이어받았을 때 최대한 쉽게 이용 가능하도록, 진행시간-stateProgressMsTime과 props로 주어지는 다시보기의 전체 길이(ms단위)-totalTime의 조작만으로 프로그래스 바와 prompt가 작동하도록 구현했습니다.

스크린샷(필수 X)

  • 프로그래스 바
    다시보기가 끝나면 버튼 비활성화 및 재생 정지
2023-12-10.3.00.08.mov
  • 프로그래스 바와 프롬프트의 상호작용
    진행 시간에 맞춰 스크립트를 하이라이팅하고 클릭시 해당 진행시간으로 이동
2023-12-10.3.01.49.mov

@Byeonjin Byeonjin added ✨ Feat 기능 개발 FE 프론트엔드 작업 labels Dec 9, 2023
@Byeonjin Byeonjin added this to the 5주차 milestone Dec 9, 2023
@Byeonjin Byeonjin self-assigned this Dec 9, 2023
Copy link

netlify bot commented Dec 9, 2023

Deploy Preview for boarlog ready!

Name Link
🔨 Latest commit 723cdb7
🔍 Latest deploy log https://app.netlify.com/sites/boarlog/deploys/6574abba3f0b6200080ebf44
😎 Deploy Preview https://deploy-preview-241--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.

Copy link
Collaborator

@Jw705 Jw705 left a comment

Choose a reason for hiding this comment

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

고생 많으셨습니다! 설계도까지 그려주셔서 머리에 쏙쏙 들어오네요 😊 merge해주시면 제가 구현하고 있던 화이트보드 다시보기 바로 연결해 보겠습니다!

Comment on lines +15 to +16
// 추후 해당 다시보기의 전체 플레이 타임을 받아올 수 있어야 할 것 같습니다.
const 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.

서버에 요청해서 받아오거나 음성 파일 길이로 계산해볼 수 있겠네요!

Comment on lines +1 to +3
const MS_OF_SECOND = 1000;
const MS_OF_MINUTE = 60 * MS_OF_SECOND;
const MS_OF_HOUR = 60 * MS_OF_MINUTE;
Copy link
Collaborator

Choose a reason for hiding this comment

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

상수 선언 보기 좋습니다!

@Jw705 Jw705 marked this pull request as ready for review December 10, 2023 11:18
@Jw705 Jw705 merged commit b8aab16 into boostcampwm2023:dev Dec 10, 2023
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.

코드 잘 읽었습니다! 주말에 고생 많으셨어요 :)

Comment on lines +65 to +70
const startTime = Math.floor(+value.start / 1000) * 1000;

return startTime > progressMsTime;
}) - 1;
const lastStartTime = +scriptList[scriptList.length - 1]?.start;
if (Math.floor(lastStartTime / 1000) * 1000 <= progressMsTime) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

가능하면 아래 선언한 상수를 활용해서 이 부분도 매직넘버를 사용하지 않도록 고치면 좋을 것 같습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트엔드 작업 ✨ Feat 기능 개발
Projects
None yet
3 participants