Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cherrish-iOS/Cherrish-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.nayeon.Cherrish-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -339,7 +339,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.nayeon.Cherrish-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct CalendarCellView: View {
scheduleCircle
}
}
.padding(.bottom, 4.adjustedH)
.padding(.bottom, 6.adjustedH)
.padding(.top, 19.adjustedH)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct CalendarView: View {
}
}
}
.onChange(of: homeCalendarFlowState.treatmentDate) { date in
.onChange(of: homeCalendarFlowState.treatmentDate) { _, date in
if let date = date {
viewModel.updateDate(date: date)
homeCalendarFlowState.treatmentDate = nil
Expand Down Expand Up @@ -127,34 +127,34 @@ extension CalendarView {
return VStack(spacing: 0) {
LazyVGrid(columns: columns, spacing: calendarRowSpacing) {
ForEach(dates) { value in
if value.day != -1 {
CalendarCellView(
value: value,
procedureCount: viewModel.getProcedureCount(for: value),
isSelected: viewModel.isSelected(value),
downtimeState: viewModel.getDowntimeState(for: value.date),
isDDay: viewModel.isDDay(for: value.date, selectedProcedureID: selectedProcedureID ?? 0),
calendarMode: $calendarMode
)
.onTapGesture {
viewModel.select(date: value.date)
calendarMode = .none
selectedProcedureID = nil

Task {
do {
try await viewModel.fetchTodayProcedureList()
} catch {
CherrishLogger.error(error)
if value.day != -1 {
CalendarCellView(
value: value,
procedureCount: viewModel.getProcedureCount(for: value),
isSelected: viewModel.isSelected(value),
downtimeState: viewModel.getDowntimeState(for: value.date),
isDDay: viewModel.isDDay(for: value.date, selectedProcedureID: selectedProcedureID ?? 0),
calendarMode: $calendarMode
)
.onTapGesture {
viewModel.select(date: value.date)
calendarMode = .none
selectedProcedureID = nil

Task {
do {
try await viewModel.fetchTodayProcedureList()
} catch {
CherrishLogger.error(error)
}
}
}
} else {
Color.clear
.frame(width: calendarCellWidth, height: calendarCellHeight)
}
} else {
Color.clear
.frame(width: calendarCellWidth, height: calendarCellHeight)
}
}
}

if rowCount == 4 {
Spacer()
Expand Down Expand Up @@ -290,7 +290,7 @@ extension CalendarView {
calendarCoordinator.push(
.selectTreatment
)

}
)
.padding(.horizontal, 24.adjustedW)
Expand Down Expand Up @@ -363,4 +363,4 @@ extension CalendarView {
guard calendarMode == .none, let initial = initialTopGlobalY else { return false }
return topGlobalY < initial - 0.1
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,39 @@ import SwiftUI
import Lottie

struct ChallengeLoadingView: View {
@ObservedObject var viewModel: CreateChallengeViewModel

@ObservedObject var viewModel: CreateChallengeViewModel
var body: some View {
VStack {
VStack(spacing: 4.adjustedH) {
VStack(alignment: .center) {
Spacer()
.frame(height: 94.adjustedH)

VStack(spacing: 2) {
highlight(highlightText: viewModel.selectedRoutine?.description ?? "", normalText: "방향을 바탕으로")
.frame(height: 27.adjustedH)
.padding(.top, 94.adjustedH)
TypographyText("TO-DO 미션을 만들고 있어요.", style: .title1_sb_18, color: .gray800)

LottieView(animationName: "splash", loopMode: .loop)
.frame(width: 130.adjustedW, height: 154.adjustedH)
.padding(.top, 60.adjustedH)

Spacer()
.frame(height: 80.adjustedH)

TypographyText("잠시만 기다려주세요!", style: .title2_m_16, color: .gray800)
.frame(height: 24.adjustedH)
.padding(.top, 17.adjustedH)

Spacer()

TypographyText("AI가 맞춤형 루틴을 제작하고 있어요.", style: .body3_m_12, color: .gray600)
.frame(height: 17.adjustedH)
.padding(.bottom, 30.adjustedH)
.frame(height: 27.adjustedH)
}

Spacer()
.frame(height: 80.adjustedH)

LottieView(animationName: "splash", loopMode: .loop)
.frame(width: 130.adjustedW, height: 154.adjustedH)

Spacer()
.frame(height: 80.adjustedH)

TypographyText("잠시만 기다려주세요!", style: .title2_m_16, color: .gray800)
.frame(height: 24.adjustedH)
.padding(.top, 17.adjustedH)

Spacer()

Comment on lines +36 to +41
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

중복 가능성이 있는 여백 설정

Line 38의 .padding(.top, 17.adjustedH)와 Line 40-41의 Spacer()가 함께 사용되고 있습니다. Spacer()가 남은 공간을 채우므로, 상단 패딩이 의도한 레이아웃인지 확인해 주세요. 만약 고정된 간격이 필요하다면 패딩 대신 Spacer().frame(height:)를 사용하는 것이 더 명확할 수 있습니다.

♻️ 제안된 대안
             TypographyText("잠시만 기다려주세요!", style: .title2_m_16, color: .gray800)
                 .frame(height: 24.adjustedH)
-                .padding(.top, 17.adjustedH)
             
             Spacer()
+                .frame(minHeight: 17.adjustedH)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
TypographyText("잠시만 기다려주세요!", style: .title2_m_16, color: .gray800)
.frame(height: 24.adjustedH)
.padding(.top, 17.adjustedH)
Spacer()
TypographyText("잠시만 기다려주세요!", style: .title2_m_16, color: .gray800)
.frame(height: 24.adjustedH)
Spacer()
.frame(minHeight: 17.adjustedH)
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeLoadingView.swift`
around lines 36 - 41, The top padding on TypographyText(".padding(.top,
17.adjustedH)") and the following Spacer() likely duplicate spacing; pick one
approach and make it explicit in ChallengeLoadingView: either remove the
.padding(.top, 17.adjustedH) and rely on Spacer() to push content, or replace
Spacer() with Spacer().frame(height: 17.adjustedH) (or a fixed Spacer height) to
represent the intended fixed gap; update TypographyText, padding, and Spacer
usage accordingly so only one mechanism controls the vertical space.

TypographyText("AI가 맞춤형 루틴을 제작하고 있어요.", style: .body3_m_12, color: .gray600)
.frame(height: 17.adjustedH)
.padding(.bottom, 30.adjustedH)

}
.frame(maxHeight: .infinity)
.ignoresSafeArea(edges: .bottom)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
struct ScrollTopPreferenceKey: PreferenceKey {
static var defaultValue: CGFloat = .zero
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
value = max(value, nextValue())
value = min(value, nextValue())
}
}

Expand Down