Commit d4c865455d

d4c865455df0b8b839511677a988f08ffbd91d16

parent: ace1a9a099

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-22 20:47 UTC

Agenda time grid: drop redundant lines

The time grid's default `when` adds remove-match, so no grid line
repeats a time an entry has. Grid and now lines get vertical padding
instead of a 10 to 16 pt row on the Mac and iOS.

Ref #224

Layout: unified · split

Sources/OrgApp/UserConfig.swift +1 −1
@@ -331,7 +331,7 @@ public enum UserConfig {
331 comment: "a heading in the project with one of these tags unsticks it; * for any tag", legacy: ""), 331 comment: "a heading in the project with one of these tags unsticks it; * for any tag", legacy: ""),
332 Setting(section: "org-stuck-projects", key: "regexp", defaultsKey: "stuckProjectsRegexp", kind: .string, fallback: .string(""), 332 Setting(section: "org-stuck-projects", key: "regexp", defaultsKey: "stuckProjectsRegexp", kind: .string, fallback: .string(""),
333 comment: "text in the project matching this Emacs regexp unsticks it", legacy: ""), 333 comment: "text in the project matching this Emacs regexp unsticks it", legacy: ""),
334 Setting(section: "org-agenda-time-grid", key: "when", defaultsKey: "agendaTimeGridWhen", kind: .string, fallback: .string("daily today require-timed"), 334 Setting(section: "org-agenda-time-grid", key: "when", defaultsKey: "agendaTimeGridWhen", kind: .string, fallback: .string("daily today require-timed remove-match"),
335 comment: "daily (one-day views), today, weekly (every day), require-timed (only with timed entries), remove-match (no line at an entry's time)", legacy: ""), 335 comment: "daily (one-day views), today, weekly (every day), require-timed (only with timed entries), remove-match (no line at an entry's time)", legacy: ""),
336 Setting(section: "org-agenda-time-grid", key: "times", defaultsKey: "agendaTimeGridTimes", kind: .string, fallback: .string("800 1000 1200 1400 1600 1800 2000"), 336 Setting(section: "org-agenda-time-grid", key: "times", defaultsKey: "agendaTimeGridTimes", kind: .string, fallback: .string("800 1000 1200 1400 1600 1800 2000"),
337 comment: "the grid's times as HHMM, separated by spaces", legacy: ""), 337 comment: "the grid's times as HHMM, separated by spaces", legacy: ""),
Sources/Orgstar/AgendaView.swift +2 −2
@@ -483,7 +483,7 @@ struct AgendaView: View {
483 } 483 }
484 .foregroundStyle(.tertiary) 484 .foregroundStyle(.tertiary)
485 .padding(.horizontal, 16) 485 .padding(.horizontal, 16)
486 .frame(height: 10) 486 .padding(.vertical, 4)
487 .accessibilityHidden(true) 487 .accessibilityHidden(true)
488 } 488 }
489 489
@@ -562,7 +562,7 @@ struct AgendaView: View {
562 } 562 }
563 .foregroundStyle(todayColor) 563 .foregroundStyle(todayColor)
564 .padding(.horizontal, 16) 564 .padding(.horizontal, 16)
565 .frame(height: 10) 565 .padding(.vertical, 4)
566 .accessibilityLabel("Now") 566 .accessibilityLabel("Now")
567 } 567 }
568 568
Sources/OrgstarMobile/AgendaScreen.swift +2 −2
@@ -1078,7 +1078,7 @@ struct GridLineRow: View {
1078 .foregroundStyle(.tertiary) 1078 .foregroundStyle(.tertiary)
1079 .listRowInsets(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16)) 1079 .listRowInsets(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16))
1080 .listRowSeparator(.hidden) 1080 .listRowSeparator(.hidden)
1081 .frame(height: 14) 1081 .padding(.vertical, 5)
1082 .accessibilityHidden(true) 1082 .accessibilityHidden(true)
1083 } 1083 }
1084} 1084}
@@ -1098,7 +1098,7 @@ struct NowLine: View {
1098 } 1098 }
1099 .listRowInsets(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16)) 1099 .listRowInsets(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16))
1100 .listRowSeparator(.hidden) 1100 .listRowSeparator(.hidden)
1101 .frame(height: 16) 1101 .padding(.vertical, 5)
1102 .accessibilityLabel("Now") 1102 .accessibilityLabel("Now")
1103 } 1103 }
1104} 1104}
docs/manual/guide/07-agenda.org +1 −1
@@ -141,7 +141,7 @@ org-agenda-show-all-dates = true
141 141
142Today's past deadlines and entries and habits scheduled on earlier days go in a group headed =Overdue= with their count, above today's other entries; on iOS it is a section of its own above today. Their left column shows how late they are, not the time of day they had. The oldest date comes first; entries with the same date keep Org's order. Click or tap the header to collapse or expand the group; it stays as you left it. 142Today's past deadlines and entries and habits scheduled on earlier days go in a group headed =Overdue= with their count, above today's other entries; on iOS it is a section of its own above today. Their left column shows how late they are, not the time of day they had. The oldest date comes first; entries with the same date keep Org's order. Click or tap the header to collapse or expand the group; it stays as you left it.
143 143
144Days with a time grid show dotted lines at the grid's times among the timed entries, as =org-agenda-time-grid= does: by default at 8:00, 10:00 and every two hours to 20:00, on today and in one-day views, when the day has a timed entry. An entry at a grid line's time comes before the line. On today, a line marked with the current time sits among them: before the first entry that starts later, or after the last one when all have started. The grid's days and times are set in =[org-agenda-time-grid]= in =config.toml=, =org-agenda-use-time-grid= turns the grid off, and =org-agenda-show-current-time-in-grid= the now line (see [[file:13-configuration.org][Configuration]]). With the grid off there is no now line, as in Org. 144Days with a time grid show dotted lines at the grid's times among the timed entries, as =org-agenda-time-grid= does: by default at 8:00, 10:00 and every two hours to 20:00, on today and in one-day views, when the day has a timed entry, and not at a time an entry has. On today, a line marked with the current time sits among them: before the first entry that starts later, or after the last one when all have started. The grid's days and times are set in =[org-agenda-time-grid]= in =config.toml=, =org-agenda-use-time-grid= turns the grid off, and =org-agenda-show-current-time-in-grid= the now line (see [[file:13-configuration.org][Configuration]]). With the grid off there is no now line, as in Org.
145 145
146** Sorting 146** Sorting
147 147
docs/manual/guide/13-configuration.org +3 −3
@@ -356,10 +356,10 @@ These mirror the four elements of =org-stuck-projects=. See [[file:07-agenda.org
356 356
357| Key | Type | Default | Effect | 357| Key | Type | Default | Effect |
358|---------+--------+----------------------------------------+-------------------------------------------| 358|---------+--------+----------------------------------------+-------------------------------------------|
359| =when= | string | ="daily today require-timed"= | Which days get a grid, separated by spaces | 359| =when= | string | ="daily today require-timed remove-match"= | Which days get a grid, separated by spaces |
360| =times= | string | ="800 1000 1200 1400 1600 1800 2000"= | The grid's times as =HHMM= | 360| =times= | string | ="800 1000 1200 1400 1600 1800 2000"= | The grid's times as =HHMM= |
361 361
362These mirror the first two elements of =org-agenda-time-grid=. =when= takes =daily= (views of one day), =today=, =weekly= (every day), =require-timed= (only days with a timed entry) and =remove-match= (no line at a time an entry has). orgstar draws the lines itself, so Emacs's third and fourth elements, the strings for the lines, have no equivalent. 362These mirror the first two elements of =org-agenda-time-grid=. =when= takes =daily= (views of one day), =today=, =weekly= (every day), =require-timed= (only days with a timed entry) and =remove-match= (no line at a time an entry has). The default adds =remove-match= to Org's, so that a grid line doesn't repeat an entry's time; ="daily today require-timed"= gives Org's grid. orgstar draws the lines itself, so Emacs's third and fourth elements, the strings for the lines, have no equivalent.
363 363
364** [org-structure-template-alist] 364** [org-structure-template-alist]
365 365