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] #170 - Design 수정사항 반영 #172

Merged
merged 7 commits into from
Aug 13, 2024
Merged

Conversation

shimseohyun
Copy link
Contributor

@shimseohyun shimseohyun commented Aug 13, 2024

🔥 Pull requests

👷 작업한 내용

  • loading view 작업
  • hankki list 디자인 잘못된 부분 수정
  • 모달 디자인 (아주 약간 변경)

🚨 참고 사항

로딩뷰가 추가되었습니다.
네트워크 통신 시작~응답 받기까지 진행됩니다.

  • MoyaPlugin.swift
func willSend(_ request: RequestType, target: TargetType) {

        guard let httpRequest = request.request else {
            print("--> ❌🍚❌유효하지 않은 요청❌🍚❌")
            return
        }
        // 로딩뷰를 보여주는 부분
        DispatchQueue.main.async {
            UIApplication.showLoadingView()
        }
        
(생략)

func didReceive(_ result: Result<Response, MoyaError>, target: TargetType) {
        // 로딩뷰를 닫는 부분
        DispatchQueue.main.async {
            UIApplication.dismissLoadingView()
        }
  • BaseViewController.swift
    로딩뷰 관련 함수와, UIComponents가 추가되었습니다.
    Base View Controller에 기본적인 로딩뷰가 내제되어있고 on off 되는 방식으로 진행됩니다.
private extension BaseViewController {
    func setupLoadingView() {
        loadingView.do {
            $0.isHidden = true
        }
        
        spinner.do {
            $0.animation = LottieAnimation.named("loading")
            $0.contentMode = .scaleAspectFill
            $0.loopMode = .loop
            $0.stop()
        }
        
        view.addSubview(loadingView)
        loadingView.addSubview(spinner)
        
        loadingView.snp.makeConstraints {
            $0.edges.equalTo(view.safeAreaLayoutGuide)
        }
        
        spinner.snp.makeConstraints {
            $0.size.equalTo(68)
            $0.center.equalToSuperview()
        }
    }
}

extension BaseViewController {
    func showLoadingView() {
        loadingView.do {
            $0.isHidden = false
        }
        
        spinner.do {
            $0.play()
        }
    }
    
    func dismissLoadingView() {
        loadingView.do {
            $0.isHidden = true
        }
        
        spinner.do {
            $0.stop()
        }
    }
}

✅ Check List

  • Merge 대상 브랜치가 올바른가?
  • 최종 코드가 에러 없이 잘 동작하는가?
  • 전체 변경사항이 500줄을 넘지 않는가?

📟 관련 이슈

@shimseohyun shimseohyun added 🍚 Feat 새로운 기능 구현 🎨 Design UI 디자인을 구현하거나 변경 🤹🏻‍♀️ 서현 서현 공주 작업 labels Aug 13, 2024
@shimseohyun shimseohyun self-assigned this Aug 13, 2024
@shimseohyun shimseohyun requested review from EunsuSeo01 and mcrkgus and removed request for EunsuSeo01 August 13, 2024 18:11
Copy link
Member

@mcrkgus mcrkgus left a comment

Choose a reason for hiding this comment

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

Lottie 소녀 고마워요
수고했소

Comment on lines +122 to +126
if UIScreen.getDeviceWidth() > 331 {
$0.width.equalTo(331)
} else {
$0.horizontalEdges.equalToSuperview().inset(22)
}
Copy link
Member

Choose a reason for hiding this comment

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

p3
분기처리 LGTM

$0.center.equalToSuperview()
}


// TODO: - 버튼 패딩 값으로 바꾸기
Copy link
Member

Choose a reason for hiding this comment

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

p3
친절하오

Comment on lines +14 to +21
var style: MainButton.Style {
switch self {
case .secondary:
MainButton.Style(ableBackgroundColor: .white, disableBackgroundColor: .white, textColor: .hankkiRed)
default:
MainButton.Style(ableBackgroundColor: .hankkiRed, disableBackgroundColor: .hankkiSemiRed, textColor: .white)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

p3
오.. 여기서 바로 해도 좋군요... HomeView filtering Button도 이렇게 해봐야겠소

Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@@ -8,6 +8,7 @@
import Foundation

struct GetMeResponseData: Codable {
// TODO: - 서현) Server 업데이트 되면 Image 부분 지우기 디코딩 에러난다!!!!!
Copy link
Member

Choose a reason for hiding this comment

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

p3
CUTE

Copy link
Member

@EunsuSeo01 EunsuSeo01 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 +14 to +21
var style: MainButton.Style {
switch self {
case .secondary:
MainButton.Style(ableBackgroundColor: .white, disableBackgroundColor: .white, textColor: .hankkiRed)
default:
MainButton.Style(ableBackgroundColor: .hankkiRed, disableBackgroundColor: .hankkiSemiRed, textColor: .white)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

Comment on lines +75 to +91
static func showLoadingView() {
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let delegate = windowScene.delegate as? SceneDelegate,
let rootViewController = delegate.window?.rootViewController as? UINavigationController,
let currentViewController = rootViewController.topViewController as? BaseViewController {
currentViewController.showLoadingView()
}
}

static func dismissLoadingView() {
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let delegate = windowScene.delegate as? SceneDelegate,
let rootViewController = delegate.window?.rootViewController as? UINavigationController,
let currentViewController = rootViewController.topViewController as? BaseViewController {
currentViewController.dismissLoadingView()
}
}
Copy link
Member

Choose a reason for hiding this comment

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

아주 좋소

Comment on lines 20 to 27
print("--> ❌🍚❌유효하지 않은 요청❌🍚❌")
return
}
DispatchQueue.main.async {
UIApplication.showLoadingView()
}

let url = httpRequest.description
Copy link
Member

Choose a reason for hiding this comment

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

천재 발생

Comment on lines +63 to +64
private extension BaseViewController {
func setupLoadingView() {
Copy link
Member

Choose a reason for hiding this comment

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

최고

@@ -11,7 +11,7 @@ final class HankkiReportOptionFooterView: BaseCollectionReusableView {

// MARK: - UI Components

let hankkiReportButton: MainButton = MainButton(titleText: StringLiterals.Common.report)
let hankkiReportButton: MainButton = MainButton(titleText: StringLiterals.Common.report, isDisable: true)
Copy link
Member

Choose a reason for hiding this comment

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

고맙소

@shimseohyun shimseohyun merged commit a9a048e into develop Aug 13, 2024
@shimseohyun shimseohyun deleted the design/#170 branch August 13, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Design UI 디자인을 구현하거나 변경 🍚 Feat 새로운 기능 구현 🤹🏻‍♀️ 서현 서현 공주 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Design] Design 수정사항 반영
3 participants