- {/* While the chart is hovered, its point replaces the line; the chart has no tooltip of its own. */}
- {/* One size throughout, like a sentence: bold numbers, quiet words, dots between. */}
{hovered ? (
<>
@@ -76,7 +74,6 @@ export function ServerActivity({
>
) : (
<>
- {/* Coloured like a server's player count: green with anyone on, red when nobody is. */}
0 ? "text-success" : "text-danger"}
@@ -113,7 +110,7 @@ export function ServerActivity({
onActive={setActive}
formatValue={(value) => String(Math.round(value))}
/>
- {/* Indented by the value labels' width, so the dates sit under the plot's ends; a phone has the labels inside. */}
+ {/* Indented by the value labels' width, so the dates sit under the plot's ends. */}
{edge(points[0]?.at, range)}
{edge(points.at(-1)?.at, range)}
@@ -123,14 +120,12 @@ export function ServerActivity({
);
}
-/** A figure in the line over the chart: the number, then what it counts. */
function Stat({
value,
tone = "text-text",
children,
}: {
value: number;
- /** The number's color class. */
tone?: string;
children: ReactNode;
}) {
diff --git a/web/src/features/servers/ServerRow.tsx b/web/src/features/servers/ServerRow.tsx
index b87476c..390f762 100644
--- a/web/src/features/servers/ServerRow.tsx
+++ b/web/src/features/servers/ServerRow.tsx
@@ -1,7 +1,4 @@
-// One server on the Servers page: a picture of its map, its country's flag, hostname, address, players and a
-// Join link, which phones leave out because they can't open it. On phones it's a card under a banner of the map,
-// with the map's name and the players on it; wider, a compact row with the map as a thumbnail. Staff rows add
-// badges and tools, and show unlisted servers dimmed with a dashed edge.
+// One server on the Servers page: a card on phones, a compact row wider. Staff rows add badges and tools.
import { Check, ImageOff } from "lucide-react";
import type { ReactNode } from "react";
import type { Schemas } from "@/api/client";
@@ -28,7 +25,7 @@ export function ServerRow({
badges?: ReactNode;
/** Staff controls after Join, kept at full strength when the row is dimmed. */
tools?: ReactNode;
- /** Load the map's picture at once and first, not when scrolled near: for the rows on screen from the start. */
+ /** For the first rows, on screen from the start. */
eager?: boolean;
}) {
const address = `${server.ip}:${server.port}`;
@@ -43,8 +40,6 @@ export function ServerRow({
unlisted={unlisted}
className="relative flex flex-col sm:h-full sm:flex-row sm:items-center sm:gap-3 sm:p-3"
>
- {/* Whether the server is up, down the box's left edge: green while it reports in, red once it has gone
- quiet. Left at full strength when the rest of a row is dimmed, since it's the row's status. */}
- {/* On phones the map's name and the players sit on the picture; wider, they have columns of their own. */}
@@ -79,7 +73,6 @@ export function ServerRow({
dim,
)}
>
- {/* Badges that don't fit beside the name wrap under it rather than squeezing it. */}
{/* Only a known country: Flag's placeholder speaks of Steam, which a server has nothing to do with. */}
@@ -88,7 +81,6 @@ export function ServerRow({
{server.hostname}
{server.connected && (
- // Phones have no room for the word, so the badge shrinks to a tick.
@@ -148,10 +137,7 @@ export function ServerRow({
);
}
-/**
- * The map's cover. Always the small file, the banner on a phone too: the large one is about ten times the bytes,
- * a lot for a list, and the map's own page shows it.
- */
+// Always the small file, even for a phone's banner: the large one is about ten times the size.
function MapPicture({
image,
eager,
@@ -170,21 +156,17 @@ function MapPicture({
);
}
return (
- // The API stores each picture at the sizes it's shown at, so there's nothing for Next's resizer to do.
// eslint-disable-next-line @next/next/no-img-element
);
}
-/** A label over the map's picture, see-through and blurring what's behind it so it reads on any picture. */
function OnPicture({ children }: { children: ReactNode }) {
return (
@@ -206,10 +188,7 @@ function MapName({ server }: { server: Server }) {
);
}
-/**
- * Players out of slots while online, else when it was last heard from. `stacked` is the wider row's column,
- * where "Last seen" takes two short lines.
- */
+/** `stacked` is the wider row's column. */
function Players({
server,
stacked = false,
@@ -235,9 +214,6 @@ function Players({
return (
- {/* All bold, so the players and the slots share one height and baseline; only the players are coloured,
- green with someone on, red when it's empty. A hair of space either side of the slash keeps a wide 0
- from crowding it the way a narrow 1 doesn't. */}
0 ? "text-success" : "text-danger"}>
{server.players}
@@ -247,7 +223,6 @@ function Players({
{server.max_slots}
- {/* Left out on a narrow card, where it would cut the map's name short. */}
{!stacked && (
playing
)}
@@ -256,10 +231,7 @@ function Players({
);
}
-/**
- * The row's box, shared with the staff-only row of a server listed before it was ever heard from; `className`
- * lays out what's inside.
- */
+/** The row's box, shared with the staff-only row of a server listed before it was ever heard from. */
export function ServerRowFrame({
unlisted = false,
className,
diff --git a/web/src/features/servers/ServerRows.tsx b/web/src/features/servers/ServerRows.tsx
index f2e5b56..bf7ca1c 100644
--- a/web/src/features/servers/ServerRows.tsx
+++ b/web/src/features/servers/ServerRows.tsx
@@ -80,7 +80,7 @@ function View({
}: {
whitelist: boolean;
hasWhitelist: boolean;
- /** Two rows side by side where they fit; staff rows, with their badges and tools, need the whole width. */
+ /** Staff rows need the whole width for their tools. */
pairs?: boolean;
rows: { address: string; row: ReactNode }[];
}) {
@@ -128,8 +128,6 @@ function Rows({
diff --git a/web/src/ui/Button.tsx b/web/src/ui/Button.tsx
index b2b5038..ac6ae20 100644
--- a/web/src/ui/Button.tsx
+++ b/web/src/ui/Button.tsx
@@ -1,4 +1,4 @@
-// Buttons and button-styled links. One primary action per view; everything else is secondary, soft or ghost.
+// Buttons and button-styled links. One primary action per view; everything else is secondary or ghost.
import { Link } from "./Link";
import type { ComponentProps } from "react";
import { classNames } from "./classNames";
@@ -15,8 +15,7 @@ const variants: Record = {
primary: "bg-accent text-on-accent hover:bg-accent-hover",
secondary:
"border border-border bg-surface text-text hover:border-border-strong hover:bg-surface-raised",
- // A light accent tint, for a small action repeated down a list (a server's Join), where a row of primary
- // buttons would shout and secondary ones would read heavy.
+ // For an action repeated down a list, such as a server's Join.
soft: "border border-accent/30 bg-accent-soft text-accent hover:border-accent/60 hover:bg-accent/20",
// A ghost button that toggles something (a viewer's freecam, a settings popover) shows the accent while on.
ghost:
@@ -24,7 +23,6 @@ const variants: Record = {
};
const sizes: Record = {
- // For an action repeated on every row of a list, such as a server's Join.
xs: "h-6 gap-1 px-2.5 text-xs",
sm: "h-8 gap-1.5 px-3 text-sm",
md: "h-10 gap-2 px-4 text-sm",
diff --git a/web/src/ui/LineChart.tsx b/web/src/ui/LineChart.tsx
index 85be3e2..d21dc6b 100644
--- a/web/src/ui/LineChart.tsx
+++ b/web/src/ui/LineChart.tsx
@@ -35,10 +35,7 @@ export function LineChart({
formatValue: (value: number) => string;
/** Read out for the chart, since it's a picture. */
label: string;
- /**
- * `sm` is a shorter chart, for beside a summary rather than under it. On a phone it drops the column of value
- * labels for the top value alone, above its gridline, so the line gets the card's whole width.
- */
+ /** `sm` is shorter, and on a phone shows only the top value so the line spans the card. */
size?: "sm" | "md";
}) {
if (points.length < 2) return null;
@@ -116,8 +113,6 @@ export function LineChart({
onKeyDown={onKeyDown}
>
{size === "sm" && (
- // Only the top value: it sits above the top gridline, where the line never reaches, so it gives the
- // scale without running into the line the way the lower ones would.
void;
/** Names the group for screen readers. */
label: string;
- /** On a phone, spans its container with the options sharing the width, to line up with what's under it. */
+ /** On a phone, spans its container with the options sharing the width. */
fillOnPhones?: boolean;
className?: string;
}) {
From c2e4db02071a57c6eac20ae7c9116b000ea21549 Mon Sep 17 00:00:00 2001
From: zasbu <136494048+zasbu@users.noreply.github.com>
Date: Fri, 6 Nov 2026 18:52:43 +1100
Subject: [PATCH 8/8] Slightly modified how the servers appear, and made the
players graph a bit more compact to reduce vertical space wasted
---
docs/design-system.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/design-system.md b/docs/design-system.md
index 2bdbec7..ad898a2 100644
--- a/docs/design-system.md
+++ b/docs/design-system.md
@@ -22,7 +22,7 @@ One visual language that every page is built from, so pages can't drift apart. S
|---|---|
| `Page` | Every page's content area; `width` is `wide`, `narrow` (reading) or `fill` (inside a section layout that sets its own width, such as the staff area). Runs the page fade |
| `Link` | Every internal link; never prefetches. Lint blocks importing `next/link` elsewhere |
-| `Button`, `ButtonLink`, `ButtonAnchor` | `primary` (one per view), `secondary` (default), `soft` (a list's repeated action), `ghost`; sizes `xs` (rows), `sm`, `md`. A `ghost` button with `aria-pressed` or `aria-expanded` shows the accent while on. `ButtonAnchor` is for full page loads, such as sign-in |
+| `Button`, `ButtonLink`, `ButtonAnchor` | `primary` (one per view), `secondary` (default), `ghost`; sizes `sm`, `md`. A `ghost` button with `aria-pressed` or `aria-expanded` shows the accent while on. `ButtonAnchor` is for full page loads, such as sign-in |
| `Card`, `Label` | Bordered surface; `interactive` adds the hover lift. `Label` is the small uppercase heading |
| `StatCard` | Headline number with label and icon, counting up, and an optional short detail beside the number (never under it, so cards in a row stay one height). `null` shows a dash |
| `Badge` | Short status: `neutral`, `accent` (WR), `success`, `warning`, `danger` |
@@ -33,13 +33,13 @@ One visual language that every page is built from, so pages can't drift apart. S
| `Table` + `TableHead`/`TableBody`/`TableRow`/`TableHeaderCell`/`TableCell` | Leaderboards and staff lists; `numeric` cells right-align, `wrap` cells let long names wrap. Scrolls sideways inside its frame when too wide |
| `Tabs` | Panels on one page; `underline` or `segmented` |
| `LinkTabs` | Looks like `Tabs`, but each tab is a link: a view the server renders, such as the Maps page's sort |
-| `Segmented` | Looks like segmented `Tabs`, for a choice that changes the view in place (a server's activity range, a post's kind). The chosen option is in the accent; `fillOnPhones` spans phones |
+| `Segmented` | Looks like segmented `Tabs`, for a choice that changes the view in place (a server's activity range, a post's kind). The chosen option is in the accent |
| `ChoiceMenu` | "Label Value ▾": one choice from a list, in a `Menu` of radio items, changing the view in place, or following each option's `href` on a server page. Boards, profiles and the Maps page use a row of them (Style, Track, Runs; Sort, Records in; lead, 2026-10-26); quiet options are dimmed but choosable, disabled ones dimmed and kept in place. On a phone each takes a full row, label left and value right |
| `ChoiceBar` | The row those menus sit in, with any tabs beside them. Every page uses it, so the spacing between choices stays the same everywhere |
| `Pager` | Previous and next under a paged list |
| `DividedList`, `DividedSection` | Rows with lines between them, and a part set off by a line above, inside a `Card` or `Dialog`. The lines run to the surface's edges |
| `StepChart` | A value that changes in steps over time (WR history). Hover snaps a crosshair to the nearest point; points take focus and open their link |
-| `LineChart` | One count over time from zero (players online). Drawn in a fixed box stretched by CSS, so it fills its container before scripts load. Hover, tap or arrow keys pick a point; the parent shows its values. An optional second line (`y2`, gold) shows a part of the first on the same scale (world records among runs). Never two scales on one chart. `size="sm"`: shorter; phones get the top value only |
+| `LineChart` | One count over time from zero (players online). Drawn in a fixed box stretched by CSS, so it fills its container before scripts load. Hover, tap or arrow keys pick a point; the parent shows its values. An optional second line (`y2`, gold) shows a part of the first on the same scale (world records among runs). Never two scales on one chart |
| `TierSpread` | How many maps hold each tier: a donut in tier colors beside each tier's count and share; each slice and row links to that tier's maps, the others dim, and "All" closes the list (Maps page) |
| `Tooltip` | Hint on hover and focus; the child must be focusable |
| `Menu`, `MenuItem`, `MenuLink`, `MenuSeparator` | Menu button (account, mobile sections) |