feat(web): slim the list filters and hide them when empty
At current scale the date-range pickers are dead weight (UX review C1/C2): - Drop the From/To date inputs from the filter bar; keep the Channel field and the "Summarized only" toggle. (Filter still parses from/to for hand-built URLs and apply() compatibility — only the UI is removed.) - Hide the filter bar entirely on a genuinely empty account (no rows AND no active filter) so the connect CTA stands alone; a filter that matches nothing still shows the bar so it can be cleared. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -360,6 +360,22 @@ func TestListCollapsesOlderAndNoCaption(t *testing.T) {
|
||||
require.NotContains(t, html, "No Caption Vid", "caption-less video is collapsed, not a card")
|
||||
}
|
||||
|
||||
// TestListHidesFilterBarWhenEmpty: a genuinely empty list shows no filter bar
|
||||
// (the connect CTA stands alone), but a filter that matches nothing still shows
|
||||
// the bar so it can be cleared (UX review C1).
|
||||
func TestListHidesFilterBarWhenEmpty(t *testing.T) {
|
||||
app := newApp(t)
|
||||
resetDB(t, rawPool(t))
|
||||
|
||||
rec := do(t, app, httptest.NewRequest(http.MethodGet, "/", nil))
|
||||
require.Equal(t, http.StatusOK, rec.Code)
|
||||
require.NotContains(t, body(t, rec), `class="filters"`, "no filter bar on an empty account")
|
||||
|
||||
rec = do(t, app, httptest.NewRequest(http.MethodGet, "/?channel=nope", nil))
|
||||
require.Equal(t, http.StatusOK, rec.Code)
|
||||
require.Contains(t, body(t, rec), `class="filters"`, "filtered-to-empty keeps the bar so it can be cleared")
|
||||
}
|
||||
|
||||
func TestRequestSummarizeQueuesAndRendersCard(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
app := newApp(t)
|
||||
|
||||
Reference in New Issue
Block a user