From 68889af9c215c239a652856742e9cdccf18ddf20 Mon Sep 17 00:00:00 2001 From: Richie Date: Thu, 2 Apr 2026 10:35:28 +1100 Subject: [PATCH] Add UnverifiedPackageT2/T3 pages, FuneralFinder pre-planning timeframe, PackageDetail variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - UnverifiedPackageT3: package step for unverified providers (no image, estimated pricing disclaimer, "Make an enquiry" CTA, nearby verified providers section) - UnverifiedPackageT2: same but with "Itemised Pricing Unavailable" notice replacing the line-item breakdown - PackageDetail: new props — arrangeLabel, priceDisclaimer, itemizedUnavailable - FuneralFinderV3: pre-planning follow-up question ("How soon might you need this?"), responsive sizing fixes, compulsory validation - HomePage: fix finder container width (flex stretch + 500px cap) - .gitignore: exclude Claude/Playwright artifacts, working docs, screenshots Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 16 + .../FuneralFinder/FuneralFinderV3.tsx | 124 ++++++- .../organisms/PackageDetail/PackageDetail.tsx | 103 +++++- src/components/pages/HomePage/HomePage.tsx | 3 +- .../UnverifiedPackageT2.stories.tsx | 206 +++++++++++ .../UnverifiedPackageT2.tsx | 318 +++++++++++++++++ .../pages/UnverifiedPackageT2/index.ts | 2 + .../UnverifiedPackageT3.stories.tsx | 249 +++++++++++++ .../UnverifiedPackageT3.tsx | 333 ++++++++++++++++++ .../pages/UnverifiedPackageT3/index.ts | 2 + 10 files changed, 1320 insertions(+), 36 deletions(-) create mode 100644 src/components/pages/UnverifiedPackageT2/UnverifiedPackageT2.stories.tsx create mode 100644 src/components/pages/UnverifiedPackageT2/UnverifiedPackageT2.tsx create mode 100644 src/components/pages/UnverifiedPackageT2/index.ts create mode 100644 src/components/pages/UnverifiedPackageT3/UnverifiedPackageT3.stories.tsx create mode 100644 src/components/pages/UnverifiedPackageT3/UnverifiedPackageT3.tsx create mode 100644 src/components/pages/UnverifiedPackageT3/index.ts diff --git a/.gitignore b/.gitignore index 9bc046e..6293d49 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,19 @@ tokens/export/ .env.* .DS_Store *.tgz + +# Claude / Playwright artifacts +.playwright-mcp/ +.claude/ + +# Build logs +build-storybook.log + +# Working docs (not for sharing) +documentation/ +DESIGN.md +venue-services-snapshot.md +temp-db/ + +# Root-level screenshots +/*.png diff --git a/src/components/organisms/FuneralFinder/FuneralFinderV3.tsx b/src/components/organisms/FuneralFinder/FuneralFinderV3.tsx index c42ea8a..2052bb8 100644 --- a/src/components/organisms/FuneralFinder/FuneralFinderV3.tsx +++ b/src/components/organisms/FuneralFinder/FuneralFinderV3.tsx @@ -14,6 +14,7 @@ import { Divider } from '../../atoms/Divider'; // ─── Types ─────────────────────────────────────────────────────────────────── type Status = 'immediate' | 'preplanning'; +type Timeframe = 'soon' | 'future'; type FuneralType = | 'cremation-funeral' | 'cremation-only' @@ -26,6 +27,8 @@ type FuneralType = export interface FuneralFinderV3SearchParams { /** User's current situation */ status: Status; + /** Pre-planning timeframe — only present when status is 'preplanning' */ + timeframe?: Timeframe; /** Type of funeral selected (defaults to show-all if not chosen) */ funeralType: FuneralType; /** Suburb or postcode */ @@ -61,6 +64,11 @@ const STATUS_OPTIONS: { key: Status; title: string; description: string }[] = [ }, ]; +const TIMEFRAME_OPTIONS: { key: Timeframe; label: string }[] = [ + { key: 'soon', label: 'In the coming weeks or months' }, + { key: 'future', label: 'No set timeframe, I\u2019m planning ahead' }, +]; + const FUNERAL_TYPE_OPTIONS: { value: FuneralType; label: string }[] = [ { value: 'cremation-funeral', label: 'Cremation with funeral' }, { @@ -150,23 +158,26 @@ const StatusCard = React.forwardRef< sx={{ fontWeight: 600, display: 'block', - mb: 0.75, + fontSize: { xs: '0.875rem', sm: '1rem' }, + mb: description ? 0.75 : 0, color: selected ? 'var(--fa-color-text-brand, #B0610F)' : 'text.primary', }} > {title} - - {description} - + {description && ( + + {description} + + )} )); StatusCard.displayName = 'StatusCard'; @@ -195,9 +206,9 @@ const fieldBaseSx = { }; const fieldInputStyles = { - py: '14px', + py: '12px', px: 2, - fontSize: '1rem', + fontSize: '0.9375rem', fontFamily: 'var(--fa-font-family-body)', }; @@ -256,10 +267,12 @@ export const FuneralFinderV3 = React.forwardRef('immediate'); + const [timeframe, setTimeframe] = React.useState(''); const [funeralType, setFuneralType] = React.useState(''); const [location, setLocation] = React.useState(''); const [errors, setErrors] = React.useState<{ status?: boolean; + timeframe?: boolean; location?: boolean; }>({}); @@ -290,6 +303,8 @@ export const FuneralFinderV3 = React.forwardRef o.key === status) : 0; @@ -305,10 +320,18 @@ export const FuneralFinderV3 = React.forwardRef { + setStatus(key); + if (key !== 'preplanning') setTimeframe(''); + if (errors.timeframe) setErrors((prev) => ({ ...prev, timeframe: false })); + }; + // ─── Handlers ──────────────────────────────────────────── const handleFuneralType = (e: SelectChangeEvent) => { setFuneralType(e.target.value as FuneralType); @@ -323,6 +346,14 @@ export const FuneralFinderV3 = React.forwardRef @@ -404,7 +437,7 @@ export const FuneralFinderV3 = React.forwardRef setStatus(opt.key)} + onClick={() => handleStatusClick(opt.key)} tabIndex={i === activeStatusIndex ? 0 : -1} onKeyDown={handleStatusKeyDown} /> @@ -425,6 +458,63 @@ export const FuneralFinderV3 = React.forwardRef )} + + {/* ── Timeframe follow-up (pre-planning only) ────────── */} + {isPrePlanning && ( + + How Soon Might You Need This? + + {TIMEFRAME_OPTIONS.map((opt) => ( + { + setTimeframe(opt.key); + if (errors.timeframe) setErrors((prev) => ({ ...prev, timeframe: false })); + }} + /> + ))} + + + {errors.timeframe && ( + + Please select a timeframe + + )} + + + )} {/* ── Funeral Type ────────────────────────────────────── */} diff --git a/src/components/organisms/PackageDetail/PackageDetail.tsx b/src/components/organisms/PackageDetail/PackageDetail.tsx index 7737e54..a3e99db 100644 --- a/src/components/organisms/PackageDetail/PackageDetail.tsx +++ b/src/components/organisms/PackageDetail/PackageDetail.tsx @@ -1,5 +1,6 @@ import React from 'react'; import Box from '@mui/material/Box'; +import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'; import type { SxProps, Theme } from '@mui/material/styles'; import { Typography } from '../../atoms/Typography'; import { Button } from '../../atoms/Button'; @@ -50,6 +51,12 @@ export interface PackageDetailProps { arrangeDisabled?: boolean; /** Whether the compare button is in loading state */ compareLoading?: boolean; + /** Custom label for the arrange CTA button (default: "Make Arrangement") */ + arrangeLabel?: string; + /** Disclaimer shown below the price (e.g. for unverified/estimated pricing) */ + priceDisclaimer?: string; + /** When true, replaces the itemised breakdown with an "Itemised Pricing Unavailable" notice */ + itemizedUnavailable?: boolean; /** MUI sx prop for the root element */ sx?: SxProps; } @@ -116,6 +123,9 @@ export const PackageDetail = React.forwardRef + {/* Price disclaimer */} + {priceDisclaimer && ( + + + + {priceDisclaimer} + + + )} + {/* CTA buttons */} - Make Arrangement + {arrangeLabel} {onCompare && (