Skip to content

Chore/#143 Design QA(ticket + Reservation)#146

Merged
longlivedrgn merged 13 commits intodevelopfrom
chore/#143-DesignQA(Ticket)
Feb 27, 2024
Merged

Chore/#143 Design QA(ticket + Reservation)#146
longlivedrgn merged 13 commits intodevelopfrom
chore/#143-DesignQA(Ticket)

Conversation

@longlivedrgn
Copy link
Copy Markdown
Collaborator

μž‘μ—…ν•œ λ‚΄μš©

  • ν‹°μΌ“ λ””ν…ŒμΌ UIλ₯Ό μˆ˜μ •ν–ˆμ–΄μš”.(Design QA에 λ‚˜μ™€μžˆλŠ” λ‚΄μš©μ„ μˆ˜μ •ν–ˆμ–΄μš”!)
  • ν™˜λΆˆ ν•˜κΈ° μͺ½ λ‘œμ§μ„ μˆ˜μ •ν–ˆμ–΄μš”.
    • 은행을 μ„ νƒν•˜κ³  λŒμ•„μ˜¨ λ‹€μŒ λ‹€μ‹œ 선택할 λ•Œ μ΄μ „μ˜ 선택 사항을 μœ μ§€ν•  수 있게 κ΅¬ν˜„ν–ˆμ–΄μš”.
    • ν™˜λΆˆ κ³„μ’Œ μœ νš¨μ„± 검증 둜직 λ³€κ²½ 및 ν™˜λΆˆ κ³„μ’Œ 확인 뷰의 UIλ₯Ό μˆ˜μ •ν–ˆμ–΄μš”.

(쀑간에 Develop을 λ¨Έμ§€ν–ˆλŠ”λ°, λ³€κ²½λœ 파일이 ν˜„μž¬ develop 이전 버전과 λΉ„κ΅ν•΄μ„œ 체킹을 ν•˜λŠ” κ±° κ°™μ•„μš”!.. κ·Έλž˜μ„œ λ³€κ²½λœ 파일 보기 쫌 νž˜λ“€ κ±° 같은데.. ν˜Ήμ‹œ λ¬Έμ œκ°€ 있으면 μ•Œλ €μ£Όμ‹œλ©΄ λ°”λ‘œ λ‹¬λ €κ°€κ² μ”λ‹ˆλ‹€!!..)

μŠ€ν¬λ¦°μƒ·

TicketDetail TicketReservation

κ΄€λ ¨ 이슈

@longlivedrgn longlivedrgn self-assigned this Feb 25, 2024
Copy link
Copy Markdown
Collaborator

@wngus4296 wngus4296 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 +75 to +76
let index = BankEntity.all.firstIndex { $0 == selectedBank }
guard let index else { return }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

μš”κΈ°λŠ” μ΄λ ‡κ²Œ μ μ–΄λ³΄λŠ” 건 μ–΄λ–¨κΉŒ?!

Suggested change
let index = BankEntity.all.firstIndex { $0 == selectedBank }
guard let index else { return }
guard let index = BankEntity.all.firstIndex(where: { $0 == selectedBank }) else { return }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

였였 μ›λž˜ ν˜•νƒœμ—μ„œλŠ” 트레일링 클둜져λ₯Ό μ¨μ„œ λ°”λ‘œ μ˜΅μ…”λ„ 바인딩 μ•ˆλ˜λ”λΌκ΅¬! κ·Έλƒ₯ μ•ˆμ“°κ³  μž‘μ„±ν•˜λ©΄ λ˜λŠ”κ΅¬λ‚˜! 고마였 μ£Όν˜„πŸ™‡β€β™‚οΈ

var selectedItemIndex: Int?
var selectedItem: ((BankEntity?) -> ())?

// viewModel둜 μ„€μ •ν•  μ˜ˆμ •
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

이거 todo인건가?!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

움 λ·°λͺ¨λΈμ„ λ§Œλ“€κΉŒ 말까 κ³ λ―Όν•  λ•Œ 써 놓은 건데! λ‚΄κ°€ μ •λ¦¬ν•˜λ €κ΅¬ 써놨어!~ pushν•  λ•ŒλŠ” μ œκ±°ν• κ²‘πŸ˜†

