Skip to content

Conversation

@s9hn
Copy link
Member

@s9hn s9hn commented Nov 3, 2025

📌𝘐𝘴𝘴𝘶𝘦𝘴

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

  • ui model에 visible에 대한 커스텀 게터 추가했습니다

Summary by CodeRabbit

릴리스 노트

  • 새 기능

    • 라이브러리 화면 진입 시 자동으로 컨텐츠를 새로고침하는 기능 추가
  • 스타일

    • 여러 UI 요소(필터, 버튼, 로그인)의 클릭 인터랙션에서 리플 효과 제거로 더 부드러운 사용자 경험 제공
    • 피드 항목의 표시 로직 개선

@s9hn s9hn changed the title Feat/763 feat: 스포일러 글일 경우 이미지 보이지 않도록 구현 Nov 3, 2025
@github-actions github-actions bot requested a review from m6z1 November 3, 2025 15:10
@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Caution

Review failed

The pull request is closed.

📋 개요

스포일러 게시글에서 이미지를 숨기는 기능을 구현하고, 라이브러리 새로고침 메커니즘을 추가하며, UI 컴포넌트에서 리플 효과를 제거합니다.

🚶 과정

FeedModel에 isVisible 계산 속성을 추가하여 스포일러가 아니고 이미지가 있을 때만 표시되도록 하며, LibraryFragment의 onResume에서 라이브러리 새로고침을 트리거합니다. 데이터베이스 레이어에 새로운 refresh() 메서드를 도입하고, 여러 UI 컴포넌트에서 리플 없는 클릭 처리를 적용합니다.

📊 변경 사항

응집군 / 파일명 변경 요약
피드 모델 및 레이아웃
app/src/main/java/com/into/websoso/ui/main/feed/model/FeedModel.kt, app/src/main/res/layout/item_feed.xml
FeedModel에 isVisible 계산 속성 추가(!isSpoiler && imageUrls.isNotEmpty()), 레이아웃 바인딩을 feed.visible 사용하도록 업데이트
라이브러리 갱신 메커니즘
app/src/main/java/com/into/websoso/ui/main/library/LibraryFragment.kt, data/library/src/main/java/com/into/websoso/data/library/LibraryRepository.kt, data/library/src/main/java/com/into/websoso/data/library/repository/MyLibraryRepository.kt, data/library/src/main/java/com/into/websoso/data/library/repository/UserLibraryRepository.kt, feature/library/src/main/java/com/into/websoso/feature/library/LibraryViewModel.kt
LibraryFragment에 onResume() 라이프사이클 추가, LibraryRepository 인터페이스에 refresh() 메서드 정의, 구현체들에 refresh() 구현 추가 (MyLibraryRepository는 paging source 무효화, UserLibraryRepository는 no-op)
데이터베이스 로직 변경
core/database/src/main/java/com/into/websoso/core/database/datasource/library/DefaultLibraryLocalDataSource.kt
insertNovel()에서 빈 readStatus + isInterest false일 때 삭제 처리 추가, deleteNovel()에서 isInterest 항목은 상태 초기화 후 재삽입하도록 변경
리플 없는 클릭 모듈
core/common/src/main/java/com/into/websoso/core/common/extensions/ComposeExtensions.kt
새로운 clickableWithoutRipple() 확장 함수 추가 (ripple 효과 비활성화)
리플 없는 클릭 적용 (라이브러리)
feature/library/src/main/java/com/into/websoso/feature/library/component/LibraryGridListItem.kt, feature/library/src/main/java/com/into/websoso/feature/library/component/LibraryListItem.kt, feature/library/src/main/java/com/into/websoso/feature/library/component/LibrayFilterTopBar.kt, feature/library/src/main/java/com/into/websoso/feature/library/filter/component/LibraryFilterBottomSheetButtons.kt, feature/library/src/main/java/com/into/websoso/feature/library/filter/component/LibraryFilterBottomSheetClickableItem.kt, feature/library/src/main/java/com/into/websoso/feature/library/filter/component/LibraryFilterBottomSheetHeader.kt, feature/library/src/main/java/com/into/websoso/feature/library/filter/component/LibraryFilterBottomSheetNovelRatingGrid.kt
라이브러리 UI 컴포넌트들에서 clickableclickableWithoutRipple 변경
리플 없는 클릭 적용 (로그인)
feature/signin/src/main/java/com/into/websoso/feature/signin/component/SignInButtons.kt
카카오 로그인 버튼에 clickableWithoutRipple 적용

🎯 시퀀스 다이어그램

sequenceDiagram
    participant Fragment as LibraryFragment
    participant ViewModel as LibraryViewModel
    participant Repo as LibraryRepository
    participant DataSource as LibraryLocalDataSource
    
    Note over Fragment: onResume() 호출
    Fragment->>ViewModel: refreshLibrary()
    ViewModel->>Repo: refresh()
    alt MyLibraryRepository
        Repo->>DataSource: selectAllNovels().invalidate()
        DataSource-->>Repo: Paging source 무효화
    else UserLibraryRepository
        Repo-->>ViewModel: (no-op)
    end
    Repo-->>ViewModel: 완료
    ViewModel-->>Fragment: 라이브러리 갱신
