Skip to content

Comments

Style/#360 공통퀘스트 UI 구현#368

Merged
dev-domo merged 20 commits intodevelopfrom
style/#360-commonQuestUI
Feb 23, 2026
Merged

Style/#360 공통퀘스트 UI 구현#368
dev-domo merged 20 commits intodevelopfrom
style/#360-commonQuestUI

Conversation

@dev-domo
Copy link
Collaborator

@dev-domo dev-domo commented Feb 22, 2026

🔗 연결된 이슈

📄 작업 내용

  • 공통퀘스트 뷰는 하나의 테이블뷰로 이루어져있습니다.
  • 날짜 선택하는 뷰를 중단이라고 하고 그 위를 상단, 아래는 하단이라고 불러볼게요.
  • 상단(CommonQuestHeaderView)은 테이블뷰의 tableHeaderView 속성으로 설정했습니다. tableHeaderView 특성상 스크롤이 가능합니다
  • 중단(DateNavigator)는 테이블뷰의 섹션 헤더로 설정했습니다. 이때 섹션 개수는 1개로 하여 화면 맨 아래까지 계속 스크롤해도 DateNavigator가 항상 상단에 고정되도록 만들었습니다.
  • 하단에는 CommonQuestContentCell(질문 내용부터 답변 작성하기 버튼까지)과 그 아래에 답변 유무에 따라 NoAnswerCell / CommonQuestAnswersCell이 배치됩니다.
구현 내용 IPhone 16 pro IPhone 13 mini
답변이 없는 경우
답변이 있는 경우
스크롤

@dev-domo dev-domo self-assigned this Feb 22, 2026
@dev-domo dev-domo linked an issue Feb 22, 2026 that may be closed by this pull request
1 task
Copy link
Collaborator

@juri123123 juri123123 left a comment

Choose a reason for hiding this comment

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

복잡한 뷰였을텐데 고생하셨습니다!
전체적으로 font를 FontManager 통해서 설정해주고 있는데 applyByeBooFont 이용해주면 좋을 것 같아요~
테이블뷰를 야무지게 활용한게 인상적입니다!

Comment on lines +10 to +23
struct CommonQuestAnswersEntity {
let question: String
let answerCount: Int
let isAnswered: Bool
let answers: [CommonQuestAnswerEntity]
}

struct CommonQuestAnswerEntity {
let answerID: Int
let writer: String
let profileIcon: String
let writtenAt: Date
let content: String
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

뭐가 다른건지 한참 봣네요 ㅋㅋㅋㅋ

Comment on lines +19 to +20
private let yesterday: Int = -1
private let tommorw: Int = 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

오호 그냥 +1 -1이 아니라 상수로 선언해준거 좋네용 !

Comment on lines +148 to +150
private var isToday: Bool {
calendar.isDateInToday(currentDate)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

이 변수는 왜 아래에 위치하는 건가용?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

extension에서 구현해준 moveYesterday/moveTommorw에서 updateNextButton 메서드를 사용하고, updateNextButton 메서드에서 isToday 계산속성을 사용해서 같은 extension에 위치시켰어요!

Copy link
Collaborator

@y-eonee y-eonee 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 +40 to +43
writer: "장원영",
profileIcon: "SO_SO",
writtenAt: Date.now,
content: "헤어진 지 벌써 일주일이 지났습니다. 처음에는 실감이 안 나서 눈물조차 나오지 않았어요. 그저 멍하니 천장만 바라보며 시간을 보냈습니다. 그런데 오늘 아침, 습관적으로 휴대폰을 확인하다가 더 이상 '굿모닝' 인사를 보낼 사람이 없다는 사실을 깨닫고 그제야 무너져 내렸습니다. 밥알이 모래알 같아서 잘 넘어가지도 않네요. 친구들은 시간이 약이라고, 더 좋은 사람 만날 거라고 위로하지만 지금 당장은 그 어떤 말도 귀에 들어오지 않습니다."
Copy link
Collaborator

Choose a reason for hiding this comment

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

원영씨 이별해서어뜩해..

Comment on lines +103 to +110
if let profileIcon {
userIconView.image = profileIcon
} else {
userIconView.do {
$0.backgroundColor = .grayscale600
$0.layer.cornerRadius = 10
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

근데 프로필아이콘은 모든 사람들이 다 가지고 있지 않나여? 기본 배경값 설정을 해주신 이유가 궁금합니다!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

호옥시나 서버에서 프로필 이미지 타이틀을 잘못 넘겨줬을 때를 디버깅하기 위한 코드입니당

$0.textColor = .grayscale50
$0.font = FontManager.sub3M18.font
$0.numberOfLines = 0
$0.lineBreakStrategy = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

우와 linebrakemode랑은 또 다른 친구군요
차이점 찾아봤는데 lineBreakStrategy가 한글 지원하는 거 빼고 조금 헷갈리네요

}

override func setDelegate() {
rootView.commonQuestTableView.do {
Copy link
Collaborator

Choose a reason for hiding this comment

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

우와 여기 되게 고능해요

Comment on lines +37 to +55
private enum ProfileIcon: String, CaseIterable {
case sad = "SAD"
case selfUnderstanding = "SELF_UNDERSTANDING"
case soso = "SO_SO"
case relieved = "RELIEVED"

var image: UIImage {
switch self {
case .sad:
return .sadnessBadge
case .selfUnderstanding:
return .selfUnderstandingBadge
case .soso:
return .sosoBadge
case .relieved:
return .relievedBadge
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

ByeBooEmotion enum 만들어둔게 있는데 그 이넘에 image를 추가하는 방식은 어떨까요?? jw

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

적용해보려고 했는데 enum 안에 케이스가 하나 달라서 어려울 것 같아요 ㅠㅠ

Comment on lines 32 to 39
historyButton.do {
$0.setTitle("나의 답변 모아보기", for: .normal)
$0.setTitleColor(.primary200, for: .normal)
$0.titleLabel?.font = FontManager.cap1M12.font
$0.layer.cornerRadius = 12
$0.layer.borderColor = UIColor.grayscale800.cgColor
$0.backgroundColor = UIColor.white.withAlphaComponent(0.05)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 컴포넌트가 있어요! !!!! .. TipTag 라는 이름으로 써있어가지고 ㅠㅠ 컴포넌트로 바꿀 수 있다면 교체하면 좋을 것 같습니당

@dev-domo dev-domo merged commit 65af669 into develop Feb 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Style] 공통 퀘스트 UI

3 participants