1
0
Fork 0

chore(frontend): move command-chain chevron into a full-width centered rule

Replace the header chevron button with a full-width rule and a
centered toggle between the description and the player list.
This commit is contained in:
Jason Fraley 2026-11-02 15:42:09 -05:00
parent c0538f902c
commit 9aa6a5c0ef

View file

@ -110,32 +110,35 @@ export function MissionCommandChainEditor({
return ( return (
<Collapsible open={contentOpen} onOpenChange={setContentOpen}> <Collapsible open={contentOpen} onOpenChange={setContentOpen}>
<Card> <Card>
<CardHeader> <CardHeader className="flex flex-col gap-2">
<CardTitle className="flex flex-wrap items-center justify-between gap-2 text-base"> <CardTitle className="flex items-center gap-2 text-base">
<div className="flex items-center gap-2"> <Badge variant="outline">
<CollapsibleTrigger asChild> {mode === "stored" ? "Override" : mode === "legacy" ? "Legacy" : "Defaults"}
<Button </Badge>
variant="ghost"
size="sm"
className="h-7 w-7 p-0 text-muted-foreground hover:text-foreground"
aria-label={contentOpen ? "Collapse command chain" : "Expand command chain"}
>
<ChevronDown
aria-hidden
className={cn("h-4 w-4 transition-transform", contentOpen && "rotate-180")}
/>
</Button>
</CollapsibleTrigger>
<Badge variant="outline">
{mode === "stored" ? "Override" : mode === "legacy" ? "Legacy" : "Defaults"}
</Badge>
</div>
</CardTitle> </CardTitle>
<CardDescription> <CardDescription>
Who was in command of whom for this operation only. Permanent assignments are not Who was in command of whom for this operation only. Permanent assignments are not
changed. Supervisors may rate their subordinate as a command review. changed. Supervisors may rate their subordinate as a command review.
</CardDescription> </CardDescription>
</CardHeader> </CardHeader>
<CollapsibleTrigger asChild>
<div
className="relative mx-2 mt-1 mb-5 flex cursor-pointer items-center outline-none focus-visible:ring-1 focus-visible:ring-ring"
aria-label={contentOpen ? "Collapse command chain" : "Expand command chain"}
>
<span className="block h-px flex-1 border-t border-border" />
<ChevronDown
aria-hidden
className={cn(
"h-4 w-4 text-muted-foreground transition-transform hover:text-foreground",
contentOpen && "rotate-180",
)}
/>
<span className="block h-px flex-1 border-t border-border" />
</div>
</CollapsibleTrigger>
<CollapsibleContent className="overflow-hidden"> <CollapsibleContent className="overflow-hidden">
<CardContent className="flex flex-col gap-4"> <CardContent className="flex flex-col gap-4">
{mode === "legacy" && ( {mode === "legacy" && (