Skip to content

feat: 감상평 가이드 추가#124

Merged
clxxrlove merged 11 commits into
developfrom
BOOK-193-feature/#122
Aug 1, 2025
Merged

feat: 감상평 가이드 추가#124
clxxrlove merged 11 commits into
developfrom
BOOK-193-feature/#122

Conversation

@clxxrlove
Copy link
Copy Markdown
Member

@clxxrlove clxxrlove commented Jul 30, 2025

🔗 관련 이슈

📘 작업 유형

  • ✨ Feature (기능 추가)
  • 🐞 Bugfix (버그 수정)
  • 🔧 Refactor (코드 리팩토링)
  • ⚙️ Chore (환경 설정)
  • 📝 Docs (문서 작성 및 수정)
  • ✅ Test (기능 테스트)
  • 🎨 style (코드 스타일 수정)

📙 작업 내역

  • 감상평 가이드 화면 / 기능 추가 -> ViewModel까지 연결
  • PageControl의 Indicator를 디자인 의도에 맞도록 수정
  • TextView 사용 시 키보드가 안 내려가던 버그 수정

🧪 테스트 내역

  • 브라우저/기기에서 동작 확인
  • 엣지 케이스 테스트 완료
  • 기존 기능 영향 없음

🎨 스크린샷 또는 시연 영상 (선택)

ScreenRecording_07-31-2025.01-43-42_1.MP4

✅ PR 체크리스트

  • 커밋 메시지가 명확합니다
  • PR 제목이 컨벤션에 맞습니다
  • 관련 이슈 번호를 작성했습니다
  • 기능이 정상적으로 작동합니다
  • 불필요한 코드를 제거했습니다

Summary by CodeRabbit

  • 신규 기능

    • 감상평 가이드 선택을 위한 바텀시트 UI가 추가되어, 사용자가 감상평 작성 시 가이드 옵션을 선택할 수 있습니다.
    • 감상평 가이드 버튼 및 관련 선택 UI가 노트 작성 화면에 통합되었습니다.
    • 텍스트 입력 필드에 기본 텍스트 색상이 적용되고, 텍스트 설정 메서드가 추가되었습니다.
  • 기능 개선

    • 페이지 컨트롤의 인디케이터가 현재 페이지까지 모두 강조되어 진행 상황을 더 명확히 확인할 수 있습니다.
    • 감상평, 문장 등록 버튼 스타일이 간소화되어 일관된 디자인을 제공합니다.
    • 화면 빈 곳을 탭하면 키보드가 자동으로 내려가도록 개선되었습니다.
  • 버그 수정

    • 없음
  • 기타

    • 일부 내부 구조 및 네비게이션 처리 방식이 개선되었습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 30, 2025

Walkthrough

이번 변경 사항은 독서 기록 화면에 감상평 가이드(가이드 선택 및 반영) 기능을 추가하고, 관련 UI 컴포넌트와 상태 관리 로직을 확장합니다. 추가로, 페이지 컨트롤 및 일부 버튼 스타일, 텍스트 필드 동작 등 UI 요소의 동작과 스타일이 개선되었습니다.

Changes

Cohort / File(s) Change Summary
감상평 가이드 기능 추가
src/Projects/BKPresentation/Sources/MainFlow/Note/Extension/BKBottomSheetViewController+.swift, src/Projects/BKPresentation/Sources/MainFlow/Note/View/AppreciationGuideButton.swift
감상평 가이드 선택을 위한 바텀시트 팩토리 메서드 및 가이드 버튼/enum 컴포넌트 신설
NoteView 및 NoteViewController 확장
src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift, src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteViewController.swift
감상평 가이드 버튼 이벤트 처리, 바텀시트 호출, 가이드 텍스트 반영, 키보드 해제 기능 추가
ViewModel 상태 및 액션 확장
src/Projects/BKPresentation/Sources/MainFlow/Note/ViewModel/NoteViewModel.swift, src/Projects/BKPresentation/Sources/MainFlow/Note/ViewModel/NoteForm.swift
감상평 가이드 텍스트 상태 및 선택 액션 추가, Equatable 준수
SentenceAppreciationView 개선
src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceAppreciationView.swift
감상평 가이드 버튼 구조 및 초기화 개선, 텍스트 설정 메서드 추가
SentenceRegistrationView 버튼 구조 개선
src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceRegistrationView.swift
등록 버튼에서 텍스트 스캔 버튼으로 구조 단순화 및 스타일 개선
BKTextView 기능 추가
src/Projects/BKDesign/Sources/Components/TextField/BKTextView.swift
텍스트 컬러 기본값 지정, setText(_:) 메서드 추가
BKPageControl 시각적 로직 변경
src/Projects/BKDesign/Sources/Components/BKPageControl.swift
현재 페이지 이하 인디케이터 모두 활성화되도록 updateIndicators() 로직 변경
BKBottomSheetViewController 주석 추가
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift
프레젠테이션 레이어 분리 관련 TODO 주석 추가 (기능 변화 없음)

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant NoteView
    participant NoteViewController
    participant BKBottomSheetViewController
    participant AppreciationGuideButton
    participant NoteViewModel

    User->>NoteView: 감상평 가이드 버튼 탭
    NoteView->>NoteViewController: .didTapGuideButton 이벤트 발송
    NoteViewController->>BKBottomSheetViewController: presentAppreciationGuide() 호출
    BKBottomSheetViewController->>User: 가이드 리스트 표시
    User->>AppreciationGuideButton: 가이드 선택
    AppreciationGuideButton->>BKBottomSheetViewController: 선택 상태 및 버튼 활성화
    User->>BKBottomSheetViewController: 확인 버튼 탭
    BKBottomSheetViewController->>NoteViewController: confirmAction(선택된 가이드)
    NoteViewController->>NoteViewModel: .appreciationGuideSelected(문구) 액션 전송
    NoteViewModel->>NoteViewController: selectedGuideText 상태 업데이트
    NoteViewController->>NoteView: setAppreciationText(문구) 호출
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
감상평 가이드 추가 (#122)

Assessment against linked issues: Out-of-scope changes

해당 변경 사항 중 이슈 #122의 목적과 무관한 기능적 코드 변경은 발견되지 않았습니다.

Possibly related PRs

Suggested labels

✨ feat

Suggested reviewers

  • doyeonk429

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-193-feature/#122

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or @coderabbitai 요약 to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 0

🧹 Nitpick comments (2)
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (1)

110-110: TODO 주석이 추가되었습니다.

Presentation Layer로 분리하는 작업에 대한 TODO가 추가되었습니다. 이런 리팩토링 작업을 추적하기 위해 별도 이슈로 관리하는 것을 고려해보세요.

이 리팩토링 작업을 추적할 이슈를 생성하는데 도움이 필요하시면 말씀해주세요.

src/Projects/BKPresentation/Sources/MainFlow/Note/Extension/BKBottomSheetViewController+.swift (1)

34-39: 레이아웃 제약조건 개선 제안

현재 horizontalEdges에 inset을 적용하지 않고 있는데, 가독성을 위해 좌우 여백을 추가하는 것이 좋겠습니다.

 guideStack.snp.makeConstraints {
     $0.verticalEdges.equalToSuperview()
         .inset(BKInset.inset5)
-    $0.horizontalEdges.equalToSuperview()
+    $0.horizontalEdges.equalToSuperview()
+        .inset(BKInset.inset5)
 }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4990db9 and 69dd368.

📒 Files selected for processing (11)
  • src/Projects/BKDesign/Sources/Components/BKPageControl.swift (1 hunks)
  • src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (1 hunks)
  • src/Projects/BKDesign/Sources/Components/TextField/BKTextView.swift (2 hunks)
  • src/Projects/BKPresentation/Sources/MainFlow/Note/Extension/BKBottomSheetViewController+.swift (1 hunks)
  • src/Projects/BKPresentation/Sources/MainFlow/Note/View/AppreciationGuideButton.swift (1 hunks)
  • src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift (5 hunks)
  • src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteViewController.swift (3 hunks)
  • src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceAppreciationView.swift (2 hunks)
  • src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceRegistrationView.swift (2 hunks)
  • src/Projects/BKPresentation/Sources/MainFlow/Note/ViewModel/NoteForm.swift (1 hunks)
  • src/Projects/BKPresentation/Sources/MainFlow/Note/ViewModel/NoteViewModel.swift (2 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#112
File: src/Projects/BKPresentation/Sources/MainFlow/Note/View/EmotionRegistrationView.swift:52-53
Timestamp: 2025-07-28T10:44:32.256Z
Learning: clxxrlove는 EmotionRegistrationView에서 someEmotion1-4 케이스들을 임시로 구현했으며, 해당하는 그래픽 디자인이 나온 후 수정할 예정이라고 명시했다. 감정 선택 UI는 디자인 에셋 완성 후 구현하는 것을 선호한다.
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#56
File: src/Projects/BKPresentation/Sources/Constant/PresentationKeys.swift:3-5
Timestamp: 2025-07-07T13:53:13.006Z
Learning: clxxrlove prefers using enum over struct for constants namespace due to better runtime performance, memory layout, and compiler optimizations. Enum prevents instantiation at compile time without needing private init().
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#94
File: src/Projects/BKData/Sources/Repository/DefaultBookRepository.swift:15-40
Timestamp: 2025-07-21T05:16:18.481Z
Learning: clxxrlove는 Reed-iOS 프로젝트에서 기능 구현 시 우선순위를 명확하게 설정한다. 기본 기능 구현을 먼저 완료하고, 에러 처리나 안정성 개선은 이후 단계에서 진행하는 것을 선호한다.
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (6)

Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.

Learnt from: doyeonk429
PR: #68
File: src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift:0-0
Timestamp: 2025-07-10T08:21:44.204Z
Learning: doyeonk429는 BKDesign PreviewApp의 테스트 파일에서 주석 처리된 코드를 의도적으로 남겨두어 쉽게 테스트 구성을 전환할 수 있도록 구현한다. 이는 개발 편의성을 위한 것으로, 테스트 파일에서는 일반적인 "주석 처리된 코드 제거" 규칙을 적용하지 않는다.

Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.

Learnt from: doyeonk429
PR: #105
File: src/Projects/BKPresentation/Sources/TabBarFlow/BottomTabBarController.swift:24-30
Timestamp: 2025-07-24T13:00:59.096Z
Learning: doyeonk429는 BottomTabBarController에서 viewDidLayoutSubviews의 레이어 재생성 방식을 유지하기를 선호합니다. 탭바에서는 레이아웃 변경 케이스가 거의 없기 때문에 성능 최적화보다는 현재의 단순한 구현 방식이 더 적합하다고 판단합니다.

Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.

Learnt from: clxxrlove
PR: #79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:34-35
Timestamp: 2025-07-11T12:13:49.406Z
Learning: clxxrlove prefers to comment out incomplete features in SettingViewModel (like logout and withdrawal functionality) rather than removing them entirely, keeping the architecture ready for future implementation. This approach allows for easier connection of functionality when ready to implement.

src/Projects/BKDesign/Sources/Components/BKPageControl.swift (1)

Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.

src/Projects/BKDesign/Sources/Components/TextField/BKTextView.swift (1)

Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceRegistrationView.swift (3)

Learnt from: clxxrlove
PR: #112
File: src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift:128-140
Timestamp: 2025-07-28T10:45:09.696Z
Learning: clxxrlove는 NoteView의 nextButtonTapped 메서드에서 폼 검증 실패 시 첫 번째 페이지로 되돌아가는 로직을 임시로 구현했으며, 추후 적절한 에러 처리 로직을 추가할 예정이라고 명시했다. 임시 화면 구현 단계에서는 기본 동작에 집중하고 에러 처리는 후속 작업으로 계획하는 것을 선호한다.

Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.

Learnt from: doyeonk429
PR: #68
File: src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift:86-92
Timestamp: 2025-07-10T08:21:16.126Z
Learning: BKButtonGroup의 horizontal 레이아웃에서 stackView.distribution을 .fillProportionally로 설정한 것은 의도된 디자인입니다. doyeonk429는 버튼들이 콘텐츠 길이에 따라 다른 너비를 가지는 것을 선호합니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift (1)

Learnt from: clxxrlove
PR: #112
File: src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift:128-140
Timestamp: 2025-07-28T10:45:09.696Z
Learning: clxxrlove는 NoteView의 nextButtonTapped 메서드에서 폼 검증 실패 시 첫 번째 페이지로 되돌아가는 로직을 임시로 구현했으며, 추후 적절한 에러 처리 로직을 추가할 예정이라고 명시했다. 임시 화면 구현 단계에서는 기본 동작에 집중하고 에러 처리는 후속 작업으로 계획하는 것을 선호한다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceAppreciationView.swift (1)

Learnt from: doyeonk429
PR: #68
File: src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift:86-92
Timestamp: 2025-07-10T08:21:16.126Z
Learning: BKButtonGroup의 horizontal 레이아웃에서 stackView.distribution을 .fillProportionally로 설정한 것은 의도된 디자인입니다. doyeonk429는 버튼들이 콘텐츠 길이에 따라 다른 너비를 가지는 것을 선호합니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/Extension/BKBottomSheetViewController+.swift (2)

Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.

Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteViewController.swift (2)

Learnt from: clxxrlove
PR: #112
File: src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift:128-140
Timestamp: 2025-07-28T10:45:09.696Z
Learning: clxxrlove는 NoteView의 nextButtonTapped 메서드에서 폼 검증 실패 시 첫 번째 페이지로 되돌아가는 로직을 임시로 구현했으며, 추후 적절한 에러 처리 로직을 추가할 예정이라고 명시했다. 임시 화면 구현 단계에서는 기본 동작에 집중하고 에러 처리는 후속 작업으로 계획하는 것을 선호한다.

Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/AppreciationGuideButton.swift (2)

Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.

Learnt from: doyeonk429
PR: #68
File: src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift:86-92
Timestamp: 2025-07-10T08:21:16.126Z
Learning: BKButtonGroup의 horizontal 레이아웃에서 stackView.distribution을 .fillProportionally로 설정한 것은 의도된 디자인입니다. doyeonk429는 버튼들이 콘텐츠 길이에 따라 다른 너비를 가지는 것을 선호합니다.

🧬 Code Graph Analysis (5)
src/Projects/BKDesign/Sources/Components/BKPageControl.swift (1)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
  • bkBackgroundColor (38-50)
src/Projects/BKDesign/Sources/Components/TextField/BKTextView.swift (2)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
  • bkContentColor (52-63)
src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceAppreciationView.swift (1)
  • setText (82-84)
src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift (2)
src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceAppreciationView.swift (1)
  • setText (82-84)
src/Projects/BKDesign/Sources/Components/TextField/BKTextView.swift (1)
  • setText (91-94)
src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteViewController.swift (5)
src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift (1)
  • setAppreciationText (97-99)
src/Projects/BKPresentation/Sources/Common/Coordinator/Coordinator.swift (1)
  • popAndFinish (28-37)
src/Projects/BKPresentation/Sources/MainFlow/Note/Extension/BKBottomSheetViewController+.swift (1)
  • makeAppreciationGuideSheet (8-51)
src/Projects/BKPresentation/Sources/MainFlow/Note/ViewModel/NoteViewModel.swift (1)
  • send (30-34)
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (1)
  • show (86-106)
src/Projects/BKPresentation/Sources/MainFlow/Note/View/AppreciationGuideButton.swift (1)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (3)
  • bkBorderColor (65-76)
  • bkBackgroundColor (38-50)
  • bkContentColor (52-63)
🪛 SwiftLint (0.57.0)
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift

[Warning] 110-110: TODOs should be resolved (- Presentation Layer로 분리)

(todo)

🔇 Additional comments (30)
src/Projects/BKDesign/Sources/Components/TextField/BKTextView.swift (2)

19-19: 텍스트 색상 설정이 적절히 추가되었습니다.

시맨틱 컬러 시스템을 사용하여 일관된 텍스트 색상을 적용한 것이 좋습니다.


91-94: setText 메서드 구현이 올바릅니다.

프로그래매틱하게 텍스트를 설정하면서 textViewDidChange를 호출하여 플레이스홀더 가시성을 올바르게 업데이트합니다. 감상평 가이드 기능과의 통합에 필요한 기능입니다.

src/Projects/BKDesign/Sources/Components/BKPageControl.swift (1)

68-68: 페이지 컨트롤 동작 변경을 확인해주세요.

로직이 index == currentPage에서 index <= currentPage로 변경되어 현재 페이지만 강조하는 것이 아니라 현재 페이지까지의 모든 인디케이터를 강조하도록 변경되었습니다. 이는 위치 표시기에서 진행률 표시기로의 의미있는 동작 변경입니다.

감상평 가이드 기능에서 이러한 진행률 스타일의 표시가 의도된 것인지 확인해주세요.

src/Projects/BKPresentation/Sources/MainFlow/Note/ViewModel/NoteForm.swift (1)

5-5: Equatable 프로토콜 채택이 적절합니다.

상태 관리를 위해 Equatable 프로토콜을 추가한 것이 좋습니다. 모든 프로퍼티가 이미 Equatable을 준수하므로 자동으로 구현됩니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/ViewModel/NoteViewModel.swift (3)

7-9: 상태 관리 구조가 올바르게 확장되었습니다.

Equatable 프로토콜 채택과 selectedGuideText 프로퍼티 추가로 감상평 가이드 기능을 위한 상태 관리가 적절히 구현되었습니다.


12-12: 새로운 액션 케이스가 적절히 추가되었습니다.

감상평 가이드 선택을 처리하기 위한 액션이 올바르게 정의되었습니다.


41-42: 리듀서 로직이 올바르게 구현되었습니다.

선택된 가이드 텍스트를 상태에 업데이트하는 로직이 단방향 데이터 플로우 패턴을 잘 따르고 있습니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceRegistrationView.swift (2)

32-35: UI 단순화가 잘 적용되었습니다!

BKButton의 사전 정의된 스타일(.stroke, .rounded)을 사용하여 이전의 복잡한 수동 스타일링을 제거한 것이 좋습니다. 코드가 더 간결해지고 디자인 시스템과의 일관성도 향상되었습니다.


48-49: 버튼 구성이 깔끔하게 정리되었습니다.

제목과 아이콘 설정을 configure() 메서드에서 직접 처리하는 것이 명확하고 좋습니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteView.swift (4)

21-25: 뷰 인스턴스 중앙화와 의존성 주입이 잘 구현되었습니다.

lazy var를 사용하여 뷰 인스턴스들을 중앙화하고, SentenceAppreciationView에 클로저를 주입하는 방식이 깔끔합니다. 이는 느슨한 결합과 재사용성을 향상시킵니다.


58-59: 키보드 자동 해제 기능 추가가 유용합니다.

텍스트 입력 필드 외부를 탭했을 때 키보드가 자동으로 해제되는 기능은 사용자 경험을 크게 개선합니다. AI 요약에서 언급된 TextView 키보드 버그 수정과 관련된 것으로 보입니다.


97-99: 외부 제어를 위한 API가 적절히 구현되었습니다.

감상평 가이드 선택 후 텍스트를 설정할 수 있는 setAppreciationText(_:) 메서드가 잘 구현되었습니다. 관련 코드 스니펫에서 확인한 SentenceAppreciationView.setText(_:) 메서드와 연결되어 동작합니다.


134-136: 이벤트 처리 구조가 명확합니다.

가이드 버튼 탭 이벤트를 eventPublisher를 통해 전달하는 방식이 깔끔하고, 뷰-뷰컨트롤러 간의 책임 분리가 잘 되어있습니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/SentenceAppreciationView.swift (4)

36-39: 버튼 스타일 단순화가 잘 적용되었습니다.

이전의 registerButton에서 guideButton으로 변경하면서 BKButton의 사전 정의된 스타일을 사용하는 것이 좋습니다. 일관성 있는 디자인 시스템 적용이 잘 되었습니다.


41-46: 의존성 주입 패턴이 적절히 구현되었습니다.

생성자에서 클로저를 받아 버튼 액션으로 설정하는 방식이 깔끔합니다. 이는 뷰의 재사용성을 높이고 외부에서 동작을 제어할 수 있게 해줍니다.


55-56: 버튼 구성이 명확합니다.

책 아이콘과 "감상평 가이드" 제목이 기능을 직관적으로 나타내며, configure() 메서드에서 설정하는 것이 적절합니다.


82-84: 외부 제어 API가 잘 구현되었습니다.

setText(_:) 메서드를 통해 외부에서 감상평 텍스트를 설정할 수 있도록 한 것이 좋습니다. 관련 코드 스니펫에서 확인한 BKTextView.setText(_:) 메서드를 적절히 활용하고 있습니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/Extension/BKBottomSheetViewController+.swift (3)

8-14: 팩토리 메서드 구조가 잘 설계되었습니다.

makeAppreciationGuideSheet 정적 메서드가 명확한 책임을 가지고 있으며, 클로저를 통한 확인 액션 주입이 적절합니다. AppreciationGuide.allCases를 활용한 버튼 생성도 확장성 있게 구현되었습니다.


21-33: 바텀시트 구성이 적절합니다.

제목, 부제목, 스타일 설정이 감상평 가이드 선택 용도에 맞게 잘 구성되었습니다. suppliedContentStyle: .lower(containerView) 사용으로 커스텀 콘텐츠 영역을 적절히 활용했습니다.


41-47: 선택 상태 관리 로직이 견고합니다.

버튼 선택 시 다른 버튼들의 선택 해제, selectedGuide 업데이트, 확인 버튼 활성화 등의 로직이 잘 구현되었습니다. guard let selectedGuide else { return } 를 통한 안전한 처리도 좋습니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteViewController.swift (5)

7-9: 이벤트 타입 확장이 적절합니다.

NoteViewEventEquatable 준수 추가와 didTapGuideButton 케이스 추가가 잘 구현되었습니다. Equatable 준수로 이벤트 필터링과 비교가 가능해졌습니다.


61-66: 이벤트 처리 로직이 명확합니다.

가이드 버튼 탭 이벤트를 필터링하여 처리하는 방식이 깔끔하고, presentAppreciationGuide() 메서드 호출로 책임이 잘 분리되었습니다.


69-77: 상태 바인딩이 효율적으로 구현되었습니다.

selectedGuideText 상태 변경을 관찰하여 뷰에 반영하는 로직이 잘 구현되었습니다. removeDuplicates()를 사용하여 불필요한 업데이트를 방지한 것도 좋습니다.


134-143: 바텀시트 표시 로직이 적절합니다.

팩토리 메서드를 활용한 바텀시트 생성과 확인 액션 처리가 잘 구현되었습니다. viewModel.send(.appreciationGuideSelected(selectedGuide.rawValue)) 호출로 상태 업데이트도 적절히 처리되고 있습니다.


126-126: 네비게이션 처리 개선이 좋습니다.

coordinator?.popAndFinish() 호출로 일관된 네비게이션 패턴을 따르는 것이 좋습니다. 관련 코드 스니펫에서 확인한 바와 같이 적절한 coordinator 메서드를 사용하고 있습니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/View/AppreciationGuideButton.swift (5)

7-20: 감상평 가이드 enum 구현이 잘 되어있습니다.

각 케이스의 한국어 문구가 의미있고, reaction 계산 속성을 통해 플레이스홀더와 함께 템플릿 형태로 제공하는 구조가 깔끔합니다. CaseIterable 프로토콜 채택으로 UI 생성 시 반복 처리도 용이합니다.


22-53: 클래스 구조와 색상 시스템 사용이 적절합니다.

BKDesign의 시맨틱 컬러 시스템을 일관되게 사용하고, BKLabel에서 플레이스홀더 하이라이팅도 잘 구현되어 있습니다. 커스텀 이니셜라이저도 적절하게 구현되었습니다.


55-75: 스타일링과 레이아웃 구현이 우수합니다.

setupStyleupdateStyle의 역할 분리가 명확하고, BKDesign의 상수들을 활용한 일관된 스타일링이 잘 되어있습니다. SnapKit을 사용한 제약조건 설정도 적절하며, trailing 제약조건에서 lessThanOrEqualTo를 사용해 텍스트 길이에 유연하게 대응하는 것도 좋습니다.


83-89: 상수 정의가 깔끔하게 구성되어 있습니다.

private extension을 통한 상수 분리와 BKDesign 시스템의 기존 상수들을 활용하는 방식이 프로젝트의 일관된 패턴을 잘 따르고 있습니다. enum을 사용한 네임스페이스 구성도 적절합니다.


77-80: 선택 상태 관리가 이미 구현되어 있습니다.

src/Projects/BKPresentation/Sources/MainFlow/Note/Extension/BKBottomSheetViewController+.swiftmakeAppreciationGuideSheet 메서드 내 onSelected 클로저에서

guideButtons.forEach { $0.isSelected = ($0 == button) }

로 다른 버튼의 선택 해제를 처리하고 있습니다. 해당 로직이 상위 컴포넌트에서 관리되고 있으므로 별도 수정이 필요 없습니다.

Likely an incorrect or invalid review comment.

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: 0

🧹 Nitpick comments (1)
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (1)

109-109: Presentation Layer 분리 작업을 추적하세요.

TODO 주석이 추가되었지만, 이를 해결하기 위한 구체적인 계획이 필요합니다. makeWithdrawalSheet와 같은 정적 팩토리 메서드들을 별도의 Presentation Layer로 분리하는 것이 좋은 아키텍처 개선 방향입니다.

해당 TODO를 해결하기 위한 이슈를 생성하거나 리팩토링 계획을 수립하는 데 도움을 드릴까요?

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69dd368 and 2b1df0a.

📒 Files selected for processing (1)
  • src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#112
File: src/Projects/BKPresentation/Sources/MainFlow/Note/View/EmotionRegistrationView.swift:52-53
Timestamp: 2025-07-28T10:44:32.256Z
Learning: clxxrlove는 EmotionRegistrationView에서 someEmotion1-4 케이스들을 임시로 구현했으며, 해당하는 그래픽 디자인이 나온 후 수정할 예정이라고 명시했다. 감정 선택 UI는 디자인 에셋 완성 후 구현하는 것을 선호한다.
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#56
File: src/Projects/BKPresentation/Sources/Constant/PresentationKeys.swift:3-5
Timestamp: 2025-07-07T13:53:13.006Z
Learning: clxxrlove prefers using enum over struct for constants namespace due to better runtime performance, memory layout, and compiler optimizations. Enum prevents instantiation at compile time without needing private init().
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#94
File: src/Projects/BKData/Sources/Repository/DefaultBookRepository.swift:15-40
Timestamp: 2025-07-21T05:16:18.481Z
Learning: clxxrlove는 Reed-iOS 프로젝트에서 기능 구현 시 우선순위를 명확하게 설정한다. 기본 기능 구현을 먼저 완료하고, 에러 처리나 안정성 개선은 이후 단계에서 진행하는 것을 선호한다.
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (3)

Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.

Learnt from: doyeonk429
PR: #105
File: src/Projects/BKPresentation/Sources/TabBarFlow/BottomTabBarController.swift:24-30
Timestamp: 2025-07-24T13:00:59.096Z
Learning: doyeonk429는 BottomTabBarController에서 viewDidLayoutSubviews의 레이어 재생성 방식을 유지하기를 선호합니다. 탭바에서는 레이아웃 변경 케이스가 거의 없기 때문에 성능 최적화보다는 현재의 단순한 구현 방식이 더 적합하다고 판단합니다.

Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.

🪛 SwiftLint (0.57.0)
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift

[Warning] 109-109: TODOs should be resolved (- Presentation Layer로 분리)

(todo)

⏰ 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). (1)
  • GitHub Check: build
🔇 Additional comments (2)
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (2)

43-43: 잘 개선된 생명주기 처리입니다.

뷰 컨트롤러가 실제로 dismiss되거나 parent에서 제거되는 경우에만 처리하도록 하는 guard 절이 적절히 추가되었습니다. 이는 불필요한 처리를 방지하고 성능을 개선합니다.


48-52: 트랜지션 취소 처리가 올바르게 개선되었습니다.

트랜지션이 취소되지 않은 경우에만 dimView를 정리하도록 하는 로직이 추가되어, 사용자가 dismiss 제스처를 취소했을 때 dimView가 의도치 않게 제거되는 문제를 방지합니다.

Copy link
Copy Markdown
Member

@doyeonk429 doyeonk429 left a comment

Choose a reason for hiding this comment

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

OCR 개발하면서 확인했던 사항들 이번 PR에 다 보강된 것 같아서 좋습니다 !
다만 실제 기기에서 확인했을 때 '커서' 맨앞으로 넘기는 기능이 현재 적용되고 있지 않은 것 같아서, 추후 API 연결 시 확인해보시는게 어떤지 제안드립니다~

@clxxrlove clxxrlove merged commit 753d234 into develop Aug 1, 2025
3 checks passed
@clxxrlove clxxrlove deleted the BOOK-193-feature/#122 branch August 1, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-193/feat] 감상평 가이드 추가

2 participants