Skip to content

Commit dca1579

Browse files
CopilotStan2032
andcommitted
Session 230: Fix 9 broken interactive elements — Education Centre buttons, disabled forms, calendar subscribe, profiles UX
Co-authored-by: Stan2032 <68326386+Stan2032@users.noreply.github.com>
1 parent 859da48 commit dca1579

10 files changed

Lines changed: 29 additions & 22 deletions

_agents/TODO.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Global Anti-CCP Resistance Hub — Active To-Do List
22

3-
> Last Updated: March 7, 2026 (Session 229)
3+
> Last Updated: March 7, 2026 (Session 230)
44
>
55
> **Location:** `_agents/TODO.md` — Active tasks only.
66
> **Completed tasks:** See `_agents/TODO_COMPLETED.md` for full archive.
@@ -53,6 +53,12 @@
5353
5454
- [x] **Visual overlap fixes**: ✅ InteractiveTimeline year labels fixed (Session 222) — adaptive 5-year intervals with min-gap endpoint exclusion, min-w-[540px] for mobile horizontal scroll. Verified zero overlaps at 375px (30px gaps), 768px (52px gaps), 1280px (69px gaps). Remaining audit: check ALL components at zoom levels 100%/125%/150% × viewports 375/768/1280px for any other text overlap or truncation issues. *(Originally reported by human, Session 221)*
5555
- [x] **Placeholder text standardization**: ✅ Session 225 — All 48 placeholder instances across 30 files standardized to `placeholder:text-slate-400` (Tailwind v3+ syntax). Fixed 2 `placeholder-slate-600` violations, converted 19 `placeholder-slate-500` and 9 `placeholder-slate-400` (old syntax). Added 11th design system compliance test preventing reintroduction. Focus colors also standardized: 7 components fixed from non-terminal colors (emerald/green/cyan/amber/red) to terminal palette (`#4afa82`/`#22d3ee`).
56+
- [x] **Non-functional interactive elements audit & fix**: ✅ Session 230 — Full site audit for broken buttons, forms, and misleading UI. Fixed 9 issues across 8 files:
57+
- **EducationalResources.jsx**: "Start Course" button (no onClick) → replaced with "Course content coming soon" notice. Download buttons (no onClick, no URL) → replaced with disabled-style indicators.
58+
- **EventCalendar.jsx**: "Subscribe to Calendar" button (styled active but non-functional) → changed to disabled style with `cursor-not-allowed`.
59+
- **VolunteerSignup.jsx, ContactForm.jsx, NewsDigest.jsx, IncidentReportForm.jsx**: Forms appear fully functional but data goes nowhere when backend not connected → forms now visually disabled (`opacity-50 pointer-events-none`) when no backend, with existing "Coming Soon" warning.
60+
- **ReportSighting.jsx**: Form always non-functional (no backend integration at all) → form content disabled with `opacity-50 pointer-events-none`.
61+
- **ProfilesIndex.jsx**: Unbuilt profile cards look clickable → increased opacity reduction to 50% with `cursor-default`. *(Originally reported by human, Session 230)*
5662

5763
### Navigation Simplification (Session 136)
5864
- [x] **Sidebar nav reduced**: 11 items → 7 items (Dashboard, Intelligence, Political Prisoners, Profiles, Take Action, Education, Security)

src/components/ContactForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const ContactForm = () => {
112112
)}
113113

114114
{/* Form */}
115-
<form onSubmit={handleSubmit} className="space-y-6">
115+
<form onSubmit={handleSubmit} className={`space-y-6 ${!backendConnected ? 'opacity-50 pointer-events-none' : ''}`}>
116116
{/* Name and Email */}
117117
<div className="bg-[#111820]/50 border border-[#1c2a35] p-4">
118118
<h3 className="font-medium text-white mb-4"><MessageCircle className="w-4 h-4 inline mr-1" /> Your Details</h3>

