Repository navigation
feat, refactor: addChild 방식 드롭다운 구현 - #647
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Configuration and content contract Koin/Core/View/UIKit/KoinDropdown/KoinDropdownConfiguration.swift, KoinDropdownContentView.swift, KoinDropdownAnimator.swift |
Configuration supports downward or automatic placement with direction-specific spacing and shadow padding. The content protocol exposes a dismiss publisher and height. The animator uses a hidden offset for presentation and dismissal. |
Controller lifecycle and layout Koin/Core/View/UIKit/KoinDropdown/KoinDropdownViewController*, KoinDropdownViewController+*, KoinDropdown.swift, KoinDropdownHost.swift |
The new controller manages presentation, dismissal, directional layout, and scroll preparation and restoration. The former dropdown view and host are removed. |
Presentation API and project wiring Koin/Core/Extensions/UIKit/UIViewController+Dropdown.swift, koin.xcodeproj/project.pbxproj |
UIKit helpers present a dropdown from a view controller or find a controller through a view’s responder chain. The project registers the new dropdown implementation files. |
Application call-site migration Koin/Presentation/CallVan/CallVanPost/CallVanPostViewController.swift, Koin/Presentation/LostItem/*, Koin/Presentation/Recruit/* |
Call-van, lost-item, and recruitment screens use direct dropdown presentation. Host setup and presentation checks are removed or replaced with controller state checks. |
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant DateButton
participant UIView
participant UIViewController
participant KoinDropdownViewController
participant KoinDropdownContentView
DateButton->>UIView: call presentDropdown with anchor and content
UIView->>UIViewController: find controller through responder chain
UIViewController->>KoinDropdownViewController: attach child and present
KoinDropdownViewController->>KoinDropdownContentView: add content and subscribe to dismiss publisher
Possibly related issues
- Issue 646: The PR replaces host-managed dropdown presentation with a controller-based implementation and adds directional layout and scroll handling described in the issue.
- Issue 644: The PR delegates view-based presentation to a view controller, but the supplied summaries do not show a bottom-sheet-specific integration change.
Merge Risk: 
Minimal · previous review fc227
-
No actionable issue was established that should block merging after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 24.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 25 functions across 17 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
- topPadding 제거, Direction을 .down(spacing:) / .auto(downSpacing:upSpacing:)로 변경 - 위로 열 때 간격을 따로 지정할 수 있도록 방향별 spacing 적용 - 호출부 12곳을 .down(spacing:)으로 변경 (값은 기존과 동일)
fc22767 to
6bf8a36
Compare
#️⃣연관된 이슈
📝작업 내용
기존 드롭다운(
KoinDropdown+KoinDropdownHost)의scrollView 안에 overlay와 드롭다운 View를 추가하는 방식은 다음과 같은 문제를 갖습니다.isPresenting가드가 필요했음KoinDropdownHost를 프로퍼티로 들고 셀·서브뷰까지 전달해야 했음(prepareDropdown(host:))addChild 방식 드롭다운으로 리팩토링하며 이를 개선합니다.
구조
KoinDropdownViewController: 부모 VC의 view 전체를 덮는 child VC+Present(표시·해제),+Scroll(스크롤·inset 조정),+Layout(배치·그림자)으로 파일 분리UIViewController+DropdownpresentDropdown(anchor:content:configuration:),isPresentingDropdownUIView.presentDropdown(...): responder chain으로 가장 가까운 VC를 찾아 띄움(셀·서브뷰에서 바로 호출 가능)KoinDropdownContentView: 콘텐츠 프로토콜(별도 파일로 분리)KoinDropdownConfiguration:direction,shadowtopPadding은direction의 연관값spacing(anchor와 드롭다운 사이 간격)으로 대체동작
direction옵션.down(spacing:): 항상 아래로 열림(기존 동작).auto는 시간표 롭다운용입니다. 현재사용하는 화면은 없습니다.스크린샷 (선택)
💬리뷰 요구사항(선택)
바텀시트 안에서 쓸 때, 시트 콘텐츠에서
UIView.presentDropdowclipsToBounds)에 갇혀잘립니다. 콘텐츠는 이벤트만 방출하고, 시트를 띄운 VC가presentDropdown`을 호출해야합니다.Summary by CodeRabbit