Menu ▾ ▴

#192 fix(audience-lists): replace disruptive blurred modal for "See All Lists" with inline expansion toggle

open
nobody
2026-11-20
2026-11-20
Anonymous
No

Originally created by: sumamakhan761

Problem Description

In the Audience Lists dashboard (apps/web/app/dashboard/[companyId]/audience-lists/components/AudienceListDashboard.tsx), clicking the "See All Lists" button opens a full-screen popup modal with a dark blurred backdrop (fixed inset-0 z-50 bg-slate-900/60 backdrop-blur-xs).

Users are forced to scroll within a small nested container (max-h-96 overflow-y-auto) to find and select their lists, disrupting the flow of the dashboard.

Expected Behavior

  • Clicking "See All Lists" should expand the list items inline directly within the dashboard card.
  • No full-screen overlay, no background blur, and no nested modal scrollbars.
  • Clicking the button again should collapse the view back to show only pinned lists.

Hint & Solution

  1. In AudienceListDashboard.tsx, replace the modal state isAllListsModalOpen with an expansion state:
    tsx const [showAllLists, setShowAllLists] = useState(false);
  2. Compute the displayed lists dynamically:
    tsx const pinnedLists = audienceLists.filter((l) => l.isPinned).slice(0, 4); const displayedLists = showAllLists ? audienceLists : pinnedLists;
  3. Update the header button to toggle showAllLists with ChevronDown and ChevronUp icons:
    tsx {audienceLists.length > 0 && ( <button type="button" onClick={() => setShowAllLists(!showAllLists)} className="inline-flex items-center gap-1 text-xs font-bold text-blue-600 hover:text-blue-800" > {showAllLists ? ( <> <span>Show Pinned Only</span> <ChevronUp size={12} /> </> ) : ( <> <span>See All Lists ({audienceLists.length})</span> <ChevronDown size={12} /> </> )} </button> )}
  4. Render displayedLists.map(...) in the card grid and remove the {isAllListsModalOpen && ( ... )} JSX modal block.

Discussion


Log in to post a comment.