Skip to content

Commit 4176a75

Browse files
authored
개발 목표 시트의 연결 Todo 동작과 상단 여백을 보완한다 (#915)
* refactor: 커스텀 탑바 버튼 크기와 공통 스타일 통합 * ui: 탑바 버튼 아이콘 글꼴을 title2로 조정 * ui: iOS 버전별 커스텀 탑바 버튼 구성 * fix: 개발 목표 상세 내부 내비게이션 구성 * refactor: 가독성 개선 * ui: 상단 패딩 추가 * ui: 기록 상세 탑바 수직 여백 추가 * ui: 탑바 버튼 Liquid Glass 상호작용 적용 * ui: iOS 버전별 탑바 버튼 정책 적용 * ui: 버전 이력 탑바 수직 여백 추가 * ui: 로그인 버튼 텍스트 색상 조정 * ui: 로그인 버튼 테두리 두께 조정 * ui: Todo 편집 제출 버튼 강조 적용 * ui: 확인 탑바 닫기 버튼 강조 제거 * ui: iOS 26일 때 시스템 버튼 색 통일 * fix: 고정 탑바 배경 위치 조정 * fix: Todo 제출 버튼 비활성 상태 표시
1 parent dffcd0e commit 4176a75

16 files changed

Lines changed: 316 additions & 174 deletions

File tree

‎Application/Presentation/Development/Sources/Goal/Create/GoalCreateView.swift‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ public struct GoalCreateView: View {
1313
@Environment(\.dismiss) private var dismiss
1414
@State private var store: StoreOf<GoalCreateFeature>
1515
@FocusState private var focusedField: GoalCreateField?
16-
@ScaledMetric(relativeTo: .title) private var iconSize = UIFont.preferredFont(
17-
forTextStyle: .title2,
18-
compatibleWith: UITraitCollection(preferredContentSizeCategory: .large)
19-
).lineHeight
2016
private let onCompletion: (DevelopmentGoal) -> Void
2117

2218
public init(onCompletion: @escaping (DevelopmentGoal) -> Void = { _ in }) {
@@ -42,7 +38,6 @@ public struct GoalCreateView: View {
4238
}
4339
.safeAreaInset(edge: .top, spacing: 0) {
4440
GoalCreateTopBar(
45-
iconSize: iconSize,
4641
isSaving: store.isSaving,
4742
onClose: dismiss.callAsFunction
4843
)
@@ -76,7 +71,6 @@ public struct GoalCreateView: View {
7671
}
7772

7873
private struct GoalCreateTopBar: View {
79-
let iconSize: CGFloat
8074
let isSaving: Bool
8175
let onClose: () -> Void
8276

@@ -89,13 +83,11 @@ private struct GoalCreateTopBar: View {
8983
Button(action: onClose) {
9084
if #available(iOS 26.0, *) {
9185
Image(systemName: "xmark")
92-
.frame(width: iconSize, height: iconSize)
93-
.font(.title)
9486
} else {
9587
Text(RecordPresentation.text("common_close"))
9688
}
9789
}
98-
.topBarButtonStyle()
90+
.topBarButtonStyle(tint: Color.accent)
9991
.disabled(isSaving)
10092

10193
Spacer()

‎Application/Presentation/Development/Sources/Goal/TodoSelection/GoalCreateTodoSelectionSheet.swift‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ import PresentationShared
1010

1111
struct GoalCreateTodoSelectionSheet: View {
1212
@Bindable var store: StoreOf<GoalCreateTodoSelectionFeature>
13-
@ScaledMetric(relativeTo: .title) private var iconSize = UIFont.preferredFont(
14-
forTextStyle: .title2,
15-
compatibleWith: UITraitCollection(preferredContentSizeCategory: .large)
16-
).lineHeight
1713

1814
var body: some View {
1915
ScrollView {
@@ -94,28 +90,23 @@ struct GoalCreateTodoSelectionSheet: View {
9490
} label: {
9591
if #available(iOS 26.0, *) {
9692
Image(systemName: "xmark")
97-
.frame(width: iconSize, height: iconSize)
98-
.font(.title)
9993
} else {
10094
Text(RecordPresentation.text("common_close"))
10195
}
10296
}
103-
.topBarButtonStyle(color: Color.surface)
97+
.topBarButtonStyle()
10498
Spacer()
10599
Button {
106100
store.send(.view(.save))
107101
} label: {
108102
if #available(iOS 26.0, *) {
109103
Image(systemName: "checkmark")
110-
.frame(width: iconSize, height: iconSize)
111-
.foregroundStyle(Color.primary)
112-
.font(.title)
113104
} else {
114105
Text(RecordPresentation.text("development_goal_todo_done"))
115106
.foregroundStyle(Color.accent)
116107
}
117108
}
118-
.topBarButtonStyle(color: Color.surface)
109+
.topBarButtonStyle()
119110
}
120111
}
121112
.padding(.horizontal, 16)

‎Application/Presentation/Development/Sources/Record/Detail/RecordDetailView.swift‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public struct RecordDetailView: View {
100100
Spacer()
101101
}
102102
.padding(.horizontal)
103+
.padding(.vertical, 12)
103104
.background(Color.appBackground, ignoresSafeAreaEdges: .top)
104105
}
105106

‎Application/Presentation/Development/Sources/Record/Editor/RecordEditorView.swift‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ public struct RecordEditorView: View {
1313
@Environment(\.dismiss) private var dismiss
1414
@State private var store: StoreOf<RecordEditorFeature>
1515
@FocusState private var focusedField: Field?
16-
@ScaledMetric(relativeTo: .title) private var iconSize = UIFont.preferredFont(
17-
forTextStyle: .title2,
18-
compatibleWith: UITraitCollection(preferredContentSizeCategory: .large)
19-
).lineHeight
2016
private let onCompletion: () -> Void
2117

2218
public init(
@@ -71,8 +67,6 @@ public struct RecordEditorView: View {
7167
} label: {
7268
if #available(iOS 26.0, *) {
7369
Image(systemName: "xmark")
74-
.frame(width: iconSize, height: iconSize)
75-
.font(.title)
7670
} else {
7771
Text(RecordPresentation.text("common_close"))
7872
}
@@ -93,15 +87,12 @@ public struct RecordEditorView: View {
9387
} label: {
9488
if #available(iOS 26.0, *) {
9589
Image(systemName: "checkmark")
96-
.frame(width: iconSize, height: iconSize)
97-
.foregroundStyle(Color.primary)
98-
.font(.title)
9990
} else {
10091
Text(RecordPresentation.text("development_record_save"))
10192
.foregroundStyle(Color.accent)
10293
}
10394
}
104-
.topBarButtonStyle(color: Color.surface)
95+
.topBarButtonStyle()
10596
.disabled(!store.isReadyToSave)
10697
}
10798
.padding(.horizontal)

‎Application/Presentation/Development/Sources/Record/GoalDetail/GoalDetailView.swift‎

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ public struct GoalDetailView: View {
2222
}
2323

2424
public var body: some View {
25-
presentedContent
26-
.overlay {
27-
if store.isTransitioning {
28-
LoadingView()
25+
NavigationStack {
26+
presentedContent
27+
.overlay {
28+
if store.isTransitioning {
29+
LoadingView()
30+
}
2931
}
30-
}
32+
}
3133
}
3234

3335
private var mainContent: some View {
@@ -101,28 +103,50 @@ public struct GoalDetailView: View {
101103

102104
private var topBar: some View {
103105
HStack {
104-
RecordBackButton(action: dismiss.callAsFunction)
106+
if #available(iOS 26.0, *) {
107+
Button(action: dismiss.callAsFunction) {
108+
Image(systemName: "xmark")
109+
}
110+
.topBarButtonStyle(tint: Color.accent)
111+
.disabled(store.isTransitioning)
112+
} else {
113+
Button(action: dismiss.callAsFunction) {
114+
Text(RecordPresentation.text("common_close"))
115+
}
116+
.topBarButtonStyle(tint: Color.accent)
105117
.disabled(store.isTransitioning)
118+
}
106119
Spacer()
107120
if let status = store.goalStatus {
108-
Image(systemName: "ellipsis")
109-
.font(.title3.weight(.semibold))
110-
.frame(width: 28, height: 28)
111-
.prominentMenu(
112-
items: statusMenuItems(status),
113-
isEnabled: !store.isLoading && !store.isTransitioning
114-
) { status in
115-
store.send(.view(.selectStatus(status)))
116-
}
117-
.adaptiveButtonStyle(
118-
shape: .circle,
119-
color: .surface,
120-
glassEffect: .enabled
121-
)
121+
if #available(iOS 26.0, *) {
122+
Image(systemName: "ellipsis")
123+
.prominentMenu(
124+
items: statusMenuItems(status),
125+
isEnabled: !store.isLoading && !store.isTransitioning
126+
) { status in
127+
store.send(.view(.selectStatus(status)))
128+
}
129+
.topBarButtonStyle()
130+
} else {
131+
Image(systemName: "ellipsis")
132+
.font(.title3.weight(.semibold))
133+
.frame(width: 28, height: 28)
134+
.prominentMenu(
135+
items: statusMenuItems(status),
136+
isEnabled: !store.isLoading && !store.isTransitioning
137+
) { status in
138+
store.send(.view(.selectStatus(status)))
139+
}
140+
.adaptiveButtonStyle(
141+
shape: .circle,
142+
color: .surface,
143+
glassEffect: .enabled
144+
)
145+
}
122146
}
123147
}
124148
.padding(.horizontal)
125-
.padding(.bottom, 12)
149+
.padding(.vertical, 12)
126150
.background(Color.appBackground, ignoresSafeAreaEdges: .top)
127151
}
128152

‎Application/Presentation/Development/Sources/Record/GoalDetail/GoalTodoLinkSheet.swift‎

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import Domain
1010
import PresentationShared
1111

1212
struct GoalTodoLinkSheet: View {
13-
@Bindable var store: StoreOf<GoalTodoLinkFeature>
1413
@ScaledMetric(relativeTo: .title) private var iconSize = UIFont.preferredFont(
1514
forTextStyle: .title2,
1615
compatibleWith: UITraitCollection(preferredContentSizeCategory: .large)
1716
).lineHeight
17+
@Bindable var store: StoreOf<GoalTodoLinkFeature>
1818

1919
var body: some View {
2020
ScrollView {
@@ -53,40 +53,46 @@ struct GoalTodoLinkSheet: View {
5353
} label: {
5454
if #available(iOS 26.0, *) {
5555
Image(systemName: "xmark")
56-
.frame(width: iconSize, height: iconSize)
57-
.font(.title)
5856
} else {
5957
Text(RecordPresentation.text("common_close"))
6058
}
6159
}
62-
.topBarButtonStyle(color: Color.surface)
60+
.topBarButtonStyle()
6361
.disabled(store.isUpdating)
6462
Spacer()
6563
HStack(spacing: 8) {
66-
Image(systemName: "ellipsis")
67-
.font(.title3.weight(.semibold))
68-
.frame(width: iconSize, height: iconSize)
69-
.prominentMenu(
70-
items: clearSelectionMenuItems,
71-
isEnabled: store.canClearSelection
72-
) { _ in
73-
store.send(.view(.clearSelection))
74-
}
75-
.topBarButtonStyle(color: Color.surface)
64+
if #available(iOS 26.0, *) {
65+
Image(systemName: "ellipsis")
66+
.prominentMenu(
67+
items: clearSelectionMenuItems,
68+
isEnabled: store.canClearSelection
69+
) { _ in
70+
store.send(.view(.clearSelection))
71+
}
72+
.topBarButtonStyle()
73+
} else {
74+
Image(systemName: "ellipsis")
75+
.font(.title3.weight(.semibold))
76+
.frame(width: iconSize, height: iconSize)
77+
.prominentMenu(
78+
items: clearSelectionMenuItems,
79+
isEnabled: store.canClearSelection
80+
) { _ in
81+
store.send(.view(.clearSelection))
82+
}
83+
.topBarButtonStyle()
84+
}
7685
Button {
7786
store.send(.view(.save))
7887
} label: {
7988
if #available(iOS 26.0, *) {
8089
Image(systemName: "checkmark")
81-
.frame(width: iconSize, height: iconSize)
82-
.foregroundStyle(Color.primary)
83-
.font(.title)
8490
} else {
8591
Text(RecordPresentation.text("development_goal_todo_done"))
8692
.foregroundStyle(Color.accent)
8793
}
8894
}
89-
.topBarButtonStyle(color: Color.surface)
95+
.topBarButtonStyle()
9096
.disabled(!store.canSave)
9197
}
9298
}

‎Application/Presentation/Development/Sources/Record/History/RecordVersionHistoryView.swift‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct RecordVersionHistoryView: View {
5151
Spacer()
5252
}
5353
.padding(.horizontal)
54-
.padding(.bottom, 12)
54+
.padding(.vertical, 12)
5555
.background(Color.appBackground, ignoresSafeAreaEdges: .top)
5656
}
5757

@@ -268,12 +268,19 @@ struct RecordBackButton: View {
268268
let action: () -> Void
269269

270270
var body: some View {
271-
Button(action: action) {
272-
Image(systemName: "chevron.left")
273-
.font(.title3.weight(.semibold))
274-
.frame(width: 28, height: 28)
271+
if #available(iOS 26.0, *) {
272+
Button(action: action) {
273+
Image(systemName: "chevron.left")
274+
}
275+
.topBarButtonStyle()
276+
} else {
277+
Button(action: action) {
278+
Image(systemName: "chevron.left")
279+
.font(.title3.weight(.semibold))
280+
.frame(width: 28, height: 28)
281+
}
282+
.adaptiveButtonStyle(shape: .circle, color: .surface, glassEffect: .enabled)
275283
}
276-
.adaptiveButtonStyle(shape: .circle, color: .surface, glassEffect: .enabled)
277284
}
278285
}
279286

‎Application/Presentation/Entry/Sources/Common/Component/LoginButton.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ struct LoginButton: View {
3636
.tint(Color.accent)
3737
} else {
3838
Text(text)
39-
.foregroundStyle(.primary)
39+
.foregroundStyle(Color.textSecondary)
4040
}
4141
}
4242
.font(.system(.body))
4343
.contentShape(.rect(cornerRadius: 12))
4444
.frame(width: 300, height: height + 24)
4545
.background {
4646
RoundedRectangle(cornerRadius: 12)
47-
.stroke(Color.border, lineWidth: 3)
47+
.stroke(Color.border, lineWidth: 1)
4848
.fill(Color.surface)
4949
}
5050
.overlay(alignment: .leading) {

0 commit comments

Comments
 (0)