Comment on lines +156 to +160
if let index = owner.selectedItemIndex {
owner.selectedItem?(BankEntity.all[index])
} else {
owner.selectedItem?(nil)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ν˜„μž¬ 은행 선택 λ·°μ—μ„œ cell을 두 번 λˆŒλ €μ„ λ•Œ isSelectedκ°€ ν’€λ¦¬λŠ” 방식이 μ•„λ‹ˆκΈ° λ•Œλ¬Έμ—
μ—¬κΈ° selectedItemIndexκ°€ μ—†λŠ” 경우 nil을 λ‹€μ‹œ 보내주지 μ•Šμ•„λ„ 될 것 κ°™μ•„!

Suggested change
if let index = owner.selectedItemIndex {
owner.selectedItem?(BankEntity.all[index])
} else {
owner.selectedItem?(nil)
}
guard let index = owner.selectedItemIndex else { return }
owner.selectedItem?(BankEntity.all[index])

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

웅응!! μƒκ°ν•΄λ³΄λ‹ˆκΉŒ μ–΄μ°¨ν”Ό ν΄λ‘œμ Έμ— input 값을 μ•ˆ λ„£μ–΄μ£Όλ©΄ μ‹€ν–‰μ•ˆλ˜λ‹ˆκΉŒ ꡳ이 Optional둜 μ²˜λ¦¬ν•˜μ§€ μ•Šμ•„λ„ λ κ±°κ°™μ•„μ„œ μ½”λ“œ λ°”κΏ¨μ˜€!! 땑큐 μ£Όν˜„πŸ˜Š

Comment on lines +117 to +121
private let blankSpaceView: UIView = {
let view = UIView()
return view
}()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

이거 μ·¨μ†Œ/ν™˜λΆˆκ·œμ • - ν™˜λΆˆ μš”μ²­ν•˜κΈ° 사이 blank λ•Œλ¬Έμ— λ„£μ—ˆλ˜ κ±° 같은데 μ§€κΈˆ ν™˜λΆˆ μš”μ²­ν•˜κΈ° λ²„νŠΌ μ•„λž˜μ— λ“€μ–΄κ°€κ³  μžˆλ”λΌκ΅¬..!
214번 쀄 <-> 215번 쀄 μ΄λ ‡κ²Œ 변경해도 되ꡬ

μ•„λ‹ˆλ©΄ blankViewλ₯Ό μ‚­μ œν•˜κ³  μ•„λž˜ μ½”λ“œλ₯Ό λ„£μ–΄μ€˜λ„ 될 κ±° κ°™μ•„!

self.contentStackView.setCustomSpacing(40, after: self.reversalPolicyView)

그리고 μΆ”κ°€λ‘œ 33λ²ˆμ€„μ— ν˜„μž¬ μ΄λ ‡κ²Œ λ„£μ–΄μ ΈμžˆλŠ”λ°

    private lazy var contentStackView: UIStackView = {
        let stackView = UIStackView()
        stackView.axis = .vertical
        stackView.distribution = .fill
        stackView.alignment = .center
        stackView.spacing = 12
        
        stackView.setCustomSpacing(0, after: self.concertInformationView) // μ—¬κΈ° μ œλŒ€λ‘œ μž‘λ™ μ•ˆλ¨!

        return stackView
    }()

아직 addArrangedSubViewsκ°€ λ˜μ§€ μ•Šμ€ 상황이라 주석 달아놓은 뢀뢄이 μž‘λ™μ΄ μ•ˆλ˜λŠ” 였λ₯˜κ°€ μžˆμ–΄μ„œ

  1. lazy var -> let으둜 λ³€κ²½ν•΄μ£Όκ³ 
  2. addArrangedSubViewsν•¨μˆ˜μ— μ•„λž˜ μ½”λ“œ λ„£μ–΄μ£ΌκΈ°
    둜 μˆ˜μ •ν•˜λ©΄ 잘 μž‘λ™ν•˜λŠ” κ±° κ°™μ•„~!!
        self.contentStackView.setCustomSpacing(0, after: self.concertInformationView)
        self.contentStackView.setCustomSpacing(40, after: self.reversalPolicyView)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

μ£Όν˜„! setCumstomSpacing은 맨 λ§ˆμ§€λ§‰ viewμ—λŒ€ν•΄μ„œλŠ” spacing을 λͺ» λ„£μ–΄μ£ΌλŠ” κ±° 같더라ꡬ?! κ·Έλž˜μ„œ μΌλΆ€λ‘œ blankViewλ₯Ό κ΅¬ν˜„ν–ˆμ˜€! (곡연 예맀 마감 일에 λ”°λΌμ„œ button이 hiddenμ²˜λ¦¬κ°€ 될 λ•Œκ°€ μžˆμ–΄μ„œ)
ν˜Ήμ‹œ 더 쒋은 방법이 μžˆμ„κΉŒ?!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

μ•„ λ²„νŠΌ hidden 처리 λ•Œλ¬Έμ΄μ—ˆκ΅¬λ‚˜!!
configureRefundButton ν•¨μˆ˜ μ•ˆμ—μ„œ ν™˜λΆˆν•˜κΈ° λ²„νŠΌ μˆ¨κΉ€ μ²˜λ¦¬μ— 따라 stackview에 inset을 μ£ΌλŠ” 방법이 μžˆμ„ 것 κ°™κΈ΄ν•œλ° ..
뭐가 더 쒋은 λ°©λ²•μΌμ§€λŠ” κ³ λ―Όμ΄λ˜λ„€ ..!

μš©μž¬κ°€ 보고 더 νŽΈν•œ μͺ½μœΌλ‘œ κ°€λŠ” 게 쒋을 λ“―!!

private func configureRefundButton(with entity: TicketReservationDetailEntity) {
    switch entity.reservationStatus {
    case .reservationCompleted:
        if Date() <= entity.salesEndTime.formatToDate() {
            self.requestRefundButton.isHidden = false
        } else {
            self.requestRefundButton.isHidden = true
        }
    default:
        self.requestRefundButton.isHidden = true
    }
    
    // μ—¬κΈ°!! addArrangedSubViewsν•¨μˆ˜ μ•ˆμ—μ„œν•˜λ©΄ hidden 값을 λͺ»κ°€μ Έμ˜€λŠ” μ΄μŠˆκ°€ 있음 ..!!
    if self.requestRefundButton.isHidden {
        self.contentStackView.isLayoutMarginsRelativeArrangement = true
        self.contentStackView.directionalLayoutMargins = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: 40, trailing: 0)
    } else {
        self.contentStackView.setCustomSpacing(40, after: self.reversalPolicyView)
    }
}

μ•„ 그리ꡬ concertInformationView μ—μ„œ spacing λΊ€ 높이λ₯Ό height으둜 지정해쀬더라ꡬ!
κ·Έλž˜μ„œ μ•„λž˜ μ½”λ“œλŠ” 빼도 될 λ“―!!

self.contentStackView.setCustomSpacing(0, after: self.concertInformationView)

@longlivedrgn longlivedrgn merged commit 1b25c6f into develop Feb 27, 2024
@longlivedrgn longlivedrgn deleted the chore/#143-DesignQA(Ticket) branch February 27, 2024 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] λ””μžμΈ QA 반영(TicketDetail-TicketList)

2 participants