1
0
Fork 0

fix(intelligence): grow negative relation meters left of zero

The two meters on a faction dossier shared a centered track, but a negative
score grew to the right and a positive one to the left, so the side a bar sat
on said the opposite of what it meant. Negative now extends left of the zero
line and positive right.

The labels also read badly side by side: "They see us" and "We see them" each
start with the party being looked at, which invites reading them the wrong way
round. "How they see us" and "How we see them" name the direction first.
This commit is contained in:
Jason Fraley 2026-11-20 03:03:29 -05:00
parent fc6fec4a45
commit 7428efe6aa

View file

@ -95,7 +95,7 @@ function RelationMeter({ label, value }: { label: string; value: number }) {
<div className="relative h-1.5 w-full overflow-hidden rounded-full bg-muted">
<div
className={`absolute top-0 h-full ${tone.bar}`}
style={{ left: value < 0 ? "50%" : `${50 - width}%`, width: `${width}%` }}
style={{ left: value < 0 ? `${50 - width}%` : "50%", width: `${width}%` }}
/>
<div className="absolute left-1/2 top-0 h-full w-px bg-border" />
</div>
@ -376,8 +376,8 @@ export default async function FactionDetailPage({ params }: FactionDetailPagePro
<span>{other.name}</span>
</Link>
<div className="grid grid-cols-1 gap-2 sm:grid-cols-2">
<RelationMeter label="They see us" value={inbound} />
<RelationMeter label="We see them" value={outbound} />
<RelationMeter label="How they see us" value={inbound} />
<RelationMeter label="How we see them" value={outbound} />
</div>
</div>
))}