Skip to content

fix:스포일러 설정 시 이미지 안보임#834

Merged
Sadturtleman merged 3 commits intodevelopfrom
fix/830
Mar 13, 2026
Merged

fix:스포일러 설정 시 이미지 안보임#834
Sadturtleman merged 3 commits intodevelopfrom
fix/830

Conversation

@Sadturtleman
Copy link
Contributor

@Sadturtleman Sadturtleman commented Mar 13, 2026

📌𝘐𝘴𝘴𝘶𝘦𝘴

📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯

  • 스포일러 설정 시 이미지 보이지 않게 수정

📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵

image image

💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴

스포일러 시 이미지 보이지 않게 하기 위해 이미지 분기를 스포일러 분기에 포함시켰습니다.

Summary by CodeRabbit

릴리스 노트

  • 개선 사항
    • 피드의 갤러리 이미지와 이미지 개수 배지가 스포일러 게시물에서는 숨겨지고, 비스포일러 게시물에서만 표시되도록 동작을 수정했습니다.
    • 이미지 미리보기 관련 간격과 레이아웃을 비스포일러 경로로 통일해 표시 일관성을 개선했습니다.
    • 이미지 표시 시 간격이 조정되어 전체 게시물 레이아웃이 보다 안정적으로 보입니다.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 166b3d1b-4081-42c7-b797-ec933e9ef3c3

📥 Commits

Reviewing files that changed from the base of the PR and between e14cc04 and 5f91e53.

📒 Files selected for processing (1)
  • feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt

Walkthrough

스포일러 포함 게시물에서 이미지 미리보기와 개수 배지를 비노출하도록 이미지 렌더링 블록을 비스포일러(else) 분기로 이동시키고, 외부에 있던 이미지 블록과 여분의 spacer를 제거하며 spacer 위치/간격을 조정했습니다.

Changes

Cohort / File(s) Summary
피드 이미지 스포일러 처리
feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt
이미지 미리보기(gallery)와 개수 배지 렌더링을 스포일러 체크의 비스포일러(else) 분기로 이동. 외부 이미지 블록 및 여분 spacer 제거. 비스포일러 경로 내 spacer 간격을 20.dp → 10.dp로 조정.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • devfeijoa
  • m6z1
  • s9hn

Poem

🐰 조심스레 숨긴 작은 그림자
스포일러 앞에선 눈을 감았지요
배지와 여백도 함께 정리하고
피드는 조용히 비밀을 지켰네
깡충깡충, 축하해요!

🚥 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 제목은 스포일러 설정 시 이미지가 보이지 않게 하는 변경 사항을 명확하게 설명하고 있습니다.
Description check ✅ Passed PR 설명은 템플릿의 필수 섹션(이슈, 작업 설명, 스크린샷)을 포함하고 있으며 충분히 작성되어 있습니다.
Linked Issues check ✅ Passed PR의 코드 변경 사항이 연결된 이슈 #830의 요구사항과 완벽하게 일치합니다. 스포일러 설정 시 이미지를 숨기기 위해 이미지 렌더링 로직을 스포일러 분기에 포함시켰습니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 이슈 #830의 범위 내에 있으며, 스포일러 설정 시 이미지를 숨기는 목표에 집중되어 있습니다.

✏️ 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 fix/830
📝 Coding Plan
  • Generate coding plan for human review comments

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
Member

@s9hn s9hn left a comment

Choose a reason for hiding this comment

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

@Sadturtleman 코멘트 하나만 확인 부탁드립니다 !

