Improve frontend UI/UX: accessibility, discoverability, and cleanup
- Add prefers-reduced-motion support (global CSS + SwipeCard spring config) - Add dismissible map click hint overlay with localStorage persistence - Replace generic image alt text with descriptive property info across 4 components - Rename filter buttons to clarify intent (Show Matching Listings / Scrape New from Rightmove) - Fix mobile FAB overlap with bottom sheet via dynamic snap-aware positioning - Add swipe review onboarding overlay with gesture explanations and button labels - Delete unused components: AppSidebar, ActiveQuery, SavedView
This commit is contained in:
parent
268f4fd272
commit
339e2cf2ab
13 changed files with 143 additions and 354 deletions
|
|
@ -86,7 +86,7 @@ function AllPOIDistances({ pois, distances }: { pois: POI[]; distances?: POIDist
|
|||
);
|
||||
}
|
||||
|
||||
function CardCarousel({ photos }: { photos: string[] }) {
|
||||
function CardCarousel({ photos, altText }: { photos: string[]; altText?: string }) {
|
||||
const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true });
|
||||
const [selectedIndex, setSelectedIndex] = useState(0);
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ function CardCarousel({ photos }: { photos: string[] }) {
|
|||
return (
|
||||
<img
|
||||
src={photos[0]}
|
||||
alt="Property"
|
||||
alt={altText || "Property"}
|
||||
className="w-full h-full object-cover"
|
||||
loading="lazy"
|
||||
/>
|
||||
|
|
@ -120,7 +120,7 @@ function CardCarousel({ photos }: { photos: string[] }) {
|
|||
<div key={i} className="flex-[0_0_100%] min-w-0 h-full">
|
||||
<img
|
||||
src={url}
|
||||
alt={`Photo ${i + 1}`}
|
||||
alt={`Property photo ${i + 1}`}
|
||||
className="w-full h-full object-cover"
|
||||
loading="lazy"
|
||||
/>
|
||||
|
|
@ -187,7 +187,10 @@ export function PropertyCard({
|
|||
{/* Photo carousel */}
|
||||
<div className="w-24 h-24 rounded-md overflow-hidden flex-shrink-0 bg-muted">
|
||||
{(property.photos?.length || property.photo_thumbnail) ? (
|
||||
<CardCarousel photos={property.photos?.length ? property.photos : [property.photo_thumbnail]} />
|
||||
<CardCarousel
|
||||
photos={property.photos?.length ? property.photos : [property.photo_thumbnail]}
|
||||
altText={`${property.rooms}-bed, ${property.qm}m², £${property.total_price.toLocaleString()}`}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
|
|
@ -248,7 +251,7 @@ export function PropertyCard({
|
|||
{property.photo_thumbnail && (
|
||||
<img
|
||||
src={property.photo_thumbnail}
|
||||
alt="Property"
|
||||
alt={`${property.rooms}-bed, ${property.qm}m², £${property.total_price.toLocaleString()}`}
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue