From 78f8b334e3a53b66791e8438c3064079fb589e35 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Fri, 19 Dec 2025 21:19:32 -0800 Subject: [PATCH] feat: 2-column grid layout + voice input for walkthrough - Cards now display in 2-column grid on desktop (md:grid-cols-2) - Wider container (max-w-4xl) for better desktop layout - Voice input button on notes fields using Web Speech API - Tap mic to dictate notes hands-free, tap again to stop --- frontend/src/pages/DailyWalkthroughPage.tsx | 92 ++++++++++++++++----- 1 file changed, 70 insertions(+), 22 deletions(-) diff --git a/frontend/src/pages/DailyWalkthroughPage.tsx b/frontend/src/pages/DailyWalkthroughPage.tsx index 6935469..f1aff46 100644 --- a/frontend/src/pages/DailyWalkthroughPage.tsx +++ b/frontend/src/pages/DailyWalkthroughPage.tsx @@ -4,7 +4,7 @@ import { settingsApi, WalkthroughSettings } from '../lib/settingsApi'; import { walkthroughApi, ReservoirCheckData, IrrigationCheckData, PlantHealthCheckData, Walkthrough } from '../lib/walkthroughApi'; import { Check, Loader2, Droplets, Sprout, Bug, ArrowLeft, - Camera, X, Minus, Plus, ChevronDown, ChevronUp, Upload, CheckCircle2, Clock + Camera, X, Minus, Plus, ChevronDown, ChevronUp, Upload, CheckCircle2, Clock, Mic, MicOff } from 'lucide-react'; import { useToast } from '../context/ToastContext'; import { cn } from '../lib/utils'; @@ -239,7 +239,7 @@ export default function DailyWalkthroughPage() {
{/* Header - fixed with progress */}
-
+
@@ -271,7 +271,7 @@ export default function DailyWalkthroughPage() {
{/* Sections */} -
+
{/* Reservoirs */} {settings?.enableReservoirs !== false && (
toggleSection('reservoirs')} > -
+
{TANKS.map(tank => ( toggleSection('irrigation')} > -
+
{ZONES.map(zone => ( toggleSection('plantHealth')} > -
+
{HEALTH_ZONES.map(zone => ( -
+
+
+ ); +} + // Reservoir card - large touch targets function ReservoirCard({ tank, data, onChange }: { tank: { name: string; type: 'VEG' | 'FLOWER' }; @@ -525,14 +585,8 @@ function ReservoirCard({ tank, data, onChange }: {
- {/* Notes */} - setNotes(e.target.value)} - placeholder="Notes (optional)" - className="input w-full py-3" - /> + {/* Notes with voice */} + {/* Photo */} @@ -728,13 +782,7 @@ function HealthCard({ zoneName, data, onChange }: { {/* Notes + Photo for issues */} {(health !== 'GOOD' || pests) && ( <> - setNotes(e.target.value)} - placeholder="Describe issue..." - className="input w-full py-3" - /> + )}