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.
This commit is contained in:
kutesir
2026-05-28 09:57:41 +03:00
parent ad8b6574fb
commit e06f15c585
3 changed files with 8 additions and 8 deletions

View File

@@ -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) {

View File

@@ -67,7 +67,7 @@ struct MatrixView: View {
.sheet(isPresented: $showAddTask) {
AddTaskSheet()
.environmentObject(taskVM)
.presentationDetents([.height(500), .large])
.presentationDetents([.height(150), .large])
.presentationDragIndicator(.visible)
}
}

View File

@@ -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))