Skip to content

[Feat] 컬렉션 파일 모양 컴포넌트 구현#54

Merged
nahy-512 merged 13 commits into
developfrom
feat/#45-collection-file-component
Jan 13, 2026
Merged

[Feat] 컬렉션 파일 모양 컴포넌트 구현#54
nahy-512 merged 13 commits into
developfrom
feat/#45-collection-file-component

Conversation

@nahy-512

@nahy-512 nahy-512 commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📮 관련 이슈

📌 작업 내용

  • 컬렉션 상세보기

📸 스크린샷

스크린샷
image

😅 미구현

  • 닉네임 글자수 제한 대응

🫛 To. 리뷰어

  • [Feat] NetworkImage 추가 #40 땡겨와서 미리 작업해서 올려서, 해당 PR 머지될 때까지 드래프트 걸어놓겠습니다!
  • 닉네임이 글자수가 10글자가 2줄로 표시돼서, 추가 정책에 대해 기획-디자인 논의 결과를 기다릴 예정 -> 8글자, 내부 패딩 변경, Ellipsis
  • offset이나 dropshadow 컬러가 피그마와 조금 다른데, 담당 디자이너샘께 실시간 확인 후 허락받았습니다!

Uploading image.png…

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능
    • 그림자 효과 기능 추가로 UI 요소의 시각적 깊이 향상
    • 프로필 이미지 표시 기능 추가
    • 컬렉션 상세 정보 디스플레이 추가 (이미지, 제목, 작성자, 북마크 정보 포함)
    • 컬렉션 아이템 카드 UI 컴포넌트 추가

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

@nahy-512 nahy-512 requested a review from a team as a code owner January 12, 2026 20:27
@nahy-512 nahy-512 linked an issue Jan 12, 2026 that may be closed by this pull request
@nahy-512 nahy-512 added 🧩 Component feat - 공통 컴포넌트 작업 Feat ✨ 신규 기능을 추가하거나 기존 기능의 동작, 정책을 변경 labels Jan 12, 2026
@nahy-512 nahy-512 self-assigned this Jan 12, 2026
@nahy-512 nahy-512 marked this pull request as draft January 12, 2026 20:27

@kimjw2003 kimjw2003 left a comment

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.

수고하셨습니다!
가로가 긴 버전의 파일 모양 컴포넌트도 있던데 해당 컴포넌트는 따로 구현하실건가요?
컴포넌트 내부적으로 size가 고정되어있길래 질문 남겨드립니다

@@ -0,0 +1,13 @@
package com.flint.domain.model

