Skip to content

Comments

Progressbar 컴포넌트#102

Open
eunsoA wants to merge 8 commits intodevfrom
feat/Progressbar
Open

Progressbar 컴포넌트#102
eunsoA wants to merge 8 commits intodevfrom
feat/Progressbar

Conversation

@eunsoA
Copy link
Collaborator

@eunsoA eunsoA commented Sep 15, 2025

#️⃣ 연관된 이슈

ex) #이슈번호, #이슈번호

#99

📝 훅 간단 사용 설명

어떤 훅인지 간단하게 설명해주세요! (docs 내용 기반)

  • 진행률을 0-100 범위의 숫자로 받아서 시각적으로 표시
  • 커스터마이징 가능한 스타일 옵션 (너비, 높이, 색상, 모서리 둥글기)
  • React.memo로 최적화되어 불필요한 리렌더링 방지
  • useProgress 훅과 연동하여 자동 애니메이션 지원

기본 사용법

import { Progressbar } from '@hookdle/components';
import { useProgress } from '@hookdle/hooks';

function BasicExample() {
  const { progress } = useProgress();
  return <Progressbar progress={progress} />;
}

커스텀 스타일링

<Progressbar
  progress={progress}
  width={300}
  height={20}
  backgroundColor="#f0f0f0"
  barColor="#007bff"
  borderRadius={5}
/>

스크린샷 (선택)

- 프로그레스바의 최소 및 최대 상수 추가
- 애니메이션 완료 시간 상수 추가
- 매개변수 타입 및 반환 타입 수정
- animate 로직 분리
- 애니메이션 로직 최적화
- duration, initialProgress, targetProgress 매개변수 값 유효성 검사 로직 추가
- 문서 주석 업데이트 및 설명 보강
- useProgress 훅의 초기 진행률, 목표 진행률, 완료 함수에 대한 테스트 케이스 작성
- 각 테스트는 애니메이션 진행 상황을 검증하고, 예상 결과를 확인함
- 진행률을 시각적으로 표시하는 Progressbar 컴포넌트 구현
- 다양한 스타일 속성(너비, 높이, 배경색, 바 색상, 모서리 둥글기) 지원
- React.memo를 사용하여 성능 최적화
- Progressbar 컴포넌트의 사용법 및 속성 설명 추가
- 기본 사용법, 커스텀 스타일링, 수동 진행률 제어 예제 포함
- 컴포넌트의 최적화 및 참고 사항 명시
- `useProgress` 훅의 설명을 보강하여 `@hookdle/components`의 `Progressbar` 컴포넌트와의 연계 사용법 추가
- `complete` 함수 사용법 및 애니메이션 최적화 관련 세부사항 명시
- 목표 진행률을 100으로 수정하고, CSS 스타일링 섹션 제거
- 새로운 특징 및 활용 사례 추가
@eunsoA eunsoA self-assigned this Sep 15, 2025
@eunsoA eunsoA added the 컴포넌트 개발 Extra attention is needed label Sep 15, 2025
*
* @param {number} currentTime - 현재 시간 (performance.now()의 반환값)
*/
const animationFrame = (currentTime: number) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

이름좀 변경해주세요!
은소인터벌
updateProgress

Base automatically changed from dev to main September 21, 2025 10:20
@hoyyChoi hoyyChoi changed the base branch from main to dev September 22, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

컴포넌트 개발 Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants