Skip to content

Conversation

@zzangzzangguy
Copy link
Contributor

@zzangzzangguy zzangzzangguy commented Jul 25, 2025

📌 이슈

  • #156

✅ 작업 사항

  • 관리자화면의 바텀시트뷰 개선 동적높이계산 추가
  • 터치 이벤트 처리 개선
  • 관리자화면에서 스토어 선택시 해당 디테일뷰로 이동되도록 수정
  • 키보드 자동해제 추가
  • TableView 터치 처리 개선
  • MapViewController에서 매직넘버 개선과 불필요한 UI업데이트 제거

Summary by CodeRabbit

  • 신규 기능

    • 관리자 화면에서 하단 시트의 높이가 선택된 항목에 따라 동적으로 조절됩니다.
    • 관리자 목록에서 셀 선택 시 상세 화면으로 이동할 수 있습니다.
    • 관리자 화면에서 테이블 뷰 배경 터치 시 키보드가 자동으로 닫힙니다.
  • 버그 수정

    • 하단 시트 바깥(딤드 영역) 터치 시만 시트가 닫히고, 내부 터치는 정상 동작합니다.
  • 리팩터링

    • 지도 화면의 상수값(크기, 애니메이션, 줌 등)을 한 곳에 모아 관리하도록 개선하였습니다.
    • 지도 화면의 프로토콜 구현을 extension으로 분리하여 코드 가독성을 높였습니다.
    • 관리자 화면의 뷰 및 제스처 설정 코드를 정리하고, 바인딩 로직을 개선하였습니다.
    • 하단 시트 뷰컨트롤러의 뷰 구성 및 제스처 처리 방식을 개선하였습니다.
    • 불필요한 주석 및 코드 포맷을 정리하였습니다.

@coderabbitai
Copy link

coderabbitai bot commented Jul 25, 2025

Walkthrough

이 변경사항은 Admin 및 Map 관련 뷰와 컨트롤러에 대한 리팩토링과 기능 개선을 포함합니다. AdminBottomSheet의 동적 높이 조정, 딤드 뷰 제스처 개선, 키보드 해제 기능 추가, MapViewController의 상수 중앙화 및 뷰포트 처리 로직 단순화, 그리고 코드 구조 개선이 이루어졌습니다.

Changes

파일(들) 변경 요약
AdminBottomSheetReactor.swift
Poppool/PresentationLayer/Presentation/Presentation/Scene/Admin/AdminBottomSheet/AdminBottomSheetReactor.swift
파일 헤더 주석 블록 삭제 (기능/로직 변화 없음)
AdminBottomSheetView.swift
Poppool/PresentationLayer/Presentation/Presentation/Scene/Admin/AdminBottomSheet/AdminBottomSheetView.swift
import 순서 변경, 포맷 정리, 컬렉션 뷰 높이 계산 메서드 추가, 기존 가시성 업데이트 메서드 제거, 제약 조건 일부 수정
AdminBottomSheetViewController.swift
Poppool/PresentationLayer/Presentation/Presentation/Scene/Admin/AdminBottomSheet/AdminBottomSheetViewController.swift
딤드 뷰를 lazy var로 변경 및 제스처 델리게이트 적용, 동적 높이 조정 메서드 추가, 바인딩 및 뷰 추가 순서 개선, 제스처 처리 및 확장 추가, 메서드 리팩토링
AdminView.swift
Poppool/PresentationLayer/Presentation/Presentation/Scene/Admin/AdminView.swift
tableView의 backgroundView를 UIView로 설정 및 사용자 상호작용 활성화
AdminViewController.swift
Poppool/PresentationLayer/Presentation/Presentation/Scene/Admin/AdminViewController.swift
detailFactory 의존성 추가, setup 메서드 분리, 키보드 해제용 제스처 추가, 셀 선택 시 상세 화면 이동 로직 구현, 메서드 접근제어 변경, 안전한 배열 서브스크립트 추가
MapViewController.swift
Poppool/PresentationLayer/Presentation/Presentation/Scene/Map/MapView/MapViewController.swift
프로토콜 확장 별도 분리, 상수 enum으로 중앙화, 뷰포트 진입 로직 단순화 및 분리, 마커/클러스터 탭 처리 로직 개선, 내부 변수 추가, UI 및 애니메이션 상수 적용

