From 6b1488994f0b507fa4c423a6e07bb6eaebc7ccd3 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 20 Oct 2026 16:46:08 +0200 Subject: [PATCH] fix(tours): give an actual track its own mark and a winter tile its label's icon Footprints stood for a snowshoe hike, an actual track and a walk's moving time at once, with the snowshoe pill and the track pill side by side in a tour's head. An actual track now goes by the done mark on the list row, in the head and on a recording's tile, and a winter tile's corner takes the icon its head pill shows. --- .../src/components/Tours/TourDetailDialog.test.tsx | 1 + client/src/components/Tours/TourDetailDialog.tsx | 4 ++-- .../Tours/activity/TourActivityBadge.test.tsx | 3 +++ .../Tours/activity/TourActivitySection.test.tsx | 4 ++++ .../Tours/activity/TourActivitySection.tsx | 11 ++++++++--- client/src/components/Tours/tourParts.tsx | 4 ++-- .../components/Tours/winter/winterMarks.test.tsx | 14 +++++++++++++- client/src/components/Tours/winter/winterMarks.tsx | 9 +++++---- 8 files changed, 38 insertions(+), 12 deletions(-) diff --git a/client/src/components/Tours/TourDetailDialog.test.tsx b/client/src/components/Tours/TourDetailDialog.test.tsx index d7e417d2d..cb640484d 100644 --- a/client/src/components/Tours/TourDetailDialog.test.tsx +++ b/client/src/components/Tours/TourDetailDialog.test.tsx @@ -321,6 +321,7 @@ describe('TourDetailDialog', () => { render() expect(screen.getByTestId('tour-detail-track-of')).toHaveTextContent('Actual track of Lake loop') + expect(screen.getByTestId('tour-detail-track-of').querySelector('svg.lucide-check-check')).not.toBeNull() }) it('ACT-02: an actual track stands beside the plan the head shows, and only the map detail offers to compare it there', async () => { diff --git a/client/src/components/Tours/TourDetailDialog.tsx b/client/src/components/Tours/TourDetailDialog.tsx index d779e81d3..4bf4da07d 100644 --- a/client/src/components/Tours/TourDetailDialog.tsx +++ b/client/src/components/Tours/TourDetailDialog.tsx @@ -4,6 +4,7 @@ import { ArrowDown, ArrowUp, Check, + CheckCheck, ChevronDown, ChevronUp, Clock, @@ -13,7 +14,6 @@ import { FileDown, FileImage, FileText, - Footprints, Loader2, Minus, Navigation, @@ -301,7 +301,7 @@ function TourHeadPills({ {documentsName && ( - + {t('tours.activity.ofTour', { name: documentsName })} diff --git a/client/src/components/Tours/activity/TourActivityBadge.test.tsx b/client/src/components/Tours/activity/TourActivityBadge.test.tsx index 0eeae2daf..3e7d21ae2 100644 --- a/client/src/components/Tours/activity/TourActivityBadge.test.tsx +++ b/client/src/components/Tours/activity/TourActivityBadge.test.tsx @@ -11,6 +11,9 @@ describe('TourActivityBadge (ACT-01)', () => { ); expect(screen.getByTestId('tour-activity-badge')).toHaveAttribute('aria-label', 'tours.activity.badgeHint'); + // The done mark, never footprints, which name a snowshoe hike and a walk's moving time. + expect(screen.getByTestId('tour-activity-badge').querySelector('svg.lucide-check-check')).not.toBeNull(); + expect(screen.getByTestId('tour-activity-badge').querySelector('svg.lucide-footprints')).toBeNull(); rerender(); expect(screen.getByTestId('tour-activity-badge')).toHaveAttribute('aria-label', 'tours.activity.isTrackHint'); diff --git a/client/src/components/Tours/activity/TourActivitySection.test.tsx b/client/src/components/Tours/activity/TourActivitySection.test.tsx index 07f9f2496..bab399245 100644 --- a/client/src/components/Tours/activity/TourActivitySection.test.tsx +++ b/client/src/components/Tours/activity/TourActivitySection.test.tsx @@ -102,6 +102,10 @@ describe('TourActivitySection (ACT-01)', () => { expect(screen.getByTestId('tour-activity-compare-time')).toHaveTextContent('tours.activity.noTime'); expect(screen.getByTestId('tour-activity-day')).toHaveTextContent('tours.activity.noDay'); expect(screen.queryByText('tours.activity.recordedOn')).toBeNull(); + // The recording's tile goes by the done mark every actual track has, never footprints. + const head = screen.getByTestId('tour-activity').querySelector('header') as HTMLElement; + expect(head.querySelector('svg.lucide-check-check')).not.toBeNull(); + expect(head.querySelector('svg.lucide-footprints')).toBeNull(); }); it('FE-ACT-SECTION-003: someone who may change the tour links, changes and unlinks; the dialog opens when asked', () => { diff --git a/client/src/components/Tours/activity/TourActivitySection.tsx b/client/src/components/Tours/activity/TourActivitySection.tsx index c22664304..b3d15bb2e 100644 --- a/client/src/components/Tours/activity/TourActivitySection.tsx +++ b/client/src/components/Tours/activity/TourActivitySection.tsx @@ -1,5 +1,5 @@ import type { TourActivity, TourListItem } from '@trek/shared'; -import { CalendarDays, Clock, CloudOff, FileDown, Footprints, Plus, RefreshCw, Unlink } from 'lucide-react'; +import { CalendarDays, CheckCheck, Clock, CloudOff, FileDown, Plus, RefreshCw, Unlink } from 'lucide-react'; import { useMemo } from 'react'; import { useTranslation } from '../../../i18n'; import { useSettingsStore } from '../../../store/settingsStore'; @@ -29,11 +29,16 @@ interface PlanSide { comparison: ActivityComparisonState | null; } -/** The tile of a recording: footprints, with a small dot at its foot that says it was recorded. */ +/** + * The tile of a recording: the done mark every actual track goes by (on the + * list row, in the tour's head and here), with a small dot at its foot that + * says it was recorded. Never footprints, which name a snowshoe hike and a + * walk's moving time. + */ function RecordedTile() { return ( -