data class CollectionDetailModel(

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.

p3
제가 CollectionModel을 만들었는데 어떤 차이점이 있는지 확인해봐야 할 것 같습니다

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.

data class CollectionModel(
    val collectionId: String,
    val collectionTitle: String,
    val collectionImageUrl: String,
    val createdAt: String,
    val isBookmarked: Boolean,
    val author: AuthorModel
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

서버 데이터 형식을 정확히 확인해본 건 아닌데, 어차피 받아서 컴포에게 보여줘야할 정보는 url 2개, 북마크 개수 등등이 추가로 들어가야 해서 '컴포넌트가 필요한 최소 정보'를 기준으로 모델을 구현해봤습니다.
dto 내용과 네이밍을 맞춰봐도 좋겠지만(추후 서버 연동 시 수정 필요), 구조 자체는 다르게 가져가도 좋지 않을까 싶습니다.

@nahy-512

nahy-512 commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

가로가 긴 버전의 파일 모양 컴포넌트도 있던데 해당 컴포넌트는 따로 구현하실건가요?

여쭤봤는데 가로 긴 버전은 쓰이는 곳이 없다고 합니다! @kimjw2003
디자인 페이지에서도 사라졌더라구용

size도 GridLayout으로 들어갈 때, 가운데 간격만 12.dp로 띄워주면 된다고 해요!

@nahy-512 nahy-512 marked this pull request as ready for review January 13, 2026 06:48

@giovannijunseokim giovannijunseokim left a comment

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.

LGTM 🤖

@coderabbitai

coderabbitai Bot commented Jan 13, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

그림자 렌더링 Modifier 확장, 원형 프로필 이미지 컴포넌트, 컬렉션 상세 모델 데이터 클래스 및 컬렉션 파일 표시용 Compose 컴포넌트가 추가되어 컬렉션 상세 UI 구성을 제공합니다.

Changes

응집군 / 파일(들) 변경 요약
그래픽 유틸리티
app/src/main/java/com/flint/core/common/extension/ModifierExt.kt
dropShadow(shape: Shape, color: Color = ..., blur: Dp = ..., offsetY: Dp = ..., offsetX: Dp = ..., spread: Dp = ...) Modifier 확장 추가. BlurMaskFilter 사용, density 변환, outline 기반 그림자 그리기 구현 및 drawBehind 호출.
프로필 이미지 컴포넌트
app/src/main/java/com/flint/core/designsystem/component/image/ProfileImage.kt
@Composable fun ProfileImage(imageUrl: String?, modifier: Modifier = Modifier) 추가. imageUrl 없을 때 기본 아바타 리소스 사용, CircleShape로 클리핑.
컬렉션 도메인 모델
app/src/main/java/com/flint/domain/model/CollectionDetailModel.kt
data class CollectionDetailModel(...) 추가: id, title, content, imageUrl1/2, createdAt, isBookmarked, bookmarkCount, author 필드 포함.
컬렉션 파일 UI 컴포넌트
app/src/main/java/com/flint/presentation/collectiondetail/component/CollectionFileItem.kt
@Composable fun CollectionFileItem(collection: CollectionDetailModel, modifier: Modifier = Modifier) 및 내부 CollectionFileContent, CollectionPocketPoster, @Preview 등 추가. 포스터 2장 겹침/회전/오프셋, 폴더 오버레이, 북마크 배지, 작성자 프로필 및 타이틀/내용 텍스트 구성.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

내가 깡총 뛰며 그렸네,
그림자 퍼지고 포스터 두 장 춤춰,
동그란 얼굴은 반짝이고,
북마크는 속삭이며 빛나네,
새로운 컬렉션, 냠냠 축하해! 🐰

🚥 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 PR이 #45 이슈에 명시된 컬렉션 파일 컴포넌트 구현 요구사항을 충족합니다. dropShadow 확장함수, ProfileImage 컴포넌트, CollectionDetailModel, CollectionFileItem 컴포넌트가 모두 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 #45 이슈의 컬렉션 파일 컴포넌트 구현 범위 내에 있으며, 특정 기능을 지원하기 위한 필수 요소들(UI 컴포넌트, 모델 클래스, 그래픽 유틸리티)만 추가되었습니다.
Description check ✅ Passed PR description는 템플릿의 모든 주요 섹션을 포함하고 있으며, 관련 이슈, 작업 내용, 스크린샷, 미구현 사항, 그리고 리뷰어에 대한 상세 노트를 제공하고 있습니다.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
@app/src/main/java/com/flint/presentation/collectiondetail/component/CollectionFileItem.kt:
- Around line 106-119: The dropShadow call currently uses CircleShape while
CollectionPocketItem is clipped inside with RoundedCornerShape(12.dp), causing
mismatched shadow shape; update the dropShadow invocation to use the same
RoundedCornerShape(12.dp) (or obtain the shape from CollectionPocketItem if it
exposes one) so the shadow follows the image's rounded-rect corners, and ensure
any other transformations (rotate/offset) remain applied to the same modifier
chain.
🧹 Nitpick comments (1)
app/src/main/java/com/flint/core/common/extension/ModifierExt.kt (1)

45-54: remember 키에 density가 누락되어 있습니다.

Paint 객체가 colorblur만을 키로 remember되고 있지만, blurPx 계산에 density가 사용됩니다. 화면 밀도가 변경되는 시나리오(예: 폴더블 기기, 멀티윈도우)에서 캐시된 Paint가 업데이트되지 않을 수 있습니다.

♻️ 권장 수정
-    val paint = remember(color, blur) {
+    val paint = remember(color, blur, density) {
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81e706b and deba8bd.

⛔ Files ignored due to path filters (1)
  • app/src/main/res/drawable/img_folder_fg.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • app/src/main/java/com/flint/core/common/extension/ModifierExt.kt
  • app/src/main/java/com/flint/core/designsystem/component/image/ProfileImage.kt
  • app/src/main/java/com/flint/domain/model/CollectionDetailModel.kt
  • app/src/main/java/com/flint/presentation/collectiondetail/component/CollectionFileItem.kt
🧰 Additional context used
🧬 Code graph analysis (1)
app/src/main/java/com/flint/core/designsystem/component/image/ProfileImage.kt (1)
app/src/main/java/com/flint/core/designsystem/component/image/NetworkImage.kt (1)
  • NetworkImage (22-46)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check
🔇 Additional comments (7)
app/src/main/java/com/flint/core/common/extension/ModifierExt.kt (1)

56-75: 그림자 렌더링 로직이 잘 구현되어 있습니다.

  • drawBehind를 사용하여 콘텐츠 뒤에 그림자를 올바르게 렌더링합니다.
  • 비정상적인 크기에 대한 방어 코드(shadowWidth <= 0f || shadowHeight <= 0f)가 적절합니다.
  • canvas save/restore 패턴을 올바르게 사용하고 있습니다.
app/src/main/java/com/flint/core/designsystem/component/image/ProfileImage.kt (1)

11-29: LGTM!

isNullOrBlank() 체크와 기본 아바타 fallback 로직이 적절하게 구현되어 있습니다. NetworkImageshape 파라미터를 활용하여 내부적으로 clip이 적용되므로 일관성이 유지됩니다.

app/src/main/java/com/flint/domain/model/CollectionDetailModel.kt (1)

3-13: 모델 구조가 적절합니다.

도메인 모델이 깔끔하게 정의되어 있습니다. 이미지 URL이 두 개로 고정되어 있는 것은 현재 UI 디자인(두 장의 포스터 오버랩)과 일치합니다.

향후 이미지 개수가 가변적으로 변경될 경우 List<String> 타입으로 리팩터링을 고려해볼 수 있습니다.

app/src/main/java/com/flint/presentation/collectiondetail/component/CollectionFileItem.kt (4)

41-83: 컴포넌트 구조가 잘 설계되어 있습니다.

  • 콘텐츠 영역과 텍스트 영역의 분리가 명확합니다.
  • maxLinesTextOverflow.Ellipsis 설정으로 긴 텍스트 처리가 적절합니다.
  • PR 설명에 언급된 닉네임 글자 수 정책이 확정되면 해당 부분만 수정하면 됩니다.

162-181: 닉네임 영역의 레이아웃을 확인해주세요.

RowfillMaxWidth()가 적용되어 있어 닉네임이 길 경우 북마크 아이콘과 겹칠 가능성이 있습니다. PR 설명에서 9글자 닉네임 시 두 줄 처리 정책을 기다리고 있다고 언급되어 있으니, 디자인 확정 후 maxWidth 제한 추가를 고려해주세요.


186-198: LGTM!

포스터 이미지 컴포넌트가 간결하게 구현되어 있습니다. 고정 크기와 라운드 코너 설정이 적절합니다.


200-246: 프리뷰가 다양한 케이스를 잘 커버하고 있습니다.

짧은 텍스트와 긴 텍스트(두 줄 처리) 케이스를 모두 포함하여 UI 검증에 유용합니다.

@nahy-512 nahy-512 merged commit ed2e4d7 into develop Jan 13, 2026
3 checks passed
@nahy-512 nahy-512 deleted the feat/#45-collection-file-component branch January 13, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧩 Component feat - 공통 컴포넌트 작업 Feat ✨ 신규 기능을 추가하거나 기존 기능의 동작, 정책을 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 컬렉션 파일 컴포넌트 구현

3 participants