Skip to content

Commit ac556d8

Browse files
peans99claude
andauthored
Map UX pass, Market group filter, and fleet exclusions on Assets (#20)
The map, reworked around one complaint: a search lit dots on a full-width map and left the reader to find them by eye. - Search never filters any more - it highlights. Non-matches recede to a deep dim, matches glow with labels (labels back off above 40 matches so a common ore is not a wall of text), and the view glides to frame the matches, clamped between full-map and the centre-on zoom. - A suggestion list under the search box offers the top place matches by name; clicking one flies to it and opens its detail card. - View changes animate - centre-on, reset, search-fit - and any manual pan or wheel cancels the glide so the map never fights the user. - Instant styled hover tooltip (name, kind, visits) instead of the native title, flipping sides rather than clipping at the frame. - Scenery: a deterministic starfield and dashed orbit rings through each planet, so the disc reads as orbits rather than scattered dots. - The search input is drawn in the HUD's materials, not the browser's. - The map redraws once the market catalogue arrives, so a ?q= link opened cold still resolves a commodity name. Market gains a group dropdown next to the search, built from the groups the catalogue actually uses. Assets gains an Owned tick per fleet ship: the fleet is inferred from the logs, so rentals and ships since sold appear in it - untick them and the totals recompute. Stored per-browser; only the player knows what they own. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 41be5f0 commit ac556d8

3 files changed

Lines changed: 425 additions & 44 deletions

File tree

web/app.css

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,17 +1268,103 @@ body.overlay .slot-card { gap: 9px; }
12681268
body.overlay .slot-icon { flex-basis: 32px; width: 32px; height: 32px; }
12691269
body.overlay .slot-icon svg { width: 19px; height: 19px; }
12701270

1271-
/* ---------- map: commodity highlight, follow, detail card ---------- */
1271+
/* ---------- map: search, highlight, follow, detail card ---------- */
12721272

1273-
/* Commodity mode: sellers glow green, the rest recede but stay for context. */
1274-
.map-node.dim { opacity: .16; }
1273+
/* Search mode: matches glow, the rest recede but stay for context. The dim is
1274+
deep - at .16 the crowd still competed with the answer. */
1275+
.map-node.dim { opacity: .07; }
12751276
.map-node.hl .hl-ring { animation: hl-breathe 2.4s ease-in-out infinite; }
1277+
.map-node.hl .map-label { fill: #a9f5c9; }
12761278

12771279
@keyframes hl-breathe {
12781280
0%, 100% { opacity: .9; }
12791281
50% { opacity: .45; }
12801282
}
12811283

1284+
/* Scenery: deterministic star specks and the orbit rings under each system. */
1285+
.map-star { fill: #cfe9ff; }
1286+
.map-orbit {
1287+
fill: none;
1288+
stroke: rgba(53, 200, 240, .07);
1289+
stroke-width: 1;
1290+
stroke-dasharray: 2 7;
1291+
}
1292+
1293+
/* The search input, in the HUD's own materials rather than the browser's. */
1294+
.map-search-box { position: relative; display: inline-flex; }
1295+
1296+
#map-search {
1297+
background: rgba(8, 18, 30, .9);
1298+
border: 1px solid var(--rule);
1299+
color: var(--text);
1300+
font: inherit;
1301+
font-size: 12px;
1302+
padding: 5px 10px;
1303+
width: 220px;
1304+
outline: none;
1305+
}
1306+
#map-search:focus { border-color: var(--cyan); }
1307+
#map-search::placeholder { color: var(--dim); }
1308+
1309+
/* The suggestion list: top matches by name, click to fly there. */
1310+
.map-results {
1311+
position: absolute;
1312+
top: calc(100% + 3px);
1313+
left: 0;
1314+
min-width: 100%;
1315+
max-width: 320px;
1316+
background: rgba(7, 14, 23, .97);
1317+
border: 1px solid var(--rule-hot);
1318+
z-index: 30;
1319+
box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
1320+
}
1321+
.map-results[hidden] { display: none; }
1322+
1323+
.map-result {
1324+
display: flex;
1325+
width: 100%;
1326+
align-items: baseline;
1327+
justify-content: space-between;
1328+
gap: 14px;
1329+
background: none;
1330+
border: 0;
1331+
border-bottom: 1px solid var(--rule);
1332+
padding: 7px 10px;
1333+
font: inherit;
1334+
font-size: 12px;
1335+
color: var(--text);
1336+
cursor: pointer;
1337+
text-align: left;
1338+
white-space: nowrap;
1339+
}
1340+
.map-result:last-child { border-bottom: 0; }
1341+
.map-result:hover { background: rgba(53, 200, 240, .1); }
1342+
.map-result .name { color: var(--cyan-hot, #7fe4ff); }
1343+
.map-result .where { color: var(--dim); font-size: 11px; }
1344+
1345+
/* The hover tooltip: instant, styled, and never in the pointer's way. */
1346+
.map-tip {
1347+
position: absolute;
1348+
z-index: 25;
1349+
pointer-events: none;
1350+
display: flex;
1351+
flex-direction: column;
1352+
gap: 2px;
1353+
background: rgba(7, 14, 23, .96);
1354+
border: 1px solid var(--rule-hot);
1355+
padding: 7px 10px;
1356+
font-size: 11px;
1357+
max-width: 240px;
1358+
}
1359+
.map-tip[hidden] { display: none; }
1360+
.map-tip strong { color: var(--cyan-hot, #7fe4ff); font-weight: 600; font-size: 12px; }
1361+
1362+
/* ---------- assets: fleet exclusions ---------- */
1363+
1364+
#assets-fleet th.tick, #assets-fleet td.tick { width: 52px; text-align: center; }
1365+
#assets-fleet td.tick input { accent-color: var(--cyan); cursor: pointer; }
1366+
#assets-fleet tr.excluded td:not(.tick) { opacity: .35; text-decoration: line-through; }
1367+
12821368
#map-follow.active {
12831369
color: var(--green);
12841370
border-color: var(--green);

0 commit comments

Comments
 (0)