fix: logic to show BSR improvements (rank drops) in green

This commit is contained in:
Christian Vidal Wolf
2026-03-10 14:04:20 +01:00
parent c15642d62d
commit 74d92b83b5
14 changed files with 924 additions and 1 deletions
+1 -1
View File
@@ -600,7 +600,7 @@ const ExperimentDetailView: React.FC<{
<td className={`py-4 text-sm font-bold flex items-center gap-1 ${isGood ? 'text-emerald-400' : 'text-[#f43f5e]'}`}>
<div className="flex flex-col">
<span className="flex items-center gap-1">
<svg className={`w-3.5 h-3.5 ${isGood ? (res.lift_percent >= 0 ? '' : 'rotate-180') : 'rotate-180'}`} fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={3}><path strokeLinecap="round" strokeLinejoin="round" d="M5 15l7-7 7 7" /></svg>
<svg className={`w-3.5 h-3.5 ${isPositiveGood ? (res.lift_percent >= 0 ? '' : 'rotate-180') : (res.lift_percent <= 0 ? '' : 'rotate-180')}`} fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={3}><path strokeLinecap="round" strokeLinejoin="round" d="M5 15l7-7 7 7" /></svg>
{res.lift_percent >= 0 ? '+' : ''}{res.lift_percent.toFixed(1)}%
</span>
<span className="text-[10px] text-[#64748b] font-medium mt-0.5 ml-1">