Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat/NST-13] 회의확정 확인뷰 #37

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

oyslucy
Copy link
Collaborator

@oyslucy oyslucy commented Feb 11, 2025

🔥 Issue

close #30


🔥 변경된 내용

  • 텍스트필드 등의 컴포넌트들 Global-Components 파일 안쪽으로 옮겼습니다

🔥 PR Point

  • ScheduleInfoView(CollectionView)를 약속 확정뷰, 약속 확정확인뷰 등에 쓰이므로 컴포넌트화 시켰습니다. 근데 약속확정뷰에는 컬뷰인 ScheduleInfoView를 셀로 가지는 컬뷰를 만들어야해서... 데이터 바인드 관련 로직 분리하기가 애매했는데,,,,이부분 피드백 부탁드려요
  • ScheduleConfirmedViewController에서
    • setUpCollectionView()는 delegate 설정 및 셀 좌측 정렬하는 함수입니다
    • bindCollectionViewHeight()는 셀 줄바꿈에 따른 collectionview 높이 조정하는 함수입니다

🔥 ScreenShot


@oyslucy oyslucy added the Feat 새로운 기능 구현 label Feb 11, 2025
@oyslucy oyslucy self-assigned this Feb 11, 2025
Copy link
Collaborator

@FpRaArNkK FpRaArNkK left a comment

Choose a reason for hiding this comment

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

야무집니다 멘션한 내용 한번만 확인 부탁드려요!

Comment on lines +11 to +16
final class MemberAvailabilityCellReactor: Reactor {
typealias Action = NoAction
struct State {
let user: User
let status: MemberStatus
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

오! Reactor를 분리해서 관리하시나요! 좋습니다 👍👍👍
혹시 이렇게 진행하게된 이유를 여쭤봐도 될까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cell의 reactor를 가질 경우 별도의 바인딩 구현 없이 vc에서 바로 reactor를 주입할 수 있습니다 !

Comment on lines 184 to 187
availableLabel.snp.remakeConstraints {
$0.top.equalTo(scheduleDurationLabel.snp.bottom).offset(16)
$0.leading.equalTo(scheduleDurationLabel)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

remakeConstraint는 기존 제약을 모두 삭제하고 다시 만드는 메서드라서,
의도하신 방향과 부합한지 다시 한번 체크부탁드려요!
참고용으로, 필요한 제약사항만 업데이트 하는경우 updateConstraints도 있습니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오오 update가 나을거같네요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

그냥 setUpLayout에서 삼항연산자 썼습니다 ㅋㅋ

.bind(to: rootView.scheduleInfoView.unavailableCollectionView.rx.items(dataSource: unavailableDataSource))
.disposed(by: disposeBag)

reactor.state.map { $0.schedule }
Copy link
Collaborator

Choose a reason for hiding this comment

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

map해서 뽑아쓰는 습관 매우 굳 👍

@oyslucy oyslucy changed the base branch from main to feat/NST-15/groupMember February 11, 2025 12:56
@oyslucy oyslucy changed the base branch from feat/NST-15/groupMember to main February 11, 2025 12:57
Comment on lines 177 to 195
scheduleDurationLabel.isHidden = false
likeButton.isHidden = false
scheduleTimeTitleLabel.isHidden = true
scheduleTimeLabel.isHidden = true
scheduleCategoryLabel.isHidden = true
scheduleCategoryChip.isHidden = true

availableLabel.snp.remakeConstraints {
$0.top.equalTo(scheduleDurationLabel.snp.bottom).offset(16)
$0.leading.equalTo(scheduleDurationLabel)
}

case .confirmed:
scheduleDurationLabel.isHidden = true
likeButton.isHidden = true
scheduleTimeTitleLabel.isHidden = false
scheduleTimeLabel.isHidden = false
scheduleCategoryLabel.isHidden = false
scheduleCategoryChip.isHidden = false
Copy link
Contributor

Choose a reason for hiding this comment

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

여기 상태관리는 함수 하나로 통일해서 좋을 것 같아요
파라미터로 Bool값 받아서, 재사용 하면 보기 좋을 듯 !!

Comment on lines +81 to +82
case .MMddHHmm:
return "MM/dd HH:mm"
Copy link
Contributor

Choose a reason for hiding this comment

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

잘 쓰는 구만

import RxCocoa
import RxDataSources

final class ScheduleConfirmedViewController: UIViewController, View, UIScrollViewDelegate {
Copy link
Contributor

Choose a reason for hiding this comment

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

UIScrollViewDelegate 이건 어디에 쓰나요?

쓰는곳이 있다면 extension으로 빼서 사용하면 가독성에 좋을 것 같아요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이건 빼고 올릴게요

make.height.equalTo(0)
}

rootView.scheduleInfoView.availableCollectionView.rx.observe(CGSize.self, "contentSize")
Copy link
Contributor

Choose a reason for hiding this comment

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

observe 는 어떨때 쓰여요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

셀의 크기가 변할 때마다 호출됩니다 !!
셀의 길이가 컬뷰의 길이보다 클 때, 컬뷰의 height를 재조정해주어야해서 작성되었습니다

Copy link
Contributor

@thingineeer thingineeer left a comment

Choose a reason for hiding this comment

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

굿 고생하셨습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat/NST-13] 그룹상세화면 구현
3 participants