From 39598c1709594df39b54ec03b3435cf0eb0c59dd Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Tue, 3 Feb 2026 12:40:35 +0000 Subject: [PATCH] fix(search): keep search bar visible when search returns no results - Change empty state condition to also check navigator.has_search() - Show "No X match your search" message inside the table container - Applied to roast, roaster, and gear list templates --- templates/partials/gear_list.html | 5 ++++- templates/partials/roast_list.html | 5 ++++- templates/partials/roaster_list.html | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/templates/partials/gear_list.html b/templates/partials/gear_list.html index c4d4cf2..a293569 100644 --- a/templates/partials/gear_list.html +++ b/templates/partials/gear_list.html @@ -1,7 +1,7 @@ {% import "partials/table.html" as table %}
- {% if gear.items.is_empty() %} + {% if gear.items.is_empty() && !navigator.has_search() %}

No gear found.

{% if is_authenticated %} @@ -64,6 +64,9 @@
+ {% if gear.items.is_empty() %} +
No gear matches your search.
+ {% endif %} {% call table::pagination_header(gear, navigator, "#gear-list") %} {% if gear.has_next() %} diff --git a/templates/partials/roast_list.html b/templates/partials/roast_list.html index 1cae4bd..cb91aa3 100644 --- a/templates/partials/roast_list.html +++ b/templates/partials/roast_list.html @@ -1,7 +1,7 @@ {% import "partials/table.html" as table %}
- {% if roasts.items.is_empty() %} + {% if roasts.items.is_empty() && !navigator.has_search() %}
@@ -88,6 +88,9 @@
+ {% if roasts.items.is_empty() %} +
No roasts match your search.
+ {% endif %} {% call table::pagination_header(roasts, navigator, "#roast-list") %} {% if roasts.has_next() %} diff --git a/templates/partials/roaster_list.html b/templates/partials/roaster_list.html index 418d645..4f0e5fe 100644 --- a/templates/partials/roaster_list.html +++ b/templates/partials/roaster_list.html @@ -1,7 +1,7 @@ {% import "partials/table.html" as table %}
- {% if roasters.items.is_empty() %} + {% if roasters.items.is_empty() && !navigator.has_search() %}
@@ -100,6 +100,9 @@
+ {% if roasters.items.is_empty() %} +
No roasters match your search.
+ {% endif %} {% call table::pagination_header(roasters, navigator, "#roaster-list") %} {% if roasters.has_next() %}