Repository navigation
[FEAT] 통계 페이지 모바일 뷰 및 아이콘 변경 적용 #330
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
Changes from 7 commits
743dbd3
852e2a8
3844e3d
1244d01
2869095
a9cd35b
847faaa
d7d351b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,8 +22,8 @@ import { formatDateKey, parseDateKey } from "@/utils/date/date"; | |
|
|
||
| type CalendarIconStatus = "disabled" | "empty" | "outline" | "light" | "filled"; | ||
|
|
||
| const DisabledClockIcon = () => ( | ||
| <div className="bg-timo-gray-300 size-16.5 rounded-full" /> | ||
| const DisabledClockIcon = ({ className }: { className?: string }) => ( | ||
| <div className={cn("bg-timo-gray-300 rounded-full", className)} /> | ||
| ); | ||
|
|
||
| const STATUS_ICON = { | ||
|
|
@@ -39,10 +39,11 @@ const getIconStatus = ( | |
| isFutureDate: boolean, | ||
| ): CalendarIconStatus => { | ||
| if (isFutureDate) return "disabled"; | ||
| if (completionRate === null || completionRate === 0) return "empty"; | ||
| if (completionRate < 50) return "outline"; | ||
| if (completionRate === null) return "empty"; | ||
| if (completionRate === 0) return "outline"; | ||
| if (completionRate <= 50) return "filled"; | ||
| if (completionRate < 100) return "light"; | ||
| return "filled"; | ||
| return "empty"; | ||
|
Comment on lines
+42
to
+46
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아이콘은 develop 기존 로직처럼 채움 순서에 맞추는 게 자연스러울 것 같은데, 의도한 매핑이 따로 있는지 확인 부탁드려요! if (completionRate === null || completionRate === 0) return "empty";
if (completionRate < 50) return "outline";
if (completionRate < 100) return "light";
return "filled";
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }; | ||
|
|
||
| const getDateTime = (date: Date) => | ||
|
|
@@ -96,13 +97,13 @@ export const StatisticsCalendar = ({ | |
| return ( | ||
| // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions | ||
| <section | ||
| className="min-h-full min-w-0 flex-1 overflow-x-auto px-14.75 pt-10 pb-13" | ||
| className="min-w-0 flex-1 px-4 pt-4 pb-8 md:min-h-full md:overflow-x-auto md:px-14.75 md:pt-10 md:pb-13" | ||
| onClick={handleCalendarClick} | ||
| > | ||
| <div className="w-199.5"> | ||
| <div className="w-full md:w-199.5"> | ||
| <div className="pb-5"> | ||
| <div className="flex flex-col gap-2 pb-[69px]"> | ||
| <h1 className="typo-headline-b-30 text-timo-gray-900"> | ||
| <div className="flex flex-col gap-2 pb-6 md:pb-[69px]"> | ||
| <h1 className="typo-headline-b-24 text-timo-gray-900 md:typo-headline-b-30"> | ||
| {formatStatisticsMonth(currentMonth, locale)} | ||
| </h1> | ||
|
|
||
|
|
@@ -111,7 +112,7 @@ export const StatisticsCalendar = ({ | |
| </p> | ||
| </div> | ||
|
|
||
| <div className="grid grid-cols-7 gap-x-14"> | ||
| <div className="grid grid-cols-7 md:gap-x-14"> | ||
| {WEEKDAYS.map(({ label, ariaLabel }, index) => ( | ||
| <div | ||
| key={ariaLabel} | ||
|
|
@@ -127,7 +128,7 @@ export const StatisticsCalendar = ({ | |
| </div> | ||
| </div> | ||
|
|
||
| <div className="grid grid-cols-7 gap-x-14 gap-y-5"> | ||
| <div className="grid grid-cols-7 gap-y-3 md:gap-x-14 md:gap-y-5"> | ||
| {Array.from({ length: firstDayOffset }, (_, index) => ( | ||
| <div key={`empty-${index}`} /> | ||
| ))} | ||
|
|
@@ -145,19 +146,19 @@ export const StatisticsCalendar = ({ | |
| <button | ||
| key={dateKey} | ||
| type="button" | ||
| className="flex flex-col items-center gap-2.5 disabled:cursor-default" | ||
| className="flex min-w-0 flex-col items-center gap-1.5 disabled:cursor-default md:gap-2.5" | ||
| disabled={isFutureDate} | ||
| onClick={() => onSelectDate(calendarDate.date)} | ||
| > | ||
| <span | ||
| className={cn( | ||
| "rounded-full", | ||
| "aspect-square w-[85%] max-w-11 rounded-full md:size-16.5 md:max-w-none", | ||
| isSelected && | ||
| !isFutureDate && | ||
| "drop-shadow-[0_0_10px_var(--color-timo-blue-75)]", | ||
| "shadow-[0_0_10px_0_var(--color-timo-blue-75)]", | ||
| )} | ||
| > | ||
| <Icon /> | ||
| <Icon className="size-full" /> | ||
| </span> | ||
| <span | ||
| className={cn( | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: Team-Timo/Timo-client
Length of output: 12746
🏁 Script executed:
Repository: Team-Timo/Timo-client
Length of output: 41428
🏁 Script executed:
Repository: Team-Timo/Timo-client
Length of output: 4532
🏁 Script executed:
Repository: Team-Timo/Timo-client
Length of output: 10688
100% 완료율을
filled아이콘으로 매핑해 주세요.현재 100%는
empty아이콘으로 렌더링됩니다.empty아이콘은 내부가 흰색이고 시계 바늘이 희미하지만,filled아이콘은 내부가 파란색으로 채워집니다. 따라서 완료된 날짜가 미완료처럼 보입니다.Suggested fix
참고: SVG
fill속성 문서📝 Committable suggestion
🤖 Prompt for AI Agents