Skip to content

Commit 8cd2deb

Browse files
Merge pull request #29 from zasbu/fix/compact-tier-spacing
Keep map summary details close and clarify tier filter states
2 parents 00b655f + 14f924a commit 8cd2deb

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎web/src/features/maps/MapList.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ function MapStatsList({
452452
title
453453
)}
454454
</h2>
455-
<ul className="flex flex-col gap-1 text-sm">
455+
<ul className="flex w-fit max-w-full flex-col gap-1 text-sm">
456456
{maps.map((map) => (
457457
<li key={map.name}>
458458
<Link

‎web/src/ui/TierSpread.tsx‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ const WIDTH = 16;
2020
/** Space between slices, in hundredths of the ring. */
2121
const GAP = 0.6;
2222

23-
/** "All tiers", in the look of the page's filter menus and tier tiles: bordered, raised when it's the choice. */
23+
/** The reset uses the site accent; individual selections use their tier color. */
2424
const allTiersClasses = (chosen: boolean) =>
2525
classNames(
2626
"flex h-7 w-full items-center justify-between gap-2 rounded-sm border px-2 text-sm font-medium transition-colors duration-(--duration-fast)",
2727
chosen
28-
? "bg-surface-raised border-border-strong text-text"
29-
: "border-border text-text-muted hover:text-accent",
28+
? "border-accent/40 bg-accent-soft text-accent hover:border-accent"
29+
: "border-border-strong text-text-muted hover:border-text-muted hover:bg-text/4 hover:text-text",
3030
);
3131

3232
const rowClasses =
33-
"col-span-3 grid grid-cols-subgrid items-center rounded-sm px-2 py-0.5 transition-[opacity,background-color] duration-(--duration-base)";
33+
"col-span-3 grid grid-cols-subgrid items-center rounded-sm px-2 py-0.5 ring-1 ring-inset transition-[background-color,box-shadow] duration-(--duration-fast)";
3434

35-
/** A quiet highlight keeps the tier colors in the badges and chart. */
36-
const chosenTier = "bg-text/8";
35+
/** The inset outline marks selection without moving the compact rows. */
36+
const chosenTier = "bg-(--tier)/10 ring-(--tier)/40";
3737

3838
export function TierSpread({
3939
byTier,
@@ -77,8 +77,9 @@ export function TierSpread({
7777
style={{ "--tier": tierColor(tier, tierCount) } as CSSProperties}
7878
className={classNames(
7979
rowClasses,
80-
selected === tier ? chosenTier : "hover:text-accent",
81-
dimmed(tier) && "opacity-40 hover:opacity-100",
80+
selected === tier
81+
? chosenTier
82+
: "hover:bg-text/4 hover:ring-border-strong ring-transparent",
8283
)}
8384
>
8485
<TierBadge tier={tier} tierCount={tierCount} />
@@ -151,8 +152,7 @@ export function TierSpread({
151152
"flex flex-col items-center gap-1 rounded-md border py-1.5 transition-[opacity,background-color] duration-(--duration-base)",
152153
selected === tier
153154
? "border-(--tier)/50 bg-(--tier)/15"
154-
: "border-border hover:bg-text/4",
155-
dimmed(tier) && "opacity-40",
155+
: "border-border-strong hover:bg-text/4 hover:border-(--tier)/40",
156156
)}
157157
>
158158
<TierBadge tier={tier} tierCount={tierCount} />

0 commit comments

Comments
 (0)