Skip to content

통계 화면 QA 적용#127

Open
chanho0908 wants to merge 11 commits intodevelopfrom
refacotr/#126-stats-qa
Open

통계 화면 QA 적용#127
chanho0908 wants to merge 11 commits intodevelopfrom
refacotr/#126-stats-qa

Conversation

@chanho0908
Copy link
Member

이슈 번호

#126

작업내용

통계 화면에서 발견된 QA 항목들을 수정

통계 메인 화면

  • 종료 탭 ~ 리스트 사이 간격 수정 (12dp → 20dp)
  • 카드 닉네임, 완료 횟수 텍스트 색상 변경 (C500 → C400)

통계 상세페이지

  • Calendar Navigator ~ 캘린더 사이 간격 수정
  • 날짜 텍스트 굵기 수정 (B1 → B3)
  • 달력 요일(월~일) 텍스트를 Box로 감싸고 contentAlignment = Alignment.Center 적용하여 상단 border와의 간격 이슈 해결
  • 요일 텍스트 스타일 수정 (B2 → C1)
  • 사진 하나만 있을 때 이미지에 border 추가
  • 달성 횟수 표기 형식 수정: %1$s %2$d/%3$d%1$s - %2$d/%3$d (하이픈 추가)
  • 사진 두 장일 때 뒤에 있는 이미지 회전 방향 수정 (rotate(-16f)rotate(16f))
  • 하단 시작일/종료일 날짜 포맷 수정 (03월 03일3월 3일)
    <string name="date_year_month_day_no_padding">%1$d년 %2$d월 %3$d일</string>
  • 사진 인증 시 통계 진행중 스탬프가 업데이트되지 않는 문제 수정

⚠️ 미완료 항목

  • "진행중 탭 CalendarNavigator ~ 리스트 사이 간격 넓음 "
  • 진행중, 종료 라인 두께랑 색상 다름

결과물

Before After
스크린샷 2026-03-09 오후 3 44 57 스크린샷 2026-03-09 오후 3 48 34
cb4-4420-83b6-023a4b0e84db" />

종료 탭 간격 조정

Before After
1Before 1After

리뷰어에게 추가로 요구하는 사항 (선택)

미완료 항목은 노션 QA 해당 항목의 페이지에 의견 남겨놨으니 확인해줘 !

@chanho0908 chanho0908 self-assigned this Mar 9, 2026
@chanho0908 chanho0908 linked an issue Mar 9, 2026 that may be closed by this pull request
13 tasks
@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

📝 Walkthrough

Walkthrough

이 PR은 디자인 시스템의 통계 관련 컴포넌트 UI를 개선하고, 통계 새로고침 메커니즘을 통합하는 변경입니다. 구체적으로는 PictureDayCell, StampCell, StatsCalendar에서 회전, 색상, 레이아웃 스타일을 조정하고, 새로운 날짜 포맷 문자열 리소스를 추가하며, PhotologCaptureViewModel에 StatsRefreshBus 의존성을 도입하여 사진 업로드 후 통계 화면을 갱신하는 로직을 추가합니다. 또한 StatsDetailScreen의 패딩을 재배치하고 프리뷰 날짜를 고정합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes


리뷰 의견

✅ 긍정적인 부분

디자인 일관성 개선: PictureDayCell, StampCell, StatsCalendar의 스타일 조정이 체계적으로 진행되었습니다. 색상값 변경(C500 → C400)과 텍스트 스타일 업데이트(B1 → B3, B2 → C1)가 명확한 의도를 보여주며, 이는 전체 디자인 시스템의 일관성을 높이는 방향으로 보입니다. 특히 StatsCalendar의 Box 래퍼를 통한 정렬 개선은 레이아웃 안정성을 향상시키는 좋은 리팩토링입니다.

통합의 필요성: PhotologCaptureViewModel에서 StatsRefreshBus를 통해 통계 화면 갱신을 처리하는 방식은 관심사의 분리 측면에서 바람직한 패턴입니다.


🤔 검토가 필요한 부분

1. PhotologCaptureViewModel의 의존성 추가 (중요)