src/components/EventCalendar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ const EventCalendar = () => {
334334
Add these events to your calendar to never miss an important date.
335335
</p>
336336
<div className="flex flex-wrap gap-4">
337-
<button className="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded text-sm transition-colors">
337+
<button disabled className="bg-[#111820] border border-[#1c2a35] text-slate-400 px-4 py-2 rounded text-sm cursor-not-allowed">
338338
Subscribe to Calendar (Coming Soon)
339339
</button>
340340
<button

src/components/IncidentReportForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ const IncidentReportForm = () => {
191191
</div>
192192

193193
{/* Form */}
194-
<form onSubmit={handleSubmit} className="p-6">
194+
<form onSubmit={handleSubmit} className={`p-6 ${!backendConnected ? 'opacity-50 pointer-events-none' : ''}`}>
195195
{/* Step 1: Incident Type */}
196196
{step === 1 && (
197197
<div className="space-y-4">

src/components/NewsDigest.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const NewsDigest = () => {
176176
)}
177177

178178
{/* Subscription Form */}
179-
<form onSubmit={handleSubmit} className="space-y-6">
179+
<form onSubmit={handleSubmit} className={`space-y-6 ${!backendConnected ? 'opacity-50 pointer-events-none' : ''}`}>
180180
{/* Email */}
181181
<div className="bg-[#111820]/50 border border-[#1c2a35] p-4">
182182
<h3 className="font-medium text-white mb-3 flex items-center gap-1"><Mail className="w-4 h-4" /> Email Address</h3>

src/components/ReportSighting.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const ReportSighting = () => {
207207
</div>
208208
</div>
209209

210-
<div className="p-6">
210+
<div className="p-6 opacity-50 pointer-events-none">
211211
<>
212212
{/* Step 1: Select Type */}
213213
{step === 1 && (

src/components/VolunteerSignup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const VolunteerSignup = () => {
158158
)}
159159

160160
{/* Form */}
161-
<form onSubmit={handleSubmit} className="space-y-6">
161+
<form onSubmit={handleSubmit} className={`space-y-6 ${!backendConnected ? 'opacity-50 pointer-events-none' : ''}`}>
162162
{/* Basic Info */}
163163
<div className="bg-[#111820]/50 border border-[#1c2a35] p-4">
164164
<h3 className="font-medium text-white mb-4"><FileText className="w-4 h-4 inline mr-1" /> Basic Information</h3>

src/pages/EducationalResources.jsx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { useState, lazy, Suspense } from 'react'
22
import {
3-
Play,
43
Clock,
54
Download,
6-
Search
5+
Search,
6+
Info
77
} from 'lucide-react'
88
import educationalData from '../data/educational_modules.json'
99

@@ -94,7 +94,7 @@ const EducationalResources = () => {
9494

9595
const ResourceCard = ({ resource }) => (
9696
<div
97-
className="bg-[#111820] border border-[#1c2a35] p-4 hover:border-[#2a9a52] transition-colors"
97+
className="bg-[#111820] border border-[#1c2a35] p-4"
9898
>
9999
<div className="flex items-start justify-between">
100100
<div className="flex-1">
@@ -104,12 +104,13 @@ const EducationalResources = () => {
104104
<span>{resource.size}</span>
105105
</div>
106106
</div>
107-
<button
108-
className="p-2 bg-[#22d3ee] hover:bg-[#22d3ee]/80 transition-colors"
109-
aria-label={`Download ${resource.title}`}
107+
<div
108+
className="p-2 bg-[#111820] border border-[#1c2a35]"
109+
title="Download coming soon"
110+
aria-label={`Download ${resource.title} — coming soon`}
110111
>
111-
<Download className="w-5 h-5 text-white" />
112-
</button>
112+
<Download className="w-5 h-5 text-slate-500" />
113+
</div>
113114
</div>
114115
</div>
115116
)
@@ -256,12 +257,12 @@ const EducationalResources = () => {
256257
</div>
257258
</div>
258259

259-
<button
260-
className="mt-6 w-full bg-[#4afa82]/10 hover:bg-[#4afa82]/20 text-[#4afa82] border border-[#4afa82]/30 px-6 py-3 font-mono font-medium transition-colors flex items-center justify-center space-x-2"
260+
<div
261+
className="mt-6 w-full bg-[#111820] text-slate-400 border border-[#1c2a35] px-6 py-3 font-mono font-medium flex items-center justify-center space-x-2"
261262
>
262-
<Play className="w-5 h-5" />
263-
<span>$ start_course</span>
264-
</button>
263+
<Info className="w-5 h-5" />
264+
<span>Course content coming soon — use the resources below to start learning</span>
265+
</div>
265266
</>
266267
)
267268
})()}

src/pages/profiles/ProfilesIndex.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ const ProfileCard = ({ profile }) => {
299299
const CardWrapper = profile.built ? Link : 'div';
300300
const wrapperProps = profile.built
301301
? { to: profile.path, className: 'group block' }
302-
: { className: 'block opacity-75' };
302+
: { className: 'block opacity-50 cursor-default' };
303303

304304
return (
305305
<CardWrapper {...wrapperProps}>

src/test/EducationalResources.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe('EducationalResources', () => {
122122
expect(screen.getAllByText('Topics Covered').length).toBeGreaterThanOrEqual(2); // stat card + details
123123
expect(screen.getByText('Narrative Techniques')).toBeTruthy();
124124
expect(screen.getByText('Visual Manipulation')).toBeTruthy();
125-
expect(screen.getByText('$ start_course')).toBeTruthy();
125+
expect(screen.getByText(/Course content coming soon/)).toBeTruthy();
126126
});
127127

128128
it('shows downloadable resources', () => {

0 commit comments

Comments
 (0)