Commit 98b41213c1
Verified · cmc
Layout: unified · split
Sources/OrgPresentation/AgendaRows.swift +21
| @@ -99,6 +99,27 @@ public struct AgendaRow: Sendable, Equatable, Identifiable { | |||
| 99 | /// The calendar's color for an event. | 99 | /// The calendar's color for an event. |
| 100 | public var color: RGBA? { event?.color } | 100 | public var color: RGBA? { event?.color } |
| 101 | 101 | ||
| 102 | /// The gutter as its lines: a timed row's start over its end, else the status. | ||
| 103 | public var gutterLines: [String] { | ||
| 104 | start == nil ? [gutter] : gutter.split(separator: "–", maxSplits: 1).map(String.init) | ||
| 105 | } | ||
| 106 | |||
| 107 | /// The SF Symbol under the gutter: a warning for overdue entries and a check for done ones, | ||
| 108 | /// as the status says first, else one for the kind of row. | ||
| 109 | public var symbol: String? { | ||
| 110 | guard let icon else { return nil } | ||
| 111 | if status == .overdue { return "exclamationmark.circle.fill" } | ||
| 112 | if status == .done { return "checkmark.circle.fill" } | ||
| 113 | switch icon { | ||
| 114 | case .scheduled: return "calendar" | ||
| 115 | case .deadline: return "flag.fill" | ||
| 116 | case .habit: return "repeat" | ||
| 117 | case .event: return "circle.fill" | ||
| 118 | case .reminder: return "circle" | ||
| 119 | case .timestamp: return start == nil ? "calendar" : "clock" | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 102 | /// Nil for the time grid and the current-time line. | 123 | /// Nil for the time grid and the current-time line. |
| 103 | public init?(item: AgendaItem, day: Int, today: Int) { | 124 | public init?(item: AgendaItem, day: Int, today: Int) { |
| 104 | if item.kind == .timeGrid || item.kind == .currentTime { return nil } | 125 | if item.kind == .timeGrid || item.kind == .currentTime { return nil } |
Sources/Orgstar/AgendaRowView.swift +57 −63
| @@ -5,8 +5,8 @@ import OrgCore | |||
| 5 | import OrgPresentation | 5 | import OrgPresentation |
| 6 | import SwiftUI | 6 | import SwiftUI |
| 7 | 7 | ||
| 8 | /// One agenda line: the time or status over an icon, the category above the title, progress | 8 | /// One agenda line: the time or status over an icon; above the title the category, progress and |
| 9 | /// and tags after it, and the TODO keyword and priority at the end. | 9 | /// tags, with the TODO keyword and priority at the end; a habit's graph under the title. |
| 10 | struct AgendaRowView: View { | 10 | struct AgendaRowView: View { |
| 11 | let row: AgendaRow | 11 | let row: AgendaRow |
| 12 | /// The agenda day the row is on, for habit graphs. | 12 | /// The agenda day the row is on, for habit graphs. |
| @@ -23,29 +23,24 @@ struct AgendaRowView: View { | |||
| 23 | static let gutterWidth: CGFloat = 92 | 23 | static let gutterWidth: CGFloat = 92 |
| 24 | 24 | ||
| 25 | var body: some View { | 25 | var body: some View { |
| 26 | HStack(alignment: .center, spacing: 12) { | 26 | HStack(alignment: .top, spacing: 12) { |
| 27 | if showsGutter { gutter } | 27 | if showsGutter { gutter } |
| 28 | VStack(alignment: .leading, spacing: 2) { | 28 | VStack(alignment: .leading, spacing: 2) { |
| 29 | if !row.category.isEmpty { categoryLine } | 29 | HStack(alignment: .top, spacing: 8) { |
| 30 | titleLine | 30 | metaLine |
| 31 | } | 31 | Spacer(minLength: 0) |
| 32 | .layoutPriority(1) | 32 | marks |
| 33 | Spacer(minLength: 8) | 33 | } |
| 34 | if let habit = row.item?.habit { | 34 | Text(row.title.isEmpty ? " " : row.title) |
| 35 | HabitGraph(cells: habit.graph(today: day), theme: theme) | 35 | .font(.body) |
| 36 | } | 36 | .strikethrough(row.isDone) |
| 37 | if let todo = row.todo { | 37 | .foregroundStyle(row.isDone ? AnyShapeStyle(.secondary) : AnyShapeStyle(theme.color("foreground") ?? .primary)) |
| 38 | let color = theme.dynamic(row.isDone ? .systemGreen : .systemRed) { [theme, row] in theme.todoColor(todo, isDone: row.isDone, dark: $0) } | 38 | .lineLimit(1) |
| 39 | Text(todo) | 39 | .truncationMode(.tail) |
| 40 | .font(.caption.weight(.bold)) | 40 | if let habit = row.item?.habit { |
| 41 | .foregroundStyle(color) | 41 | HabitGraph(cells: habit.graph(today: day), theme: theme).padding(.top, 2) |
| 42 | .padding(.horizontal, 7) | 42 | } |
| 43 | .padding(.vertical, 2) | ||
| 44 | .background(Capsule().fill(color.opacity(0.14))) | ||
| 45 | .fixedSize() | ||
| 46 | } | 43 | } |
| 47 | priorityBadge | ||
| 48 | .frame(width: badgeSize) | ||
| 49 | } | 44 | } |
| 50 | .padding(.horizontal, 16) | 45 | .padding(.horizontal, 16) |
| 51 | .padding(.vertical, 6) | 46 | .padding(.vertical, 6) |
| @@ -69,14 +64,19 @@ struct AgendaRowView: View { | |||
| 69 | theme.dynamic(.secondaryLabelColor) { [theme, row] in theme.statusColor(row.status, dark: $0) } | 64 | theme.dynamic(.secondaryLabelColor) { [theme, row] in theme.statusColor(row.status, dark: $0) } |
| 70 | } | 65 | } |
| 71 | 66 | ||
| 67 | /// The start over the end for timed rows, else the status; the icon under them. | ||
| 72 | private var gutter: some View { | 68 | private var gutter: some View { |
| 73 | VStack(alignment: .leading, spacing: 3) { | 69 | VStack(alignment: .leading, spacing: 2) { |
| 74 | Text(row.gutter) | 70 | let lines = row.gutterLines |
| 71 | Text(lines[0]) | ||
| 75 | .font(.callout.weight(row.status == .overdue || row.status == .dueSoon ? .semibold : .regular).monospacedDigit()) | 72 | .font(.callout.weight(row.status == .overdue || row.status == .dueSoon ? .semibold : .regular).monospacedDigit()) |
| 76 | .foregroundStyle(statusColor) | 73 | .foregroundStyle(statusColor) |
| 77 | .lineLimit(1) | 74 | .lineLimit(1) |
| 78 | .minimumScaleFactor(0.8) | 75 | .minimumScaleFactor(0.8) |
| 79 | if let symbol { | 76 | if lines.count > 1 { |
| 77 | Text(lines[1]).font(.caption.monospacedDigit()).foregroundStyle(.secondary) | ||
| 78 | } | ||
| 79 | if let symbol = row.symbol { | ||
| 80 | Image(systemName: symbol) | 80 | Image(systemName: symbol) |
| 81 | .font(.caption.weight(.semibold)) | 81 | .font(.caption.weight(.semibold)) |
| 82 | .imageScale(row.icon == .event ? .small : .medium) | 82 | .imageScale(row.icon == .event ? .small : .medium) |
| @@ -86,36 +86,26 @@ struct AgendaRowView: View { | |||
| 86 | .frame(width: gutterWidth, alignment: .leading) | 86 | .frame(width: gutterWidth, alignment: .leading) |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | /// Overdue entries show a warning, done ones a check, as the status says first. | ||
| 90 | private var symbol: String? { | ||
| 91 | guard let icon = row.icon else { return nil } | ||
| 92 | if row.status == .overdue { return "exclamationmark.circle.fill" } | ||
| 93 | if row.status == .done { return "checkmark.circle.fill" } | ||
| 94 | switch icon { | ||
| 95 | case .scheduled: return "calendar" | ||
| 96 | case .deadline: return "flag.fill" | ||
| 97 | case .habit: return "repeat" | ||
| 98 | case .event: return "circle.fill" | ||
| 99 | case .reminder: return "circle" | ||
| 100 | case .timestamp: return row.start == nil ? "calendar" : "clock" | ||
| 101 | } | ||
| 102 | } | ||
| 103 | |||
| 104 | private var iconColor: Color { | 89 | private var iconColor: Color { |
| 105 | if let event = row.event { return theme.dynamic(.systemPurple) { [theme] in theme.eventColor(event, dark: $0) } } | 90 | if let event = row.event { return theme.dynamic(.systemPurple) { [theme] in theme.eventColor(event, dark: $0) } } |
| 106 | return row.status == .normal ? Color.secondary.opacity(0.8) : statusColor | 91 | return row.status == .normal ? Color.secondary.opacity(0.8) : statusColor |
| 107 | } | 92 | } |
| 108 | 93 | ||
| 109 | private var categoryLine: some View { | 94 | /// The category, the prefix's detail, progress and tags, wrapping to more lines as needed. |
| 110 | HStack(spacing: 5) { | 95 | private var metaLine: some View { |
| 111 | Circle() | 96 | FlowLayout(spacing: 5, lineSpacing: 3) { |
| 112 | .fill(row.event.map { event in theme.dynamic(.systemPurple) { [theme] in theme.eventColor(event, dark: $0) } } | 97 | if !row.category.isEmpty { |
| 113 | ?? theme.dynamic { [theme, row] in theme.categoryColor(row.category, dark: $0) }) | 98 | HStack(spacing: 5) { |
| 114 | .frame(width: 6, height: 6) | 99 | Circle() |
| 115 | Text(row.category) | 100 | .fill(row.event.map { event in theme.dynamic(.systemPurple) { [theme] in theme.eventColor(event, dark: $0) } } |
| 116 | .font(.subheadline) | 101 | ?? theme.dynamic { [theme, row] in theme.categoryColor(row.category, dark: $0) }) |
| 117 | .foregroundStyle(theme.color("agenda-category") ?? .secondary) | 102 | .frame(width: 6, height: 6) |
| 118 | .lineLimit(1) | 103 | Text(row.category) |
| 104 | .font(.subheadline) | ||
| 105 | .foregroundStyle(theme.color("agenda-category") ?? .secondary) | ||
| 106 | .lineLimit(1) | ||
| 107 | } | ||
| 108 | } | ||
| 119 | if let detail = row.prefixDetail { | 109 | if let detail = row.prefixDetail { |
| 120 | Text(detail) | 110 | Text(detail) |
| 121 | .font(.subheadline) | 111 | .font(.subheadline) |
| @@ -123,17 +113,6 @@ struct AgendaRowView: View { | |||
| 123 | .lineLimit(1) | 113 | .lineLimit(1) |
| 124 | .truncationMode(.middle) | 114 | .truncationMode(.middle) |
| 125 | } | 115 | } |
| 126 | } | ||
| 127 | } | ||
| 128 | |||
| 129 | private var titleLine: some View { | ||
| 130 | HStack(spacing: 6) { | ||
| 131 | Text(row.title.isEmpty ? " " : row.title) | ||
| 132 | .font(.body) | ||
| 133 | .strikethrough(row.isDone) | ||
| 134 | .foregroundStyle(row.isDone ? AnyShapeStyle(.secondary) : AnyShapeStyle(theme.color("foreground") ?? .primary)) | ||
| 135 | .lineLimit(1) | ||
| 136 | .truncationMode(.tail) | ||
| 137 | ForEach([row.progress, row.detail].compactMap { $0 }, id: \.self) { progress in | 116 | ForEach([row.progress, row.detail].compactMap { $0 }, id: \.self) { progress in |
| 138 | Text(progress) | 117 | Text(progress) |
| 139 | .font(.caption.weight(.semibold).monospacedDigit()) | 118 | .font(.caption.weight(.semibold).monospacedDigit()) |
| @@ -141,7 +120,6 @@ struct AgendaRowView: View { | |||
| 141 | .padding(.horizontal, 6) | 120 | .padding(.horizontal, 6) |
| 142 | .padding(.vertical, 1) | 121 | .padding(.vertical, 1) |
| 143 | .background(Capsule().fill(Color.secondary.opacity(0.14))) | 122 | .background(Capsule().fill(Color.secondary.opacity(0.14))) |
| 144 | .fixedSize() | ||
| 145 | } | 123 | } |
| 146 | ForEach(row.tags, id: \.self) { tag in | 124 | ForEach(row.tags, id: \.self) { tag in |
| 147 | Text(tag) | 125 | Text(tag) |
| @@ -150,11 +128,27 @@ struct AgendaRowView: View { | |||
| 150 | .padding(.horizontal, 6) | 128 | .padding(.horizontal, 6) |
| 151 | .padding(.vertical, 1) | 129 | .padding(.vertical, 1) |
| 152 | .background(Capsule().strokeBorder((theme.color("tags") ?? .secondary).opacity(0.35), lineWidth: 0.5)) | 130 | .background(Capsule().strokeBorder((theme.color("tags") ?? .secondary).opacity(0.35), lineWidth: 0.5)) |
| 153 | .fixedSize() | ||
| 154 | } | 131 | } |
| 155 | } | 132 | } |
| 156 | } | 133 | } |
| 157 | 134 | ||
| 135 | /// The TODO keyword and the priority, at the end of the category's line. | ||
| 136 | private var marks: some View { | ||
| 137 | HStack(spacing: 6) { | ||
| 138 | if let todo = row.todo { | ||
| 139 | let color = theme.dynamic(row.isDone ? .systemGreen : .systemRed) { [theme, row] in theme.todoColor(todo, isDone: row.isDone, dark: $0) } | ||
| 140 | Text(todo) | ||
| 141 | .font(.caption.weight(.bold)) | ||
| 142 | .foregroundStyle(color) | ||
| 143 | .padding(.horizontal, 7) | ||
| 144 | .padding(.vertical, 2) | ||
| 145 | .background(Capsule().fill(color.opacity(0.14))) | ||
| 146 | } | ||
| 147 | priorityBadge | ||
| 148 | } | ||
| 149 | .fixedSize() | ||
| 150 | } | ||
| 151 | |||
| 158 | @ViewBuilder | 152 | @ViewBuilder |
| 159 | private var priorityBadge: some View { | 153 | private var priorityBadge: some View { |
| 160 | if let priority = row.priority { | 154 | if let priority = row.priority { |
Sources/OrgstarMobile/AgendaScreen.swift +44 −53
| @@ -114,12 +114,7 @@ struct AgendaScreen: View, Equatable { | |||
| 114 | } else if case .agenda = agenda.mode { | 114 | } else if case .agenda = agenda.mode { |
| 115 | let _ = model.settingsVersion | 115 | let _ = model.settingsVersion |
| 116 | ForEach(Perf.measure("agenda.groups") { agenda.groups(showAllDates: OrgPreferences.agendaShowAllDates(), filter: filter) }) { group in | 116 | ForEach(Perf.measure("agenda.groups") { agenda.groups(showAllDates: OrgPreferences.agendaShowAllDates(), filter: filter) }) { group in |
| 117 | overdue(group) | 117 | dayGroup(group) |
| 118 | Section { | ||
| 119 | day(group) | ||
| 120 | } header: { | ||
| 121 | header(group) | ||
| 122 | } | ||
| 123 | } | 118 | } |
| 124 | } else if case .blocks = agenda.mode { | 119 | } else if case .blocks = agenda.mode { |
| 125 | // A block's title over its days, or over its entries. | 120 | // A block's title over its days, or over its entries. |
| @@ -127,12 +122,7 @@ struct AgendaScreen: View, Equatable { | |||
| 127 | if block.isAgenda { | 122 | if block.isAgenda { |
| 128 | Section { } header: { Text(block.header).font(.headline) } | 123 | Section { } header: { Text(block.header).font(.headline) } |
| 129 | ForEach(agenda.groups(block, showAllDates: OrgPreferences.agendaShowAllDates(), filter: filter)) { group in | 124 | ForEach(agenda.groups(block, showAllDates: OrgPreferences.agendaShowAllDates(), filter: filter)) { group in |
| 130 | overdue(group) | 125 | dayGroup(group) |
| 131 | Section { | ||
| 132 | day(group) | ||
| 133 | } header: { | ||
| 134 | header(group) | ||
| 135 | } | ||
| 136 | } | 126 | } |
| 137 | } else { | 127 | } else { |
| 138 | Section { | 128 | Section { |
| @@ -446,15 +436,12 @@ struct AgendaScreen: View, Equatable { | |||
| 446 | 436 | ||
| 447 | // MARK: - Days | 437 | // MARK: - Days |
| 448 | 438 | ||
| 449 | /// Today's entries from earlier days, in a section of their own above today's. | 439 | /// A day under its header. On today, the entries from earlier days come first, in a group |
| 440 | /// of their own headed Overdue. | ||
| 450 | @ViewBuilder | 441 | @ViewBuilder |
| 451 | private func overdue(_ group: AgendaDayGroup) -> some View { | 442 | private func dayGroup(_ group: AgendaDayGroup) -> some View { |
| 452 | if group.isToday, !group.overdue.isEmpty { | 443 | if group.isToday, !group.overdue.isEmpty { |
| 453 | Section { | 444 | Section { |
| 454 | if overdueExpanded { | ||
| 455 | ForEach(group.overdue) { item in Deferred { row(item, day: group.day) } } | ||
| 456 | } | ||
| 457 | } header: { | ||
| 458 | Button { | 445 | Button { |
| 459 | withAnimation { overdueExpanded.toggle() } | 446 | withAnimation { overdueExpanded.toggle() } |
| 460 | } label: { | 447 | } label: { |
| @@ -470,8 +457,23 @@ struct AgendaScreen: View, Equatable { | |||
| 470 | .contentShape(Rectangle()) | 457 | .contentShape(Rectangle()) |
| 471 | } | 458 | } |
| 472 | .buttonStyle(.plain) | 459 | .buttonStyle(.plain) |
| 473 | .textCase(nil) | ||
| 474 | .accessibilityValue(overdueExpanded ? "Expanded" : "Collapsed") | 460 | .accessibilityValue(overdueExpanded ? "Expanded" : "Collapsed") |
| 461 | if overdueExpanded { | ||
| 462 | ForEach(group.overdue) { item in Deferred { row(item, day: group.day) } } | ||
| 463 | } | ||
| 464 | } header: { | ||
| 465 | header(group) | ||
| 466 | } | ||
| 467 | if !group.rows.isEmpty { | ||
| 468 | Section { | ||
| 469 | day(group) | ||
| 470 | } | ||
| 471 | } | ||
| 472 | } else { | ||
| 473 | Section { | ||
| 474 | day(group) | ||
| 475 | } header: { | ||
| 476 | header(group) | ||
| 475 | } | 477 | } |
| 476 | } | 478 | } |
| 477 | } | 479 | } |
| @@ -939,8 +941,8 @@ extension RGBA { | |||
| 939 | var swiftUI: Color { Color(.sRGB, red: red, green: green, blue: blue, opacity: alpha) } | 941 | var swiftUI: Color { Color(.sRGB, red: red, green: green, blue: blue, opacity: alpha) } |
| 940 | } | 942 | } |
| 941 | 943 | ||
| 942 | /// One agenda line: the time or status with an icon in the gutter; the category, title, | 944 | /// One agenda line: the time or status over an icon; above the title the |
| 943 | /// progress and tags; the TODO keyword and priority on the right. | 945 | /// category, progress and tags, with the TODO keyword and priority at the end; a habit's graph under it. |
| 944 | struct AgendaRowView: View { | 946 | struct AgendaRowView: View { |
| 945 | let row: AgendaRow | 947 | let row: AgendaRow |
| 946 | /// The day the row is on, for habit graphs. | 948 | /// The day the row is on, for habit graphs. |
| @@ -1029,40 +1031,29 @@ struct AgendaRowView: View { | |||
| 1029 | 1031 | ||
| 1030 | /// The start over the end for timed rows, else the status; the icon under them. | 1032 | /// The start over the end for timed rows, else the status; the icon under them. |
| 1031 | private var gutter: some View { | 1033 | private var gutter: some View { |
| 1032 | HStack(alignment: .firstTextBaseline, spacing: 4) { | 1034 | VStack(alignment: .leading, spacing: 2) { |
| 1033 | Image(systemName: icon ?? "circle").font(.caption2.weight(.semibold)).foregroundStyle(iconColor) | 1035 | let lines = row.gutterLines |
| 1034 | .frame(width: 14) | 1036 | if row.start != nil { |
| 1035 | .opacity(icon == nil ? 0 : 1) | 1037 | Text(lines[0]) |
| 1036 | VStack(alignment: .leading, spacing: 1) { | 1038 | .font(.subheadline.monospacedDigit().weight(.semibold)) |
| 1037 | if row.start != nil { | 1039 | .foregroundStyle(row.status == .normal ? Color.primary : row.status == .done ? Color.secondary : statusColor) |
| 1038 | let parts = row.gutter.split(separator: "–", maxSplits: 1) | 1040 | if lines.count > 1 { |
| 1039 | Text(parts.first.map(String.init) ?? row.gutter) | 1041 | Text(lines[1]).font(.caption.monospacedDigit()).foregroundStyle(.secondary) |
| 1040 | .font(.subheadline.monospacedDigit().weight(.semibold)) | ||
| 1041 | .foregroundStyle(row.status == .normal ? Color.primary : row.status == .done ? Color.secondary : statusColor) | ||
| 1042 | if parts.count > 1 { | ||
| 1043 | Text(parts[1]).font(.caption.monospacedDigit()).foregroundStyle(.secondary) | ||
| 1044 | } | ||
| 1045 | } else if !row.gutter.isEmpty { | ||
| 1046 | Text(row.gutter) | ||
| 1047 | .font(.caption.weight(.medium).monospacedDigit()) | ||
| 1048 | .foregroundStyle(statusColor) | ||
| 1049 | .lineLimit(1) | ||
| 1050 | .allowsTightening(true) | ||
| 1051 | .minimumScaleFactor(0.8) | ||
| 1052 | } | 1042 | } |
| 1043 | } else if !row.gutter.isEmpty { | ||
| 1044 | Text(row.gutter) | ||
| 1045 | .font(.caption.weight(.medium).monospacedDigit()) | ||
| 1046 | .foregroundStyle(statusColor) | ||
| 1047 | .lineLimit(1) | ||
| 1048 | .allowsTightening(true) | ||
| 1049 | .minimumScaleFactor(0.8) | ||
| 1050 | } | ||
| 1051 | if let symbol = row.symbol { | ||
| 1052 | Image(systemName: symbol) | ||
| 1053 | .font(.caption2.weight(.semibold)) | ||
| 1054 | .imageScale(row.icon == .event ? .small : .medium) | ||
| 1055 | .foregroundStyle(iconColor) | ||
| 1053 | } | 1056 | } |
| 1054 | } | ||
| 1055 | } | ||
| 1056 | |||
| 1057 | private var icon: String? { | ||
| 1058 | switch row.icon { | ||
| 1059 | case .scheduled: row.status == .overdue ? "exclamationmark.circle.fill" : "calendar" | ||
| 1060 | case .deadline: row.status == .overdue ? "exclamationmark.triangle.fill" : "flag.fill" | ||
| 1061 | case .habit: "repeat" | ||
| 1062 | case .event: "calendar" | ||
| 1063 | case .reminder: "circle" | ||
| 1064 | case .timestamp: "clock" | ||
| 1065 | case nil: nil | ||
| 1066 | } | 1057 | } |
| 1067 | } | 1058 | } |
| 1068 | 1059 | ||
Tests/OrgPresentationTests/AgendaRowsTests.swift +14
| @@ -94,6 +94,20 @@ struct AgendaRowsTests { | |||
| 94 | #expect(!rent.isEvent && rent.item != nil) | 94 | #expect(!rent.isEvent && rent.item != nil) |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | @Test func gutterLinesAndSymbols() { | ||
| 98 | let rows = Self.rows() | ||
| 99 | #expect(rows["Dentist"]?.gutterLines == ["13:50", "14:30"]) | ||
| 100 | #expect(rows["Standup"]?.gutterLines == ["08:00"]) | ||
| 101 | #expect(rows["Send forms"]?.gutterLines == ["3d late"]) | ||
| 102 | #expect(rows["Send forms"]?.symbol == "exclamationmark.circle.fill") | ||
| 103 | #expect(rows["Pay rent"]?.symbol == "exclamationmark.circle.fill") | ||
| 104 | #expect(rows["Took out bins"]?.symbol == "checkmark.circle.fill") | ||
| 105 | #expect(rows["File taxes"]?.symbol == "flag.fill") | ||
| 106 | #expect(rows["Water plants"]?.symbol == "calendar") | ||
| 107 | #expect(rows["Dentist"]?.symbol == "clock") | ||
| 108 | #expect(rows["Birthday"]?.symbol == "calendar") | ||
| 109 | } | ||
| 110 | |||
| 97 | @Test func logRowsKeepTheDurationAndState() { | 111 | @Test func logRowsKeepTheDurationAndState() { |
| 98 | let text = """ | 112 | let text = """ |
| 99 | * DONE Write report | 113 | * DONE Write report |
docs/manual/guide/07-agenda.org +6 −8
| @@ -139,7 +139,7 @@ Days without entries are left out. Today always shows, with =Nothing scheduled= | |||
| 139 | org-agenda-show-all-dates = true | 139 | org-agenda-show-all-dates = true |
| 140 | #+END_SRC | 140 | #+END_SRC |
| 141 | 141 | ||
| 142 | Today'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. | 142 | Today'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. 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 | ||
| 144 | Days 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. | 144 | Days 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 | ||
| @@ -171,21 +171,19 @@ In the TODO list and matches, the date keys use the first one in the strategy: w | |||
| 171 | Press =l= to turn log mode (=org-agenda-log-mode=) on or off; on iOS, use Log Mode in the span menu. Each day then also shows: | 171 | Press =l= to turn log mode (=org-agenda-log-mode=) on or off; on iOS, use Log Mode in the span menu. Each day then also shows: |
| 172 | 172 | ||
| 173 | - =Closed= entries whose =CLOSED:= timestamp is on that day; | 173 | - =Closed= entries whose =CLOSED:= timestamp is on that day; |
| 174 | - =Clocked= entries for each =CLOCK:= line that starts on that day, with the clock's start and end times in the left column and the time clocked, such as =1:30=, after the title; | 174 | - =Clocked= entries for each =CLOCK:= line that starts on that day, with the clock's start and end times in the left column and the time clocked, such as =1:30=, above the title; |
| 175 | - with =state= in =org-agenda-log-mode-items=, =State:= entries for each state change logged that day (a =- State "DONE" from "TODO" [2026-10-05 Mon 16:20]= line), with the new state in parentheses and the note's first line after the title. | 175 | - with =state= in =org-agenda-log-mode-items=, =State:= entries for each state change logged that day (a =- State "DONE" from "TODO" [2026-10-05 Mon 16:20]= line), with the new state in parentheses and the note's first line after the title. |
| 176 | 176 | ||
| 177 | A note under a clock line (a list item directly below it) is added to the title after a =-=. =org-agenda-log-mode-items= in =config.toml= picks the kinds, separated by spaces; the default is Org's, ="closed clock"=. | 177 | A note under a clock line (a list item directly below it) is added to the title after a =-=. =org-agenda-log-mode-items= in =config.toml= picks the kinds, separated by spaces; the default is Org's, ="closed clock"=. |
| 178 | 178 | ||
| 179 | * Rows | 179 | * Rows |
| 180 | 180 | ||
| 181 | Each row shows, from left to right: | 181 | Rows look the same on the Mac and iOS. Each shows: |
| 182 | 182 | ||
| 183 | - The time or status described above, with an icon below it on the Mac and before it on iOS: a calendar for scheduled entries, a flag for deadlines, arrows in a circle for habits, a clock or a calendar for timestamps, and a dot or a calendar for calendar events. An overdue entry shows a warning sign instead, and on the Mac a done entry shows a check mark. | 183 | - On the left, the time or status described above, a timed entry's end under its start, and an icon below: a calendar for scheduled entries, a flag for deadlines, arrows in a circle for habits, a clock or a calendar for timestamps, and a dot for calendar events. An overdue entry shows a warning sign instead, and a done entry a check mark. |
| 184 | - The category, with a colored dot, above the title. For a calendar event this is the calendar's name. | 184 | - Above the title, the category with a colored dot (for a calendar event, the calendar's name), the value of the first statistics cookie (=1/3=, =50%=) and the tags, inherited tags first, as small capsules. The line wraps when they don't fit. At its end are the TODO keyword as a colored badge and the priority as a colored letter in a circle. |
| 185 | - The title: the heading without its TODO keyword, priority cookie, statistics cookies, timestamps and tags, with links shown as their descriptions. A done entry's title is struck through. | 185 | - The title: the heading without its TODO keyword, priority cookie, statistics cookies, timestamps and tags, with links shown as their descriptions. A done entry's title is struck through. |
| 186 | - The value of the first statistics cookie (=1/3=, =50%=) and the tags, inherited tags first, as small capsules. | 186 | - Under the title, the habit's consistency graph, for habits. |
| 187 | - The habit's consistency graph, for habits. | ||
| 188 | - The TODO keyword as a colored badge, and the priority as a colored letter in a circle. | ||
| 189 | 187 | ||
| 190 | The status sets the color of the left column: | 188 | The status sets the color of the left column: |
| 191 | 189 | ||
docs/manual/guide/14-ios.org +1 −1
| @@ -188,7 +188,7 @@ Tap a result to open it in the reader. A heading result opens at that heading. | |||
| 188 | 188 | ||
| 189 | * The agenda | 189 | * The agenda |
| 190 | 190 | ||
| 191 | The Agenda tab shows the agenda over all your folders, with the span and start day from the settings (10 days from 3 days ago by default). Each day lists its entries in rows: the time or a status such as =Due today= or =3d late= on the left, the category and the keyword above the title. Days without entries are hidden, except today. Today's overdue entries are in a section of their own above today, and a line marks the current time between timed entries. Pull down to refresh. | 191 | The Agenda tab shows the agenda over all your folders, with the span and start day from the settings (10 days from 3 days ago by default). Each day lists its entries in rows: the time or a status such as =Due today= or =3d late= on the left, the category, tags and keyword above the title, as on the Mac (see Rows in [[file:07-agenda.org][The agenda]]). Days without entries are hidden, except today. Under today's header, today's overdue entries come first under Overdue, and a line marks the current time between timed entries. Pull down to refresh. |
| 192 | 192 | ||
| 193 | - Views (top left) :: the built-in views and those in =views.toml=, Tags and Properties… (a match such as =+work-home= or ~TODO="WAIT"~), and Search… (a phrase, or snippets such as =+invoice -paid=); Save as View… keeps the match or search showing as a view in =views.toml=. Below them are Go to Date…, Filter… and Select, which picks entries for an action on all of them. | 193 | - Views (top left) :: the built-in views and those in =views.toml=, Tags and Properties… (a match such as =+work-home= or ~TODO="WAIT"~), and Search… (a phrase, or snippets such as =+invoice -paid=); Save as View… keeps the match or search showing as a view in =views.toml=. Below them are Go to Date…, Filter… and Select, which picks entries for an action on all of them. |
| 194 | - Folders (top right, with more than one folder) :: shows or hides each folder's files in the agenda, the widgets, the watch and the badge; the shown folders' names appear under the title. A Focus can hide folders too, and mute their reminders (see Hiding folders in [[file:07-agenda.org][The agenda]]). | 194 | - Folders (top right, with more than one folder) :: shows or hides each folder's files in the agenda, the widgets, the watch and the badge; the shown folders' names appear under the title. A Focus can hide folders too, and mute their reminders (see Hiding folders in [[file:07-agenda.org][The agenda]]). |