Skip to content

Conversation

@zzangzzangguy
Copy link
Contributor

@zzangzzangguy zzangzzangguy commented Apr 13, 2025

📌 이슈

#102

✅ 작업 사항

  • 뷰 레이아웃 분리: PopUpRegisterView 파일로 UI 구성 로직 이동
  • 날짜·시간 선택 로직 분리: DateTimePickerManager 생성 및 적용
  • 이미지 관리 컴포넌트화: PopUpImagesCollectionView로 이미지 피커·컬렉션뷰 로직 이동
  • ReactorKit 적용: PopUpStoreRegisterReactor로 Action/Mutation/State 분리, 네트워크·유효성·에러 처리 담당
  • 유틸·Extension 정리: UITextField 패딩, UIView.findFirstResponder() 등 extension으로 분리
  • 코드 스타일 통일: disposeBag 네이밍, self. 표기, 프로토콜 extension 위치, 메서드 순서 정리

🚀 테스트 방식

  1. 뷰 렌더링
    • PopUpStoreRegister 화면 진입 시, 기존과 동일하게 UI 요소(네비게이션, 폼, 버튼 등) 정상 표시 확인
  2. 입력 검증
    • 필수 필드(이름, 카테고리, 주소, 위도/경도, 설명, 이미지, 대표 이미지, 기간/시간) 비어 있을 때 저장 버튼 비활성화 확인
    • 모든 필드 입력 시 저장 버튼 활성화 확인
  3. 날짜·시간 선택
    • 기간 선택 버튼 클릭 → DateTimePickerManager 동작 확인 → 시작/종료일 정상 반영
    • 시간 선택 버튼 클릭 → DateTimePickerManager 동작 확인 → 시작/종료시간 정상 반영 (15분 단위) 수정됨!
  4. 이미지 추가/삭제
    • 이미지 추가 버튼 → PHPicker 정상 동작 → 썸네일 컬렉션뷰에 반영
    • 대표 이미지 토글, 개별 삭제, 전체 삭제 기능 정상 동작
  5. ReactorKit 바인딩
    • 입력값 변경 시 Reactor state 변경 확인 (로그 또는 디버깅)
    • 저장 액션 호출 시 API 요청 정상 수행(목 서버 또는 스텁)
  6. 에러/성공 알림
    • API 실패 시 에러 얼럿 표시
    • 등록/수정 성공 시 성공 얼럿 표시 및 이전 화면 복귀

👀 ETC

  • iOS 16 이상 UICalendarView 기반 인라인 캘린더 도입 검토
    simulator_screenshot_12B46F85-A35D-4D1A-BF3C-96FC5B470AAE

@zzangzzangguy zzangzzangguy added the 🔄 refactor 프로덕션 코드 리팩토링, 파일 삭제, 네이밍 수정 및 폴더링 label Apr 13, 2025
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.

LGTM👍🏻

분리하시느라 수고 많으셨습니다!

Copy link
Member

Choose a reason for hiding this comment

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

분리를 했는데도 많이 아직도 많네요 🥲

이번에 리팩토링때 클린아키텍처 구조로 더 분리를 해보죠 👍🏻

Copy link
Member

Choose a reason for hiding this comment

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

스타일 맞추는거 너무 좋습니다👍🏻

다만 View에서 then을 안쓴곳도 보이는데, then을 사용하는쪽으로 통일하시면 좋겠습니다!

Copy link
Member

@dongglehada dongglehada left a comment

Choose a reason for hiding this comment

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

작업량이 많으셨을 것 같은데 수고 하셨습니다!! tf, lb 같은 줄여쓴 변수명이 있는데 해당 부분의 확인이 필요할 것 같습니다!


final class PopUpImagesCollectionView: UICollectionView {
// MARK: - Properties
enum Constant {
Copy link
Member

Choose a reason for hiding this comment

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

저희가 맞추기로 하였던 상수값을 빼는 부분을 적용해 주셨군요 좋습니다 :>


var onImageSelected: ((Int) -> Void)?
var onMainImageToggled: ((Int) -> Void)?
var onImageDeleted: ((Int) -> Void)?
Copy link
Member

Choose a reason for hiding this comment

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

Rx가 아니라 클로저로 스트림을 연결한 이유가 따로 있을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

단순이벤트라 판단되어 연산자체인에 오버헤드인지 .. 빌드에서 무한빌드가 되는케이스가 있었습니다
우선적으로 빌드확인을위해 빼뒀었지만 더나은 방법이 있다면 고려해보고 수정해도 좋을것 같습니다
매서운 리뷰 ..

@@ -1,110 +1,898 @@
import UIKit

import CoreLocation
Copy link
Member

Choose a reason for hiding this comment

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

CoreLoacation은 퍼스트 파티인 것으로 알고 있는데 띄워쓰기를 하지 않아도 괜찮지 않을까요? @0Hooni @zzangzzangguy 의견도 궁금합니다!

Copy link
Member

Choose a reason for hiding this comment

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

스트림이 길어지는 부분이 있어서 제가 내용을 정확히 확인하는 것에는 조금 난이도가 있습니다 ㅎㅎ. ㅠ 해당 작업 내용은 다시 한 번 확인해 보겠습니다!!


// 유틸리티 메서드
func makeRoundedTextField(_ placeholder: String) -> UITextField {
let tf = UITextField()
Copy link
Member

Choose a reason for hiding this comment

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

tf 로 줄여쓰기!! 이런 부분들 수정이 필요할 것 같습니다 !!

@dongglehada dongglehada linked an issue Apr 13, 2025 that may be closed by this pull request
@0Hooni 0Hooni marked this pull request as draft April 13, 2025 12:43
@0Hooni 0Hooni marked this pull request as ready for review April 13, 2025 13:37
@0Hooni 0Hooni requested a review from dongglehada April 13, 2025 13:37
@zzangzzangguy zzangzzangguy merged commit d94afa1 into develop Apr 13, 2025
@0Hooni 0Hooni deleted the refactor/#102-popup-register-viewcontroller-split branch April 15, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔄 refactor 프로덕션 코드 리팩토링, 파일 삭제, 네이밍 수정 및 폴더링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PopUpRegisterViewController 분리

4 participants