왜 문제가 될 수 있는가?

  • StatsRefreshBus 의존성이 추가되어 PhotologCaptureViewModel의 책임이 증가했습니다. 현재 HOME과 DETAIL 두 분기에서 모두 StatsRefreshBus.notifyChanged(StatsRefreshBus.Target.All)을 호출하고 있는데, 이렇게 전역 갱신을 많은 위치에서 트리거하면 성능 영향이나 불필요한 갱신이 발생할 수 있습니다.

개선 제안:

  • 두 분기에서 동일한 버스 호출을 반복하고 있으니, 공통 로직으로 추출할 수 없을까요? 예를 들어:
    handleUploadPhotologSuccess {
        // ... 각 분기별 로직
        notifyStatsRefresh() // 공통 함수
    }
    
    private fun notifyStatsRefresh() {
        statsRefreshBus.notifyChanged(StatsRefreshBus.Target.All)
    }
  • Target.All이 항상 필요한지, 더 세분화된 타겟(예: HOME만, DETAIL만)을 사용할 수 있는지 검토해주세요.

2. SummaryContent.kt의 프리뷰 날짜 변경

왜 검토가 필요한가?

  • 프리뷰 데이트가 LocalDate.now()에서 LocalDate.of(2025, 11, 12) (고정값)으로 변경되었습니다. 이는 프리뷰 안정성 면에서는 좋지만, 실제 사용 시나리오와의 괴리가 생길 수 있습니다.

질문:

  • 이 날짜 변경이 의도된 것인가요? 만약 프리뷰 일관성을 위한 변경이라면, commit 메시지나 코드 주석으로 그 의도를 명확히 해주면 좋을 것 같습니다.

3. 문자열 리소스 중복 제거

현황:

  • date_year_month_day이 두 위치에 있었고 하나를 제거했다고 명시되어 있는데, 이는 리소스 정리 관점에서 좋습니다.
  • 추가된 date_year_month_day_no_padding 문자열이 실제로 모든 필요한 위치에서 참조되고 있는지 확인해주세요. 특히 SummaryContent.kt에서 사용된다고 했는데, 다른 파일에서도 필요한지 검토 부탁드립니다.

4. StatsDetailScreen의 패딩 재배치 (참고사항)

변경 내용:

  • 상단 패딩이 스크롤 컨테이너(32dp)로 이동되고, 이미지들의 상단 패딩(30dp)이 제거되었습니다.
  • 32dp - 기존 30dp의 차이가 있는데, 이것이 의도된 간격 확대인지 재확인해주세요.

📋 최종 체크리스트

  • ✓ PhotologCaptureViewModel에서 StatsRefreshBus 호출의 반복 로직 정리 검토
  • date_year_month_day_no_padding 문자열의 모든 참조 위치 확인
  • ✓ 패딩 수치(32dp vs 30dp) 의도 재확인

전반적으로 UI 개선과 통계 갱신 로직 통합이 체계적으로 진행되었습니다. 위의 몇 가지 부분만 명확히 정리되면 좋겠습니다! 🙌

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 PR의 주요 변경사항을 명확하게 반영하고 있습니다. '통계 화면 QA 적용'은 이 PR의 핵심 목적을 잘 요약하고 있습니다.
Description check ✅ Passed 설명이 변경사항과 관련이 있으며, 상세한 작업 내용과 결과물 이미지를 포함하고 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refacotr/#126-stats-qa

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
feature/stats/detail/src/main/java/com/twix/stats/detail/component/SummaryContent.kt (1)

173-174: 프리뷰 날짜는 둘 다 고정해 두는 편이 더 안정적입니다.

시작일만 고정하고 종료일을 LocalDate.now()로 두면 날짜가 바뀔 때마다 프리뷰 결과가 달라집니다. endDate도 고정값으로 맞추면 QA 캡처 비교가 더 쉬워질 것 같은데, 같이 맞춰보는 건 어떨까요?

