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

[Design&Network] #233 - MyPageProfileVisibilityView UI 및 API 연결 #235

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

Conversation

ena-isme
Copy link
Member

@ena-isme ena-isme commented Sep 18, 2024

⭐️Issue

close #233

🌟Motivation

비공개 여부를 수정하였습니다~!

🌟Simulation

Simulator Screen Recording - iPhone 15 Pro - 2024-09-28 at 11 11 40


🌟To Reviewer

get 은 되는데 patch 가 안됨
이유를 모르게쑴
우선 UI 까지만 머지할꼐여

++ 브런치 잘못파서 옮겨놓느라,,, 커밋이 뭉텅입니다 ,,,

@ena-isme ena-isme self-assigned this Sep 18, 2024
@ena-isme ena-isme changed the title Feat/#233 [Design&Network] #233 - MyPageProfileVisibilityView UI 및 API 연결 Sep 18, 2024
@ena-isme ena-isme requested review from Guryss, Naknakk and hyowon612 and removed request for Guryss, Naknakk and hyowon612 September 28, 2024 02:12
Copy link
Contributor

@hyowon612 hyowon612 left a comment

Choose a reason for hiding this comment

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

엘지티엠 고생했어요

})
.disposed(by: disposeBag)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

개행 삭제

.disposed(by: disposeBag)

self.isPublic = self.initStatus
print(self.isPublic, "💖")
Copy link
Contributor

Choose a reason for hiding this comment

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

프린트문 삭제

Copy link
Contributor

@Naknakk Naknakk left a comment

Choose a reason for hiding this comment

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

고생했습니다! 코드리뷰 읽어주세용!

@@ -14,7 +14,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }

let navigationController = UINavigationController(rootViewController: WSSTabBarController())
let navigationController = UINavigationController(rootViewController: MyPageSettingViewController())
Copy link
Contributor

Choose a reason for hiding this comment

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

W3
메인 당겨와서 브랜치 최신화 할 때 까먹지말기~~

}

profilePrivateLabel.snp.makeConstraints {
$0.leading.equalToSuperview().inset(30)
Copy link
Contributor

Choose a reason for hiding this comment

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

W1
20인 것 같습니당

Comment on lines +98 to +101
completeButton.snp.makeConstraints {
$0.width.equalTo(48)
$0.height.equalTo(42)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

W1
이 버튼도 터치영역 잡아주기 보다는 없이 가도 좋을 것 같아요.
피그마에 비해 완료 버튼이 안쪽으로 밀려들어가 있는게 보여서요! 아래 체크 동그라미가 완 글자 밑에 있어야 하는데 밀려서 완료 글자 중간에 위치하게 된 것 같습니당.

Comment on lines +63 to +76
input.completeButtonDidTap
.subscribe(with: self, onNext: { owner, _ in
guard owner.initStatus != owner.isPublic else { return }

owner.patchUserProfileVisibility(isProfilePublic: owner.isPublic)
.subscribe(onNext: {
output.popViewControllerAction.accept(true)
//TODO: - toastMessage
}, onError: { error in
print(error)
})
.disposed(by: owner.disposeBag)
})
.disposed(by: disposeBag)
Copy link
Contributor

Choose a reason for hiding this comment

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

W1
subscribe 안에 또 subscribe가 있는게 좋지 않은 것 같습니다. 그럼 해당 이벤트가 일어날 때마다 매번 내부에서는 새로운 구독이 추가되는건데, 메모리 측면에서 좋지 않은 것 같아요. 의도치 않은 동작을 만들 수도 있을 것 같구요.
flatmapLastest를 추가해서 여기서 작동시키는게 좋을 것 같습니다.

Comment on lines +29 to +37
self.getUserProfileVisibility()
.map { $0.isProfilePublic }
.subscribe(with: self, onNext: { owner, isPublic in
owner.initStatus = isPublic
})
.disposed(by: disposeBag)

self.isPublic = self.initStatus
print(self.isPublic, "💖")
Copy link
Contributor

Choose a reason for hiding this comment

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

W1
초기값을 init에서 굳이 실행할 필요가 없는 것 같아요 ! transform 메서드가 VC의 viewDidLoad에서 작동하니, transform 메서드 내에 넣어주면 더 일괄적이고 좋을 것 같습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Design & Network] - MyPageProfileVisibilityView UI 및 API 연결
4 participants