Skip to content

Commit 3b132f7

Browse files
committed
feat: enhance citation references in impact analysis component for improved accessibility and clarity
1 parent 0895c53 commit 3b132f7

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/components/impact-analysis.tsx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,28 @@ const ImpactChart: React.FC = () => {
9999
<div key={index} className="card hover:shadow-lg transition-all duration-300">
100100
<h3 className="font-medium text-slate-900 mb-2">
101101
{item.name}
102-
{item.name === 'Moderation Staff' && <sup><a href="#reuters">[1]</a></sup>}
102+
{item.name === 'Moderation Staff' &&
103+
<sup className="citation-ref group relative cursor-pointer">
104+
<span className="text-blue-600">[1]</span>
105+
<span className="citation-popup opacity-0 group-hover:opacity-100 transition-opacity duration-200 absolute -top-16 left-0 bg-white p-3 rounded shadow-lg text-sm w-64 z-50">
106+
[1]Reuters. "Content Moderation Staff Reduction under Musk." Reuters, December 12, 2023.
107+
</span>
108+
</sup>
109+
}
103110
</h3>
104111
<p className="text-3xl font-bold mb-2">
105112
{item.label.split(' ')[0]}
106113
</p>
107114
<p className="text-sm text-slate-600">
108115
{item.label.split(' ')[1]}
109-
{(item.name === 'Issue Reports' || item.name === 'Appeal Success') && <sup><a href="#twitter-transparency">[2]</a></sup>}
116+
{(item.name === 'Issue Reports' || item.name === 'Appeal Success') &&
117+
<sup className="citation-ref group relative cursor-pointer">
118+
<span className="text-blue-600">[2]</span>
119+
<span className="citation-popup opacity-0 group-hover:opacity-100 transition-opacity duration-200 absolute -top-16 left-0 bg-white p-3 rounded shadow-lg text-sm w-64 z-50">
120+
[2]Twitter. "Q4 2022 Transparency Report." Transparency Center, Twitter, December 31, 2022.
121+
</span>
122+
</sup>
123+
}
110124
</p>
111125
</div>
112126
))}
@@ -116,7 +130,13 @@ const ImpactChart: React.FC = () => {
116130
<div className="mt-8 p-6 bg-gradient-to-r from-indigo-50 to-blue-50 rounded-xl border border-indigo-100">
117131
<p className="text-center text-indigo-900 font-medium">
118132
The data reveals a clear shift in platform governance, marked by reduced human oversight
119-
and increased reliance on automated systems, leading to significant changes in moderation outcomes. <sup><a href="#wang">[3]</a></sup>
133+
and increased reliance on automated systems, leading to significant changes in moderation outcomes.
134+
<sup className="citation-ref group relative cursor-pointer">
135+
<span className="text-blue-600">[3]</span>
136+
<span className="citation-popup opacity-0 group-hover:opacity-100 transition-opacity duration-200 absolute -top-16 left-0 bg-white p-3 rounded shadow-lg text-sm w-64 z-50">
137+
[3]Wang, Rui, et al. "Empowered or Constrained in Platform Governance?" Social Media + Society, March 15, 2024.
138+
</span>
139+
</sup>
120140
</p>
121141
</div>
122142
</div>

0 commit comments

Comments
 (0)