fix: show the overview filter summary only when filters are active

The Issues and Pull Requests overviews pinned a centered "Open"
caption below the title even in the default state, duplicating the
filter icon. Show the summary only when a non-default state or
involvement scope is selected, so the default view carries no extra
chrome and the strip becomes a clear signal that the list is filtered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
systemBlue 2026-06-02 18:53:36 -04:00
parent b0f50eca38
commit 3aaaa68f96

View file

@ -144,13 +144,15 @@ struct SearchableOverviewView<Row: View, Detail: View, CreateView: View>: View {
}
.listStyle(.insetGrouped)
.safeAreaInset(edge: .top) {
Text(filterSummaryText)
.font(.caption)
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.padding(.vertical, 6)
.accessibilityIdentifier("filter-summary")
if hasNonDefaultFilters {
Text(filterSummaryText)
.font(.caption)
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.padding(.vertical, 6)
.accessibilityIdentifier("filter-summary")
}
}
}