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:
@@ -186,7 +186,7 @@ struct CalendarView: View {
|
|||||||
.sheet(isPresented: $showAddTask) {
|
.sheet(isPresented: $showAddTask) {
|
||||||
AddTaskSheet(prefilledDate: selectedDate)
|
AddTaskSheet(prefilledDate: selectedDate)
|
||||||
.environmentObject(taskVM)
|
.environmentObject(taskVM)
|
||||||
.presentationDetents([.height(500), .large])
|
.presentationDetents([.height(150), .large])
|
||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
}
|
}
|
||||||
.sheet(isPresented: $showCalendarConnect) {
|
.sheet(isPresented: $showCalendarConnect) {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ struct MatrixView: View {
|
|||||||
.sheet(isPresented: $showAddTask) {
|
.sheet(isPresented: $showAddTask) {
|
||||||
AddTaskSheet()
|
AddTaskSheet()
|
||||||
.environmentObject(taskVM)
|
.environmentObject(taskVM)
|
||||||
.presentationDetents([.height(500), .large])
|
.presentationDetents([.height(150), .large])
|
||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ struct TodayView: View {
|
|||||||
.sheet(isPresented: $showAddTask) {
|
.sheet(isPresented: $showAddTask) {
|
||||||
AddTaskSheet()
|
AddTaskSheet()
|
||||||
.environmentObject(taskVM)
|
.environmentObject(taskVM)
|
||||||
.presentationDetents([.height(500), .large])
|
.presentationDetents([.height(150), .large])
|
||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
}
|
}
|
||||||
.sheet(isPresented: $showWorkoutSession) {
|
.sheet(isPresented: $showWorkoutSession) {
|
||||||
@@ -969,24 +969,24 @@ struct AddTaskSheet: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
// ── Text input ──────────────────────────────────────────────────
|
// ── Text input ──────────────────────────────────────────────────
|
||||||
VStack(alignment: .leading, spacing: 10) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
NLTaskField(
|
NLTaskField(
|
||||||
text: $rawText,
|
text: $rawText,
|
||||||
placeholder: "What would you like to do?",
|
placeholder: "What would you like to do?",
|
||||||
highlightRanges: parsed.tokenRanges
|
highlightRanges: parsed.tokenRanges
|
||||||
)
|
)
|
||||||
.frame(minHeight: 28, maxHeight: 110)
|
.frame(minHeight: 32, maxHeight: 120)
|
||||||
.onChange(of: rawText) { _ in
|
.onChange(of: rawText) { _ in
|
||||||
withAnimation(KisaniSpring.micro) { parsed = NLTaskParser.parse(rawText) }
|
withAnimation(KisaniSpring.micro) { parsed = NLTaskParser.parse(rawText) }
|
||||||
}
|
}
|
||||||
|
|
||||||
Text("Description")
|
Text("Description")
|
||||||
.font(AppFonts.sans(14))
|
.font(AppFonts.sans(15))
|
||||||
.foregroundColor(AppColors.text3(cs))
|
.foregroundColor(AppColors.text3(cs))
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 16)
|
.padding(.horizontal, 16)
|
||||||
.padding(.top, 20)
|
.padding(.top, 16)
|
||||||
.padding(.bottom, 14)
|
.padding(.bottom, 12)
|
||||||
|
|
||||||
// ── Toolbar ─────────────────────────────────────────────────────
|
// ── Toolbar ─────────────────────────────────────────────────────
|
||||||
Divider().background(AppColors.border(cs))
|
Divider().background(AppColors.border(cs))
|
||||||
|
|||||||
Reference in New Issue
Block a user