fix: hoist ranking display toggles out of project side panel
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m35s
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m35s
Balance-juror-grading and factor-advance-votes switches now live as a compact card above the per-category sections on the rankings page, always visible. Hiding them inside the project modal was confusing because flipping them re-sorts the entire list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -814,6 +814,33 @@ export function RankingDashboard({ competitionId: _competitionId, roundId }: Ran
|
||||
</CardHeader>
|
||||
</Card>
|
||||
|
||||
{/* Ranking display toggles — always visible, persist per round */}
|
||||
<Card>
|
||||
<CardContent className="py-3">
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
<div className="flex items-center justify-between gap-4 rounded-lg border p-3">
|
||||
<div className="flex flex-col min-w-0">
|
||||
<span className="text-sm font-medium">Balance juror grading style (score)</span>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
Corrects for harshness on average scores. Off uses raw averages.
|
||||
</span>
|
||||
</div>
|
||||
<Switch checked={useBalanced} onCheckedChange={persistUseBalanced} />
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-4 rounded-lg border p-3">
|
||||
<div className="flex flex-col min-w-0">
|
||||
<span className="text-sm font-medium">Factor advance votes into ranking</span>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
When on, yes/no votes (harshness-corrected) blend with the score via the
|
||||
score/pass-rate weights. When off, the ranking is score-only.
|
||||
</span>
|
||||
</div>
|
||||
<Switch checked={useBalancedPassRate} onCheckedChange={persistUseBalancedPassRate} />
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* Ranking Configuration: criteria text + weights */}
|
||||
<Collapsible open={weightsOpen} onOpenChange={setWeightsOpen}>
|
||||
<Card>
|
||||
@@ -1167,29 +1194,6 @@ export function RankingDashboard({ competitionId: _competitionId, roundId }: Ran
|
||||
</div>
|
||||
) : projectDetail ? (
|
||||
<div className="mt-6 space-y-6">
|
||||
{/* Balanced-ranking toggles (per-round; persist across viewers) */}
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center justify-between rounded-lg border p-3">
|
||||
<div className="flex flex-col">
|
||||
<span className="text-sm font-medium">Balance juror grading style (score)</span>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
Corrects for harshness on average scores. Off uses raw averages.
|
||||
</span>
|
||||
</div>
|
||||
<Switch checked={useBalanced} onCheckedChange={persistUseBalanced} />
|
||||
</div>
|
||||
<div className="flex items-center justify-between rounded-lg border p-3">
|
||||
<div className="flex flex-col">
|
||||
<span className="text-sm font-medium">Factor advance votes into ranking</span>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
When on, yes/no votes (harshness-corrected) blend with the score via the
|
||||
score/pass-rate weights. When off, the ranking is score-only.
|
||||
</span>
|
||||
</div>
|
||||
<Switch checked={useBalancedPassRate} onCheckedChange={persistUseBalancedPassRate} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Project description (collapsible) */}
|
||||
{projectDetail.project.description && (
|
||||
<Collapsible>
|
||||
|
||||
Reference in New Issue
Block a user