@@ -228,40 +261,6 @@ private fun FeedItem(

Spacer(modifier = Modifier.height(height = 20.dp))
Copy link
Member

Choose a reason for hiding this comment

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

c: 이 Spacer도 같이 옮겨져야할 것 같아요! 혹시 모르니 피그마 시안으로 간격 검토 한번 부탁드립니다!

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt`:
- Around line 218-250: The image preview is currently rendered inside the wrong
branch so spoilers still show images; update the condition around the image
block (the Box/NetworkImage + count badge and Spacer tied to feed.imageUrls) to
render only when the post is not a spoiler—i.e., guard with !feed.isSpoiler &&
feed.imageUrls.isNotEmpty() (or move the existing image block out of the
feed.isSpoiler branch and into the non-spoiler branch) so non-spoiler posts keep
their preview and spoiler posts hide images; ensure references to
feed.imageUrls.firstOrNull(), feed.imageCount and the count badge remain
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b543f298-28cd-425a-b2cd-4ff0ca1edd67

📥 Commits

Reviewing files that changed from the base of the PR and between 49fd2d6 and 4efa5d5.

📒 Files selected for processing (1)
  • feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt

Comment on lines +218 to +250
if (feed.imageUrls.isNotEmpty()) {
Box {
NetworkImage(
imageUrl = feed.imageUrls.firstOrNull().orEmpty(),
modifier = Modifier
.fillMaxWidth()
.aspectRatio(ratio = 334f / 237f)
.clip(RoundedCornerShape(size = 14.dp)),
contentScale = ContentScale.Crop,
)

Box(
contentAlignment = Alignment.Center,
modifier = Modifier
.align(alignment = Alignment.BottomEnd)
.padding(end = 12.dp, bottom = 10.dp)
.size(size = 20.dp)
.background(
color = GrayToast,
shape = CircleShape,
),
) {
Text(
text = feed.imageCount.toString(),
style = WebsosoTheme.typography.body5,
color = White,
textAlign = TextAlign.Center,
)
}
}

Spacer(modifier = Modifier.height(height = 10.dp))
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

스포일러 이미지 노출 조건이 요구사항과 반대로 적용되었습니다

Line 218 기준으로 이미지 블록이 feed.isSpoiler 분기 안에 있어, 스포일러 게시글에서 이미지가 노출됩니다. PR 목표(#830)는 반대로 “스포일러일 때 이미지 숨김”입니다. 또한 현재 구조는 비스포일러 게시글의 이미지 프리뷰를 잃는 회귀를 유발합니다.

수정 제안 diff
-        if (feed.isSpoiler) {
+        if (feed.isSpoiler) {
             Text(
                 text = "스포일러가 포함된 글 보기",
                 style = WebsosoTheme.typography.body2,
                 color = Secondary100,
                 modifier = Modifier.debouncedClickable { onContentClick(feed.id, feed.isLiked) },
             )
-            if (feed.imageUrls.isNotEmpty()) {
-                Box {
-                    NetworkImage(
-                        imageUrl = feed.imageUrls.firstOrNull().orEmpty(),
-                        modifier = Modifier
-                            .fillMaxWidth()
-                            .aspectRatio(ratio = 334f / 237f)
-                            .clip(RoundedCornerShape(size = 14.dp)),
-                        contentScale = ContentScale.Crop,
-                    )
-
-                    Box(
-                        contentAlignment = Alignment.Center,
-                        modifier = Modifier
-                            .align(alignment = Alignment.BottomEnd)
-                            .padding(end = 12.dp, bottom = 10.dp)
-                            .size(size = 20.dp)
-                            .background(
-                                color = GrayToast,
-                                shape = CircleShape,
-                            ),
-                    ) {
-                        Text(
-                            text = feed.imageCount.toString(),
-                            style = WebsosoTheme.typography.body5,
-                            color = White,
-                            textAlign = TextAlign.Center,
-                        )
-                    }
-                }
-
-                Spacer(modifier = Modifier.height(height = 10.dp))
-            }
         } else {
             Text(
                 text = feed.content,
                 style = WebsosoTheme.typography.body2,
                 color = Black,
                 maxLines = 5,
                 overflow = TextOverflow.Ellipsis,
                 modifier = Modifier.debouncedClickable { onContentClick(feed.id, feed.isLiked) },
             )
+            if (feed.isVisible) {
+                Box {
+                    NetworkImage(
+                        imageUrl = feed.imageUrls.firstOrNull().orEmpty(),
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .aspectRatio(ratio = 334f / 237f)
+                            .clip(RoundedCornerShape(size = 14.dp)),
+                        contentScale = ContentScale.Crop,
+                    )
+                    Box(
+                        contentAlignment = Alignment.Center,
+                        modifier = Modifier
+                            .align(alignment = Alignment.BottomEnd)
+                            .padding(end = 12.dp, bottom = 10.dp)
+                            .size(size = 20.dp)
+                            .background(color = GrayToast, shape = CircleShape),
+                    ) {
+                        Text(
+                            text = feed.imageCount.toString(),
+                            style = WebsosoTheme.typography.body5,
+                            color = White,
+                            textAlign = TextAlign.Center,
+                        )
+                    }
+                }
+                Spacer(modifier = Modifier.height(height = 10.dp))
+            }
         }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt`
around lines 218 - 250, The image preview is currently rendered inside the wrong
branch so spoilers still show images; update the condition around the image
block (the Box/NetworkImage + count badge and Spacer tied to feed.imageUrls) to
render only when the post is not a spoiler—i.e., guard with !feed.isSpoiler &&
feed.imageUrls.isNotEmpty() (or move the existing image block out of the
feed.isSpoiler branch and into the non-spoiler branch) so non-spoiler posts keep
their preview and spoiler posts hide images; ensure references to
feed.imageUrls.firstOrNull(), feed.imageCount and the count badge remain
unchanged.

Copy link
Member

@m6z1 m6z1 left a comment

Choose a reason for hiding this comment

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

스포일러 글일 때 글과 이미지가 함께 안 보여야 합니다 !
지금 거는 빌드해보니까 글은 뜨는 상태인데 확인 부탁드려요

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.

🧹 Nitpick comments (1)
feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt (1)

229-229: 조건식은 feed.isVisible로 단일화하면 유지보수가 더 쉬워집니다.

현재 구조도 동작은 맞지만, FeedUiModel의 계산 프로퍼티와 조건을 맞춰두면 향후 조건 변경 시 드리프트를 줄일 수 있습니다.

제안 diff
-            if (feed.imageUrls.isNotEmpty()) {
+            if (feed.isVisible) {
                 Box {
                     NetworkImage(
                         imageUrl = feed.imageUrls.firstOrNull().orEmpty(),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt`
at line 229, Unify the visibility check by replacing the current conditional
that uses feed.imageUrls.isNotEmpty() with the FeedUiModel's computed property
feed.isVisible so that visibility logic is centralized; update the conditional
in the FeedSection code (where feed.imageUrls is currently checked) to use
feed.isVisible, and ensure any related branches that previously relied on
imageUrls emptiness still behave correctly under the unified feed.isVisible
rule.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt`:
- Line 229: Unify the visibility check by replacing the current conditional that
uses feed.imageUrls.isNotEmpty() with the FeedUiModel's computed property
feed.isVisible so that visibility logic is centralized; update the conditional
in the FeedSection code (where feed.imageUrls is currently checked) to use
feed.isVisible, and ensure any related branches that previously relied on
imageUrls emptiness still behave correctly under the unified feed.isVisible
rule.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3695f0d0-f4b6-4605-b7e5-edca8b4705bf

📥 Commits

Reviewing files that changed from the base of the PR and between 4efa5d5 and e14cc04.

📒 Files selected for processing (1)
  • feature/feed/src/main/java/com/into/websoso/feature/feed/component/FeedSection.kt

@Sadturtleman Sadturtleman merged commit ce4f3fc into develop Mar 13, 2026
1 of 2 checks passed
@Sadturtleman Sadturtleman deleted the fix/830 branch March 13, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 [FIX] 버그를 수정합니다. 🧙마법사 하루

Projects

None yet

Development

Successfully merging this pull request may close these issues.

스포일러가 포함된 글일 때, 이미지 노출X

3 participants