From 1fa88d054cac9eb635c19454f5e555fc36a7b546 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Tue, 3 Feb 2026 12:40:18 +0000 Subject: [PATCH] feat(roasts): consolidate table columns and add tasting notes search - Combine Roast/Roaster into single column with roaster as subtext on desktop - Combine Origin/Producer into single column with producer as subtext on desktop - Add Roaster and Producer as separate mobile-only fields for card layout - Replace tasting notes pill badges with comma-separated list - Rename "Notes" column to "Tasting Notes" with right-aligned mobile text - Include tasting_notes in repository search filter columns --- src/infrastructure/repositories/roasts.rs | 1 + templates/partials/roast_list.html | 51 ++++++++++------------- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/src/infrastructure/repositories/roasts.rs b/src/infrastructure/repositories/roasts.rs index df480ab..a909ca3 100644 --- a/src/infrastructure/repositories/roasts.rs +++ b/src/infrastructure/repositories/roasts.rs @@ -264,6 +264,7 @@ impl RoastRepository for SqlRoastRepository { "ro.name", "COALESCE(r.origin,'')", "COALESCE(r.producer,'')", + "COALESCE(r.tasting_notes,'')", ], ) }); diff --git a/templates/partials/roast_list.html b/templates/partials/roast_list.html index 9a390c3..1cae4bd 100644 --- a/templates/partials/roast_list.html +++ b/templates/partials/roast_list.html @@ -16,12 +16,10 @@ - {% call table::sortable_header("Added", "created-at", navigator, "#roast-list") %} {% - call table::sortable_header("Roast", "name", navigator, "#roast-list") %} {% call - table::sortable_header("Roaster", "roaster", navigator, "#roast-list") %} {% call - table::sortable_header("Origin", "origin", navigator, "#roast-list") %} {% call - table::sortable_header("Producer", "producer", navigator, "#roast-list") %} - + {% call table::sortable_header("Added", "created-at", navigator, "#roast-list") %} + {% call table::sortable_header("Roast", "name", navigator, "#roast-list") %} + {% call table::sortable_header("Origin", "origin", navigator, "#roast-list") %} + {% if is_authenticated %} {% endif %} @@ -42,31 +40,28 @@ {{ roast.created_at }} - - - - + + {% if !roast.producer.is_empty() %} + + {% endif %} + {% if is_authenticated %}
NotesTasting NotesActions - + {{ roast.name }} + {{ roast.roaster_label }}{{ roast.origin }}{{ roast.producer }} + {{ roast.roaster_label }} + {{ roast.origin }} + {% if !roast.producer.is_empty() %} + + {% endif %} + {{ roast.producer }} {% if roast.tasting_notes.is_empty() %} - No tasting notes yet. + No tasting notes yet. {% else %} -
    - {% for note in roast.tasting_notes %} -
  • - {{ note }} -
  • - {% endfor %} -
+ {{ roast.tasting_notes.join(", ") }} {% endif %}