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:
@@ -107,7 +107,9 @@ templ flashBanner(code string) {
|
||||
templ ListPage(b listBuckets, f Filter, stats PipelineStats, flash string, hasConnected bool) {
|
||||
@Layout("Tapir — Summaries") {
|
||||
@flashBanner(flash)
|
||||
@filterForm(f)
|
||||
if !b.empty() || f.active() {
|
||||
@filterForm(f)
|
||||
}
|
||||
if stats.RateLimited > 0 || stats.Pending > 0 || stats.NoText > 0 {
|
||||
@pipelineBar(stats)
|
||||
}
|
||||
@@ -152,8 +154,6 @@ templ filterForm(f Filter) {
|
||||
hx-indicator="#filter-indicator"
|
||||
>
|
||||
<label>Channel <input type="text" name="channel" value={ f.Channel } placeholder="any"/></label>
|
||||
<label>From <input type="date" name="from" value={ f.From }/></label>
|
||||
<label>To <input type="date" name="to" value={ f.To }/></label>
|
||||
<label class="filter-check">
|
||||
<input type="checkbox" name="summarized" value="1" if f.OnlySummarized { checked }/>
|
||||
Summarized only
|
||||
|
||||
Reference in New Issue
Block a user