🧪 제안 수정
-                    startDate = LocalDate.of(2025, 11, 12),
-                    endDate = LocalDate.now(),
+                    startDate = LocalDate.of(2025, 11, 12),
+                    endDate = LocalDate.of(2025, 11, 30),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@feature/stats/detail/src/main/java/com/twix/stats/detail/component/SummaryContent.kt`
around lines 173 - 174, The preview uses a moving end date (LocalDate.now())
which makes snapshots unstable; in SummaryContent.kt change the endDate usage so
it is a fixed LocalDate constant (instead of LocalDate.now()) to match the fixed
startDate (refer to the startDate and endDate assignments in SummaryContent.kt)
so previews remain deterministic for QA/capture comparison.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@core/design-system/src/main/res/values/strings.xml`:
- Around line 42-44: The string resource date_year_month_day uses non-indexed
placeholders which prevents reordering in translations; change its placeholders
to indexed form matching date_year_month_day_no_padding (e.g., use %1$s, %2$02d,
%3$02d style) so translators can reorder parts per locale while preserving
zero-padding for month/day.

---

Nitpick comments:
In
`@feature/stats/detail/src/main/java/com/twix/stats/detail/component/SummaryContent.kt`:
- Around line 173-174: The preview uses a moving end date (LocalDate.now())
which makes snapshots unstable; in SummaryContent.kt change the endDate usage so
it is a fixed LocalDate constant (instead of LocalDate.now()) to match the fixed
startDate (refer to the startDate and endDate assignments in SummaryContent.kt)
so previews remain deterministic for QA/capture comparison.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 4865cb7f-89c7-4fcb-9000-67d252394356

📥 Commits

Reviewing files that changed from the base of the PR and between 7841567 and fc8e49d.

📒 Files selected for processing (9)
  • core/design-system/src/main/java/com/twix/designsystem/components/stats/PictureDayCell.kt
  • core/design-system/src/main/java/com/twix/designsystem/components/stats/StampCell.kt
  • core/design-system/src/main/java/com/twix/designsystem/components/stats/StatsCalendar.kt
  • core/design-system/src/main/res/values/strings.xml
  • core/util/src/main/java/com/twix/util/.gitkeep
  • feature/main/src/main/java/com/twix/stats/component/EndStatsContent.kt
  • feature/photolog/capture/src/main/java/com/twix/photolog/capture/PhotologCaptureViewModel.kt
  • feature/stats/detail/src/main/java/com/twix/stats/detail/StatsDetailScreen.kt
  • feature/stats/detail/src/main/java/com/twix/stats/detail/component/SummaryContent.kt
💤 Files with no reviewable changes (1)
  • core/util/src/main/java/com/twix/util/.gitkeep

Comment on lines +42 to +44
<!-- 날짜 포맷 -->
<string name="date_year_month_day">%s년 %02d월 %02d일</string>
<string name="date_year_month_day_no_padding">%1$d년 %2$d월 %3$d일</string>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

date_year_month_day도 위치 지정자를 맞춰 주세요.

지금 포맷은 %s년 %02d월 %02d일이라 기본 리소스에서는 보이지만, 번역 리소스에서 연/월/일 순서를 바꾸기 어렵습니다. date_year_month_day_no_padding처럼 인덱스 기반 placeholder로 맞춰 두면 로케일별 재배치가 쉬워집니다.

🔧 제안 수정
-    <string name="date_year_month_day">%s년 %02d월 %02d일</string>
+    <string name="date_year_month_day">%1$s년 %2$02d월 %3$02d일</string>

As per coding guidelines, "다국어 지원을 고려했는가?"

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<!-- 날짜 포맷 -->
<string name="date_year_month_day">%s년 %02d월 %02d일</string>
<string name="date_year_month_day_no_padding">%1$d년 %2$d월 %3$d일</string>
<!-- 날짜 포맷 -->
<string name="date_year_month_day">%1$s년 %2$02d월 %3$02d일</string>
<string name="date_year_month_day_no_padding">%1$d년 %2$d월 %3$d일</string>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@core/design-system/src/main/res/values/strings.xml` around lines 42 - 44, The
string resource date_year_month_day uses non-indexed placeholders which prevents
reordering in translations; change its placeholders to indexed form matching
date_year_month_day_no_padding (e.g., use %1$s, %2$02d, %3$02d style) so
translators can reorder parts per locale while preserving zero-padding for
month/day.

@chanho0908 chanho0908 added the Refactor Good for newcomers label Mar 9, 2026
@chanho0908 chanho0908 requested a review from dogmania March 9, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

통계 화면 QA 반영

1 participant