From e06f15c58591ca02b52f65cd096df73ec8b693fc Mon Sep 17 00:00:00 2001 From: kutesir Date: Thu, 28 May 2026 09:57:41 +0300 Subject: [PATCH] fix: compact AddTaskSheet to 150pt detent, eliminating empty space Sheet was 500pt tall with ~145pt of content, leaving ~355pt blank. Dropping to height(150) makes the sheet hug its content and sit flush above the keyboard like the reference design. --- KisaniCal/Views/CalendarView.swift | 2 +- KisaniCal/Views/MatrixView.swift | 2 +- KisaniCal/Views/TodayView.swift | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/KisaniCal/Views/CalendarView.swift b/KisaniCal/Views/CalendarView.swift index 6e60350..08d9aa7 100644 --- a/KisaniCal/Views/CalendarView.swift +++ b/KisaniCal/Views/CalendarView.swift @@ -186,7 +186,7 @@ struct CalendarView: View { .sheet(isPresented: $showAddTask) { AddTaskSheet(prefilledDate: selectedDate) .environmentObject(taskVM) - .presentationDetents([.height(500), .large]) + .presentationDetents([.height(150), .large]) .presentationDragIndicator(.visible) } .sheet(isPresented: $showCalendarConnect) { diff --git a/KisaniCal/Views/MatrixView.swift b/KisaniCal/Views/MatrixView.swift index ac5bf73..281c99c 100644 --- a/KisaniCal/Views/MatrixView.swift +++ b/KisaniCal/Views/MatrixView.swift @@ -67,7 +67,7 @@ struct MatrixView: View { .sheet(isPresented: $showAddTask) { AddTaskSheet() .environmentObject(taskVM) - .presentationDetents([.height(500), .large]) + .presentationDetents([.height(150), .large]) .presentationDragIndicator(.visible) } } diff --git a/KisaniCal/Views/TodayView.swift b/KisaniCal/Views/TodayView.swift index 2d170eb..0ef37ff 100644 --- a/KisaniCal/Views/TodayView.swift +++ b/KisaniCal/Views/TodayView.swift @@ -187,7 +187,7 @@ struct TodayView: View { .sheet(isPresented: $showAddTask) { AddTaskSheet() .environmentObject(taskVM) - .presentationDetents([.height(500), .large]) + .presentationDetents([.height(150), .large]) .presentationDragIndicator(.visible) } .sheet(isPresented: $showWorkoutSession) { @@ -969,24 +969,24 @@ struct AddTaskSheet: View { var body: some View { VStack(spacing: 0) { // ── Text input ────────────────────────────────────────────────── - VStack(alignment: .leading, spacing: 10) { + VStack(alignment: .leading, spacing: 8) { NLTaskField( text: $rawText, placeholder: "What would you like to do?", highlightRanges: parsed.tokenRanges ) - .frame(minHeight: 28, maxHeight: 110) + .frame(minHeight: 32, maxHeight: 120) .onChange(of: rawText) { _ in withAnimation(KisaniSpring.micro) { parsed = NLTaskParser.parse(rawText) } } Text("Description") - .font(AppFonts.sans(14)) + .font(AppFonts.sans(15)) .foregroundColor(AppColors.text3(cs)) } .padding(.horizontal, 16) - .padding(.top, 20) - .padding(.bottom, 14) + .padding(.top, 16) + .padding(.bottom, 12) // ── Toolbar ───────────────────────────────────────────────────── Divider().background(AppColors.border(cs))