From 910aef78b5383ab5eb5b84ca5e232e2aedab444b Mon Sep 17 00:00:00 2001 From: Aidan Dona Date: Wed, 7 Oct 2026 17:03:53 -0500 Subject: [PATCH] Region list: a closed row previews its featured cards, faded, with a Show featured button The preview is the top of the cards fading out (a mask, so it works over the backdrop in both modes); it's inert and hidden from screen readers, and the button opens the row, moving focus to its toggle. Co-Authored-By: Claude Opus 5.5 --- src/index.css | 10 +++++++ src/pages/sections/OrgList-Vertical.tsx | 35 +++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/index.css b/src/index.css index bfa7216..2e71197 100644 --- a/src/index.css +++ b/src/index.css @@ -630,6 +630,16 @@ iframe[src*="churchcenter"] { transition: transform 200ms ease; } +/* A closed region row's featured cards: the top of them, fading out + into whatever is behind (a mask, not a painted gradient, so it + works over the page backdrop in both modes). */ +.ol-peek { + max-height: 9rem; + overflow: hidden; + opacity: 0.85; + mask-image: linear-gradient(to bottom, black 20%, transparent); +} + @media (prefers-reduced-motion: reduce) { .ol-panel, .ol-chevron { diff --git a/src/pages/sections/OrgList-Vertical.tsx b/src/pages/sections/OrgList-Vertical.tsx index 6a66aab..a32e47d 100644 --- a/src/pages/sections/OrgList-Vertical.tsx +++ b/src/pages/sections/OrgList-Vertical.tsx @@ -1,5 +1,5 @@ -import { ArrowUpRight, CaretRight } from '@phosphor-icons/react'; -import { useId, useState } from "react"; +import { ArrowUpRight, CaretDown, CaretRight } from '@phosphor-icons/react'; +import { useId, useRef, useState } from "react"; import { Link } from "react-router-dom"; import ArrowLink from "../../components/ArrowLink.tsx"; import FeaturedCards from "../../components/FeaturedCards.tsx"; @@ -84,6 +84,7 @@ function OrgMark({ org, color }) { function OrgRow({ org, pageLabel, siteLabel, titled }) { const [open, setOpen] = useState(false); const panelId = useId(); + const toggleRef = useRef(null); const reading = useReadingMode(); // Under a block title the names are a level below it. const Name = titled ? "h4" : "h3"; @@ -120,6 +121,7 @@ function OrgRow({ org, pageLabel, siteLabel, titled }) { ) : ( + + )} + {/* 0fr → 1fr animates to the panel's real height, so nobody has to guess a max-height that's wrong the moment a description grows. */}