Skip to content

[Fix/#107] 파티 디테일 업로드일 노출 로직 수정#108

Merged
jyvnee merged 1 commit intodevelopfrom
fix/#107-party-detail-upload-date
Jan 22, 2026
Merged

[Fix/#107] 파티 디테일 업로드일 노출 로직 수정#108
jyvnee merged 1 commit intodevelopfrom
fix/#107-party-detail-upload-date

Conversation

@doyeon0307
Copy link
Copy Markdown
Contributor

@doyeon0307 doyeon0307 commented Jan 21, 2026

Related issue 🛠️

Work Description ✏️

  • 파티 디테일 업로드일을, 서버값을 파싱해 "yyyy-MM-dd 등록" 형식으로 표시되도록 수정했습니다

Screenshot 📸

AS-IS (피그마) TO-BE (인 앱 캡쳐)
image image

Uncompleted Tasks 😅

  • [ ]

To Reviewers 📢

Summary by CodeRabbit

릴리스 노트

  • New Features
    • 파티 상세 정보에서 업로드 날짜 표시 형식을 개선했습니다. 타임스탐프가 지역화된 날짜 형식으로 변환되어 더 읽기 쉬워졌습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@doyeon0307 doyeon0307 linked an issue Jan 21, 2026 that may be closed by this pull request
1 task
@doyeon0307 doyeon0307 requested a review from a team January 21, 2026 21:43
@doyeon0307 doyeon0307 self-assigned this Jan 21, 2026
@doyeon0307 doyeon0307 added 🛠️ Fix 버그 및 오류 해결 🐣 도연 labels Jan 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

파티 상세 화면에서 업로드 일시 표시를 상대 시간(예: "4시간 전") 형식에서 절대 날짜(예: "2026-01-22") 형식으로 변경합니다. 새로운 확장 함수를 통해 ISO 형식 타임스탬프를 파싱하여 로컬라이제이션된 날짜 문자열로 변환합니다.

Changes

Cohort / File(s) 요약
날짜 변환 유틸리티
app/src/main/java/com/poti/android/core/common/extension/StringExt.kt
String.toPartyUploadDate(): String? 확장 함수 추가. LocalDateTime 파싱 후 "yyyy-MM-dd" 형식으로 포맷하며, 파싱 실패 시 null 반환
파티 상세 정보 모델
app/src/main/java/com/poti/android/domain/model/party/PartyDetail.kt
uploadTime 필드의 예제 값을 상대 시간(상대 시간: "4시간 전") 형식에서 ISO 타임스탬프(2026-01-22T06:21:20.697608) 형식으로 업데이트
파티 상세 헤더 UI 컴포넌트
app/src/main/java/com/poti/android/presentation/party/detail/component/PartyDetailHeaderInfo.kt
uploadTime 표시를 toPartyUploadDate() 확장 함수를 통해 포맷된 날짜로 변경하고, stringResource(R.string.party_detail_upload_date_label, ...) 를 적용하여 로컬라이제이션된 레이블 추가. Null 안전성을 위해 ?: "" 사용
문자열 리소스
app/src/main/res/values/strings.xml
party_detail_upload_date_label 문자열 리소스 추가 (값: "\"%s 등록\"")

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 분


Modern Android Development 관점의 검토 의견

이 변경은 다음 사항들이 긍정적입니다:

확장 함수 활용: String.toPartyUploadDate()는 Kotlin의 확장 함수를 잘 활용한 사례로, 문자열 변환 로직을 재사용 가능하게 캡슐화했습니다.

예외 처리: DateTimeParseException을 명시적으로 처리하고 null을 반환하여 null-safety를 지원합니다.

리소스 문자열 사용: 다국어 지원을 위해 하드코딩된 문자열 대신 stringResource()를 사용했습니다.

⚠️ 주의 사항:

  • 시간대(timezone) 정보가 손실되는 것으로 보이므로, 기기의 로컬 시간대에서 항상 올바르게 표시되는지 확인하세요.
  • 테스트 커버리지가 있는지 확인해주세요. 특히 toPartyUploadDate()의 파싱 실패 케이스가 적절히 테스트되었는지 검토 부탁합니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경사항을 명확하게 설명하고 있습니다. 파티 디테일의 업로드일 노출 로직 수정이라는 핵심 변경을 정확히 나타냅니다.
Linked Issues check ✅ Passed 코드 변경이 이슈 #107의 요구사항을 충족합니다. uploadTime을 yyyy-MM-dd 형식으로 파싱하여 표시하는 로직이 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #107의 범위 내에 있습니다. 업로드일 포맷 변환 관련 파일들만 수정되었으며, 불필요한 변경이 없습니다.
Description check ✅ Passed Pull request 설명이 요구되는 템플릿 구조를 따르고 있으며, 관련 이슈, 작업 내용, 스크린샷, 미완료 작업 항목이 모두 포함되어 있습니다.

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

✨ Finishing touches
  • 📝 Generate docstrings

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
Copy Markdown

@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: 2

🤖 Fix all issues with AI agents
In
`@app/src/main/java/com/poti/android/presentation/party/detail/component/PartyDetailHeaderInfo.kt`:
- Around line 68-72: In PartyDetailHeaderInfo (the composable using
partyDetail.uploadTime.toPartyUploadDate()), avoid showing just the label when
parsing fails by conditionally rendering the Text: call toPartyUploadDate() and
if it returns null either hide the entire Text composable or use the raw
uploadTime string as a fallback; specifically, replace the unconditional Text
that uses stringResource(R.string.party_detail_upload_date_label,
(partyDetail.uploadTime.toPartyUploadDate() ?: "")) with a conditional that only
emits the Text when the parsed date is non-null (or passes the original
uploadTime into the stringResource when you choose fallback).

In `@app/src/main/res/values/strings.xml`:
- Line 70: The string resource party_detail_upload_date_label currently includes
literal double quotes (" %s 등록 ") that will be shown in the UI; remove the
surrounding quotes and use a proper format placeholder (e.g., change the value
to use %1$s 등록) so formatted text is substituted without visible quotes,
updating the string resource party_detail_upload_date_label accordingly.
🧹 Nitpick comments (1)
app/src/main/java/com/poti/android/core/common/extension/StringExt.kt (1)

7-14: 서버 포맷이 ISO_LOCAL_DATE_TIME일 경우 현재 코드는 정상 동작합니다.

도메인 모델의 주석에서 uploadTime 포맷이 "2026-01-22T06:21:20.697608" (오프셋 없음)으로 명시되어 있고, 현재 LocalDateTime.parse(this)는 이 포맷을 기본값으로 처리합니다. 따라서 문서화된 포맷에서는 파싱이 성공합니다.

다만 서버가 향후 timezone 정보를 포함한 포맷으로 변경할 가능성에 대비하려면, 다음처럼 더 방어적으로 처리하는 것을 고려해볼 수 있습니다:

  • OffsetDateTime.parse()ISO_DATE_TIME.parseBest()로 확장하기
  • 파싱 실패 시 로깅 추가하여 디버깅 용이하게 하기

현재 코드는 예외를 잘 처리하고 있지만, 서버 포맷 변경에 대한 사전 대비로 검토하길 권장합니다.

Comment on lines 68 to 72
Text(
text = partyDetail.uploadTime,
text = stringResource(R.string.party_detail_upload_date_label, (partyDetail.uploadTime.toPartyUploadDate() ?: "")),
style = PotiTheme.typography.body14m,
color = PotiTheme.colors.gray800,
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

파싱 실패 시 ‘등록’만 노출되는 UI를 막아주세요.

현재 ?: ""로 인해 날짜 파싱 실패 시 “등록”만 표시됩니다. null일 때는 해당 Text를 숨기거나 원본 문자열로 fallback하는 쪽이 안전합니다.

🔧 숨김 처리 예시
-            Text(
-                text = stringResource(R.string.party_detail_upload_date_label, (partyDetail.uploadTime.toPartyUploadDate() ?: "")),
-                style = PotiTheme.typography.body14m,
-                color = PotiTheme.colors.gray800,
-            )
+            val uploadDate = partyDetail.uploadTime.toPartyUploadDate()
+            if (uploadDate != null) {
+                Text(
+                    text = stringResource(R.string.party_detail_upload_date_label, uploadDate),
+                    style = PotiTheme.typography.body14m,
+                    color = PotiTheme.colors.gray800,
+                )
+            }
📝 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
Text(
text = partyDetail.uploadTime,
text = stringResource(R.string.party_detail_upload_date_label, (partyDetail.uploadTime.toPartyUploadDate() ?: "")),
style = PotiTheme.typography.body14m,
color = PotiTheme.colors.gray800,
)
val uploadDate = partyDetail.uploadTime.toPartyUploadDate()
if (uploadDate != null) {
Text(
text = stringResource(R.string.party_detail_upload_date_label, uploadDate),
style = PotiTheme.typography.body14m,
color = PotiTheme.colors.gray800,
)
}
🤖 Prompt for AI Agents
In
`@app/src/main/java/com/poti/android/presentation/party/detail/component/PartyDetailHeaderInfo.kt`
around lines 68 - 72, In PartyDetailHeaderInfo (the composable using
partyDetail.uploadTime.toPartyUploadDate()), avoid showing just the label when
parsing fails by conditionally rendering the Text: call toPartyUploadDate() and
if it returns null either hide the entire Text composable or use the raw
uploadTime string as a fallback; specifically, replace the unconditional Text
that uses stringResource(R.string.party_detail_upload_date_label,
(partyDetail.uploadTime.toPartyUploadDate() ?: "")) with a conditional that only
emits the Text when the parsed date is non-null (or passes the original
uploadTime into the stringResource when you choose fallback).

</string-array>
<string name="party_detail_join_party">분철팟 참여하기</string>
<string name="party_detail_join_party_closed">마감된 분철팟이에요</string>
<string name="party_detail_upload_date_label">"%s 등록"</string>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

문자열 리소스에 따옴표가 그대로 노출됩니다.

현재 값이 "%s 등록" 형태라 UI에 따옴표가 함께 표시될 수 있습니다. 요구사항이 따옴표 없는 표기라면 제거해주세요.

🔧 수정 제안
-    <string name="party_detail_upload_date_label">"%s 등록"</string>
+    <string name="party_detail_upload_date_label">%s 등록</string>
📝 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="party_detail_upload_date_label">"%s 등록"</string>
<string name="party_detail_upload_date_label">%s 등록</string>
🤖 Prompt for AI Agents
In `@app/src/main/res/values/strings.xml` at line 70, The string resource
party_detail_upload_date_label currently includes literal double quotes (" %s 등록
") that will be shown in the UI; remove the surrounding quotes and use a proper
format placeholder (e.g., change the value to use %1$s 등록) so formatted text is
substituted without visible quotes, updating the string resource
party_detail_upload_date_label accordingly.

Copy link
Copy Markdown
Contributor

@cmj7271 cmj7271 left a comment

Choose a reason for hiding this comment

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

수고많았티비

</string-array>
<string name="party_detail_join_party">분철팟 참여하기</string>
<string name="party_detail_join_party_closed">마감된 분철팟이에요</string>
<string name="party_detail_upload_date_label">"%s 등록"</string>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p2: " <- 이거 들어가도 잘 뜨는건가요?(진짜모름)
스크린샷에는 안보이넹

@jyvnee jyvnee merged commit 9355ed8 into develop Jan 22, 2026
3 checks passed
@jyvnee jyvnee deleted the fix/#107-party-detail-upload-date branch January 22, 2026 08:36
@github-project-automation github-project-automation bot moved this from To-do to Done in POTI-ANDROID Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐣 도연 🛠️ Fix 버그 및 오류 해결

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Fix] 파티 디테일 업로드 노출 로직 수정

3 participants