Sequence Diagram(s)

sequenceDiagram
actor User
participant AdminBottomSheetViewController as BottomSheetVC
participant AdminBottomSheetView as BottomSheetView

User->>BottomSheetVC: Segment 선택
BottomSheetVC->>BottomSheetView: calculateCollectionViewHeight(for: items)
BottomSheetView-->>BottomSheetVC: 반환된 높이
BottomSheetVC->>BottomSheetVC: updateContainerHeight()로 동적 높이 조정
Loading
sequenceDiagram
actor User
participant AdminViewController as AdminVC
participant AdminView as AdminView
participant DetailController as DetailVC

User->>AdminView: 셀 선택
AdminView->>AdminVC: didSelectRowAt 호출
AdminVC->>AdminVC: dismissKeyboard()
AdminVC->>DetailVC: DetailController 생성 및 Reactor 주입
AdminVC->>DetailVC: pushViewController
Loading
sequenceDiagram
actor User
participant MapViewController as MapVC

User->>MapVC: 지도 뷰포트 진입
MapVC->>MapVC: isFirstViewportEntry 체크
alt 최초 진입
    MapVC->>MapVC: 가장 가까운 매장 선택 및 포커스
else 이후 진입
    MapVC->>MapVC: 클러스터링만 갱신
end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Poem

🐇
코드가 춤추는 밤,
뷰의 높이도 동적으로 쑥쑥!
딤드 뷰는 부드럽게,
지도 위 매장도 똑똑하게,
키보드도 살짝 물러나네.
토끼는 오늘도 깡총깡총,
리팩토링의 들판을 달린다!

Note

⚡️ Unit Test Generation is now available in beta!

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


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1b3b101 and 2368c6d.

📒 Files selected for processing (1)
  • Poppool/PresentationLayer/Presentation/Presentation/Scene/Admin/AdminViewController.swift (15 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Poppool/PresentationLayer/Presentation/Presentation/Scene/Admin/AdminViewController.swift
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#156-AdminPage-refactoring

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.

@zzangzzangguy zzangzzangguy requested a review from 0Hooni July 26, 2025 09:15
Copy link
Member

@0Hooni 0Hooni left a comment

Choose a reason for hiding this comment

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

PR 리뷰 남겼습니다. 코멘트에 대한 리플라이 주시면 감사하겠습니다.

리플 확인 후 Approve로 전환하도록 하겠습니다👍

수고하셨습니다 ☺️

Comment on lines +100 to +101
tableView.backgroundView = UIView()
tableView.backgroundView?.isUserInteractionEnabled = true
Copy link
Member

Choose a reason for hiding this comment

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

이거 바텀시트 뒤에 탭할때 사라지게하는 관련 코드인거같은데

맞다면 디자인시스템에 PPModal(UIViewController+.swift에 위치) 참고해서 적용해보시면 좋을것같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updateContainerHeight로 탭이 바뀔때마다 탭별로 컨테이너 영역의 높이가 동적으로 계산되게끔 작성했던것으로 기억ㅎ는데
PPModal 같은경우에는 modal의 높이를 한번만 주입하기때문에 UI 상단영역이 깨져서 적용했던것으로 기억합니다 😂

Copy link
Member

Choose a reason for hiding this comment

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

아마 PPModal도 값을 주입하지 않으면 동적으로 modal의 높이를 계산하도록 내부적으로 구현되어있을텐데 한번 확인해보시면 좋을거같아요.

@zzangzzangguy 내일까지 어려우시다면 일단 관리자페이지는 사용자 경험과는 크게 문제가 없으니 이대로 넘어가시고 추후 작업으로 이슈 빼두시면 좋을것 같습니다 ☺️

@0Hooni 0Hooni merged commit 32ece49 into develop Oct 19, 2025
3 checks passed
@0Hooni 0Hooni deleted the refactor/#156-AdminPage-refactoring branch October 19, 2025 11:32
0Hooni pushed a commit that referenced this pull request Nov 12, 2025
* refactor/#147: Deletate 분리및 Extension 이동

* refactor/#147: 매직넘버 enum constaranits 분리

* refactor/#156: 관리자페이지에서 디테일뷰로 이동가능 바텀시트뷰 UI 수정

* style/#156: Apply SwiftLint autocorrect

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

3 participants