Loading
sequenceDiagram
    participant View as FeedView
    participant Model as FeedModel
    participant Layout as item_feed.xml
    
    Model->>Model: isVisible 계산<br/>(!isSpoiler && imageUrls.isNotEmpty())
    Layout->>Model: isVisible 체크
    alt isVisible = true
        Layout->>View: 이미지 표시
    else isVisible = false
        Layout->>View: 이미지 숨김
    end
Loading

⏱️ 예상 코드 리뷰 시간

🎯 3 (중간) | ⏱️ ~25분

주의 깊게 검토할 부분:

  • 데이터베이스 로직: DefaultLibraryLocalDataSourceinsertNovel()deleteNovel() 메서드의 새로운 조건부 분기 로직이 기존 소설 관리 로직과 제대로 통합되는지 확인
  • 라이브러리 새로고침 흐름: MyLibraryRepository에서 Paging source 무효화가 UI 갱신을 올바르게 트리거하는지, UserLibraryRepository의 no-op 구현이 의도적인지 확인
  • 광범위한 UI 변경: 7개 라이브러리 컴포넌트와 1개 로그인 컴포넌트에서 clickableWithoutRipple 적용으로 인한 상호작용 일관성 검증

🔗 관련 PR

🏷️ 제안 라벨

🍯 [FEAT], ♻️ [REFACTOR]

👥 제안 리뷰어

  • junseo511
  • yeonjeen
  • m6z1

🐰 축하 시

스포일러 이미지는 사라지고 🫥
라이브러리는 새로워지고 ✨
클릭은 소담하게... 리플 없이 🤫
모두가 행복해지는 마법의 업데이트! 🪄

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/763

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a9f5eaf and c327931.

📒 Files selected for processing (17)
  • app/src/main/java/com/into/websoso/ui/main/feed/model/FeedModel.kt (1 hunks)
  • app/src/main/java/com/into/websoso/ui/main/library/LibraryFragment.kt (1 hunks)
  • app/src/main/res/layout/item_feed.xml (2 hunks)
  • core/common/src/main/java/com/into/websoso/core/common/extensions/ComposeExtensions.kt (1 hunks)
  • core/database/src/main/java/com/into/websoso/core/database/datasource/library/DefaultLibraryLocalDataSource.kt (2 hunks)
  • data/library/src/main/java/com/into/websoso/data/library/LibraryRepository.kt (1 hunks)
  • data/library/src/main/java/com/into/websoso/data/library/repository/MyLibraryRepository.kt (1 hunks)
  • data/library/src/main/java/com/into/websoso/data/library/repository/UserLibraryRepository.kt (1 hunks)
  • feature/library/src/main/java/com/into/websoso/feature/library/LibraryViewModel.kt (2 hunks)
  • feature/library/src/main/java/com/into/websoso/feature/library/component/LibraryGridListItem.kt (3 hunks)
  • feature/library/src/main/java/com/into/websoso/feature/library/component/LibraryListItem.kt (3 hunks)
  • feature/library/src/main/java/com/into/websoso/feature/library/component/LibrayFilterTopBar.kt (2 hunks)
  • feature/library/src/main/java/com/into/websoso/feature/library/filter/component/LibraryFilterBottomSheetButtons.kt (3 hunks)
  • feature/library/src/main/java/com/into/websoso/feature/library/filter/component/LibraryFilterBottomSheetClickableItem.kt (2 hunks)
  • feature/library/src/main/java/com/into/websoso/feature/library/filter/component/LibraryFilterBottomSheetHeader.kt (2 hunks)
  • feature/library/src/main/java/com/into/websoso/feature/library/filter/component/LibraryFilterBottomSheetNovelRatingGrid.kt (7 hunks)
  • feature/signin/src/main/java/com/into/websoso/feature/signin/component/SignInButtons.kt (2 hunks)

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.

}

override suspend fun refresh() {
libraryLocalDataSource.selectAllNovels().invalidate()
Copy link

Choose a reason for hiding this comment

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

🚫 [ktlint] standard:indent reported by reviewdog 🐶
Unexpected indentation (11) (should be 12)

shape = RoundedCornerShape(4.dp),
).padding(vertical = 4.dp),
)
.padding(vertical = 4.dp),
Copy link

Choose a reason for hiding this comment

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

🚫 [ktlint] standard:chain-method-continuation reported by reviewdog 🐶
Unexpected newline before '.'

shape = RoundedCornerShape(8.dp),
).padding(vertical = 4.dp),
)
.padding(vertical = 4.dp),
Copy link

Choose a reason for hiding this comment

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

🚫 [ktlint] standard:chain-method-continuation reported by reviewdog 🐶
Unexpected newline before '.'

shape = RoundedCornerShape(size = 8.dp),
).then(
)
.then(
Copy link

Choose a reason for hiding this comment

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

🚫 [ktlint] standard:chain-method-continuation reported by reviewdog 🐶
Unexpected newline before '.'

},
).padding(vertical = 14.dp, horizontal = 24.dp),
)
.padding(vertical = 14.dp, horizontal = 24.dp),
Copy link

Choose a reason for hiding this comment

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

🚫 [ktlint] standard:chain-method-continuation reported by reviewdog 🐶
Unexpected newline before '.'

@m6z1
Copy link
Member

m6z1 commented Nov 3, 2025

새로운 브랜치에서 해결 예정

@m6z1 m6z1 closed this Nov 3, 2025
@m6z1 m6z1 deleted the feat/763 branch November 3, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 스포일러 글일 경우 이미지 보이지 않도록 구현

3 participants