feat: 코스 지속시간을 원형으로 보여주는 DurationBadge 컴포넌트 추가 - #18
Open
hamxxn wants to merge 3 commits into
Open
Conversation
minutes(분)를 받아 점선 원형 배지로 표시하는 순수 표시용 컴포넌트. 파란 아크 길이가 minutes/60에 비례해 채워지고(15분->1/4, 60분->풀서클), 60 초과 값은 에러를 던진다. 클릭/선택 상태는 없음.
5 tasks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sohxxny
reviewed
Aug 10, 2026
- 배지 크기를 6.2rem -> 7.4rem으로 키워서 안쪽 패딩만큼 원이 작아 보이던 문제를 해결 - 분 숫자 타이포를 typo-title-2-regular -> typo-title-2-5-regular로 수정 - 숫자/분 그룹을 wrapper span으로 감싸 baseline 정렬은 그 안에서만 적용하고, 바깥은 다시 items-center로 컨테이너 가운데 정렬되게 함 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
thwjddlqslek
approved these changes
Aug 11, 2026
thwjddlqslek
left a comment
Member
There was a problem hiding this comment.
수고하셨습니다~ 리뷰 확인하시고 머지해도 좋을 것 같아요!
| )} | ||
| </svg> | ||
| <div className="absolute inset-0 flex items-center justify-center px-[1rem] py-[1.4rem] leading-none text-white"> | ||
| <span className="flex items-baseline leading-none"> |
Member
There was a problem hiding this comment.
여기 leading-none은 부모 div에 이미 있어서 상속되니 중복이라 제거해도 될 것 같아요!
| @@ -0,0 +1,104 @@ | |||
| import { cn } from "@/shared/lib/cn"; | |||
|
|
|||
| const MAX_MINUTES = 60; | |||
Member
There was a problem hiding this comment.
저희 코스 중에 60분 초과하는 코스가 없는지 확인이 필요할 것 같아요. 우선 요대로 가시죵
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
minutes(분)를 받아 점선 원형 배지로 표시하는 순수 표시용DurationBadge를 추가했다. 파란 아크 길이가minutes/60에 비례해 채워진다(15분→1/4, 30분→1/2, 45분→3/4, 60분→풀서클).Related Issues
PR Point (To Reviewer)
className으로 크기 지정이라고 적혀 있지만, 이후 대화에서 Figma를 더 자세히 보고 두 가지를 바꿨다: (1) 링의 파란 부분이minutes/60비율로 채워지는 진행률 형태라는 걸 확인해서 고정 분할 대신describeArc/polarToCartesian로 각도를 계산하도록 구현, (2) 텍스트+패딩(가로 1rem/세로 1.4rem, Figma auto-layout 스펙) 기준 고정 크기(6.2rem)로 바꿔서 더 이상className으로 크기를 지정하지 않는다. 둘 다 의도된 변경이라 이슈 텍스트가 낡은 상태다.stroke-dashoffset으로 dash 위상을 반 칸 밀어서 이음새에 점 하나만 정중앙에 오도록 고쳤다(DASH_OFFSET).minutes가 60을 초과하면throw한다 (에러 바운더리 없는 상태라 렌더링이 그대로 중단됨 — 의도된 동작).stroke-secondary-200/stroke-gray-60토큰 클래스를 쓴다(코드리뷰 반영 — 기존--color-secondary-200: #a9def0,--color-gray-60: #878a93와 값이 정확히 일치).6.2rem→7.4rem으로 키웠다 — 안쪽 패딩(p-[0.6rem])만큼 원이 작아 보였던 문제. (2) 분 숫자 타이포를typo-title-2-regular→typo-title-2-5-regular로 수정. (3) 숫자/분 정렬을items-center에서items-baseline으로 바꾸되, 그대로 두면 그룹 전체가 컨테이너 안에서 위로 치우쳐 보여서 숫자/분을 감싸는 wrapper span을 하나 추가해 baseline 정렬은 wrapper 내부에서만 적용하고 바깥은 다시items-center로 wrapper 전체를 가운데 정렬했다.Screenshot
ETC
없음