Website: the hub (/hub) with the roadmap, a Simple / Technical switch and live states
playhorizon.dev/hub is the public entry point to what is happening on Horizon. Overview: where Horizon is, the 3 to 5 things in focus, what is next, what shipped last, how to help. Roadmap: Now / Next / Later / Help wanted / Shipped, filtered by area, every item with its issues and pull requests in their GitHub state (baked at build, refreshed in the browser). Contribute: good first tasks, claiming, connecting an agent to Kira, the rules. A Simple / Technical switch swaps every item's plain and dev text and is remembered. /roadmap redirects to the Roadmap tab. tools/roadmap.py build now also writes website/data/roadmap.json, which the site reads and serves at /hub/roadmap.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-3
@@ -1,5 +1,6 @@
|
||||
import copy
|
||||
import datetime
|
||||
import json
|
||||
import tomllib
|
||||
import unittest
|
||||
from unittest import mock
|
||||
@@ -77,9 +78,15 @@ class RepositoryRoadmap(unittest.TestCase):
|
||||
def test_the_roadmap_keeps_its_rules(self):
|
||||
self.assertEqual(roadmap.validate(roadmap.load()), [])
|
||||
|
||||
def test_roadmap_md_is_generated_from_the_toml(self):
|
||||
self.assertEqual(roadmap.OUTPUT.read_text(), roadmap.render(roadmap.load()),
|
||||
"ROADMAP.md is out of date: run `python3 tools/roadmap.py build`")
|
||||
def test_generated_files_match_the_toml(self):
|
||||
for path, text in roadmap.outputs(roadmap.load()).items():
|
||||
self.assertEqual(path.read_text(), text, f"{path.name} is out of date: run `python3 tools/roadmap.py build`")
|
||||
|
||||
def test_site_data_has_every_item_in_one_line_text(self):
|
||||
data = json.loads(roadmap.site_data(tomllib.loads(SAMPLE)))
|
||||
self.assertEqual([item["id"] for item in data["items"]], ["fast", "faster", "fastest", "old"])
|
||||
self.assertEqual(data["items"][0]["dev"], "Multiply, not divide (#10).")
|
||||
self.assertEqual(data["areas"], [{"id": "performance", "name": "Performance"}])
|
||||
|
||||
|
||||
class Rules(unittest.TestCase):
|
||||
|
||||
+36
-10
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Horizon's roadmap: roadmap/roadmap.toml is the source, ROADMAP.md is generated from it.
|
||||
|
||||
python3 tools/roadmap.py build write ROADMAP.md
|
||||
python3 tools/roadmap.py build --check fail when ROADMAP.md is out of date (CI)
|
||||
python3 tools/roadmap.py build write ROADMAP.md and website/data/roadmap.json
|
||||
python3 tools/roadmap.py build --check fail when either is out of date (CI)
|
||||
python3 tools/roadmap.py check --offline the file's own rules (CI)
|
||||
python3 tools/roadmap.py check the same, then GitHub: links resolve, no stale Now item
|
||||
python3 tools/roadmap.py sync [--dry-run] items whose pull requests all merged become shipped,
|
||||
@@ -28,6 +28,8 @@ from pathlib import Path
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
SOURCE = ROOT / "roadmap" / "roadmap.toml"
|
||||
OUTPUT = ROOT / "ROADMAP.md"
|
||||
# What the website's hub reads (website/build.mjs), and serves at /hub/roadmap.json for Kira and others.
|
||||
SITE_DATA = ROOT / "website" / "data" / "roadmap.json"
|
||||
REPO = "ludovic111/horizon"
|
||||
SITE = "https://playhorizon.dev/hub"
|
||||
|
||||
@@ -227,6 +229,27 @@ def render(data):
|
||||
return "\n".join(out) + "\n"
|
||||
|
||||
|
||||
def site_data(data):
|
||||
"""website/data/roadmap.json: the items as the hub and Kira read them, in the file's order."""
|
||||
keys = ("id", "title", "status", "area", "plain", "dev", "links", "focus", "ongoing", "shipped_in", "post")
|
||||
out = {
|
||||
"format": "horizon-roadmap",
|
||||
"version": 1,
|
||||
"source": "roadmap/roadmap.toml",
|
||||
"overview": {key: " ".join(value.split()) for key, value in data["overview"].items()},
|
||||
"statuses": [{"id": key, "name": name} for key, name in STATUSES.items()],
|
||||
"areas": [{"id": key, "name": name} for key, name in areas_in_order(data)],
|
||||
"items": [{key: (" ".join(item[key].split()) if isinstance(item[key], str) else item[key])
|
||||
for key in keys if key in item} for item in data.get("item", [])],
|
||||
}
|
||||
return json.dumps(out, indent=1, ensure_ascii=False) + "\n"
|
||||
|
||||
|
||||
def outputs(data):
|
||||
"""Every generated file and its content."""
|
||||
return {OUTPUT: render(data), SITE_DATA: site_data(data)}
|
||||
|
||||
|
||||
# --- GitHub ---------------------------------------------------------------------------------------------------
|
||||
|
||||
def token():
|
||||
@@ -466,13 +489,15 @@ def command_build(args):
|
||||
problems = validate(data)
|
||||
if problems:
|
||||
return report(problems)
|
||||
markdown = render(data)
|
||||
files = outputs(data)
|
||||
if args.check:
|
||||
if not OUTPUT.exists() or OUTPUT.read_text() != markdown:
|
||||
return report(["ROADMAP.md is out of date: run `python3 tools/roadmap.py build`"])
|
||||
return 0
|
||||
OUTPUT.write_text(markdown)
|
||||
print(f"roadmap: wrote {OUTPUT.relative_to(ROOT)}")
|
||||
stale = [path for path, text in files.items() if not path.exists() or path.read_text() != text]
|
||||
return report([f"{path.relative_to(ROOT)} is out of date: run `python3 tools/roadmap.py build`"
|
||||
for path in stale])
|
||||
for path, text in files.items():
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(text)
|
||||
print(f"roadmap: wrote {path.relative_to(ROOT)}")
|
||||
return 0
|
||||
|
||||
|
||||
@@ -505,8 +530,9 @@ def command_sync(args):
|
||||
if len(new.get("item", [])) != len(data.get("item", [])) or validate(new):
|
||||
return report(["sync produced an invalid file; nothing written"] + validate(new))
|
||||
SOURCE.write_text(text)
|
||||
OUTPUT.write_text(render(new))
|
||||
print("roadmap: wrote roadmap/roadmap.toml and ROADMAP.md")
|
||||
for path, content in outputs(new).items():
|
||||
path.write_text(content)
|
||||
print("roadmap: wrote roadmap/roadmap.toml, ROADMAP.md and website/data/roadmap.json")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
+4
-1
@@ -33,9 +33,12 @@
|
||||
rewrite /privacy /privacy.html
|
||||
rewrite /releases /releases.html
|
||||
rewrite /benchmarks /benchmarks.html
|
||||
rewrite /hub /hub.html
|
||||
# The roadmap is the hub's Roadmap tab.
|
||||
redir /roadmap /hub#roadmap permanent
|
||||
@doc path_regexp doc ^/docs/([a-z-]+)$
|
||||
rewrite @doc /docs/{re.doc.1}.html
|
||||
@pages path / /index.html /404.html /privacy.html /releases /releases.html /benchmarks /benchmarks.html /benchmarks.json /docs /docs/* /sitemap.xml
|
||||
@pages path / /index.html /404.html /privacy.html /releases /releases.html /benchmarks /benchmarks.html /benchmarks.json /hub /hub.html /hub/* /docs /docs/* /sitemap.xml
|
||||
header @pages Cache-Control "no-cache"
|
||||
@legal path /LEGAL.md /fonts/*.txt
|
||||
header @legal Content-Type "text/plain; charset=utf-8"
|
||||
|
||||
@@ -25,6 +25,7 @@ src/404.html the not-found page
|
||||
src/privacy.html what the launcher can send when players allow it, retention, deletion (/privacy)
|
||||
src/releases.html every release, newest first, with what it adds and fixes, its notes and downloads (/releases)
|
||||
src/benchmarks.html Horizon against vanilla 26.3 on our machines, the hardware picker, players' results (/benchmarks)
|
||||
src/hub.html the hub (/hub, /roadmap redirects to its Roadmap tab): Overview, Roadmap, Contribute, a Simple / Technical switch
|
||||
src/docs.html the template of every documentation page (/docs/...), with its left navigation
|
||||
src/tokens.css the design tokens, generated from crates/horizon-theme (do not edit)
|
||||
src/style.css every style, on top of the tokens
|
||||
@@ -39,6 +40,9 @@ src/estimate.js estimates for unmeasured hardware from the nearest measured m
|
||||
src/markdown.js a small Markdown renderer (escapes everything), shared by build and page
|
||||
src/releases.js the home page's "Recently added" and the Releases page's markup, shared by build and page
|
||||
src/contributors.js the contributors' filtering and markup, shared by build and page
|
||||
src/hub.js the hub's markup from data/roadmap.json and GitHub's issue states, shared by build and page
|
||||
src/hub-page.js the hub page: tabs by #hash, the Simple / Technical switch (localStorage), the area filter, live states
|
||||
data/roadmap.json the roadmap, generated by tools/roadmap.py from roadmap/roadmap.toml (do not edit); served at /hub/roadmap.json
|
||||
public/ fonts, screenshots, icons, og.png, robots.txt, benchmarks.json: copied as is (sitemap.xml is written by the build)
|
||||
data/benchmarks/ our raw benchmark reports (tools/perf_bench.py) and fleet.json, the list scripts/benchmarks.mjs reads
|
||||
scripts/benchmarks.mjs benchmark reports -> public/benchmarks.json (ours, and players' groups of 3+ installs)
|
||||
|
||||
+57
-7
@@ -16,6 +16,7 @@ import { machinesHtml, playersHtml } from "./src/bench.js";
|
||||
import { CPUS, GPUS, singleThread } from "./src/hardware.js";
|
||||
import { isGame, isLauncher, launcherVersion, newestFirst } from "./src/versions.js";
|
||||
import { contributorsFrom, contributorsHtml } from "./src/contributors.js";
|
||||
import { areaFilterHtml, helpWantedHtml, overviewHtml, roadmapHtml, slimIssue } from "./src/hub.js";
|
||||
|
||||
const site = dirname(fileURLToPath(import.meta.url));
|
||||
const dist = join(site, "dist");
|
||||
@@ -77,6 +78,45 @@ try {
|
||||
console.warn(`contributors: ${e.message}; the page will load them itself`);
|
||||
}
|
||||
|
||||
// The hub's roadmap (data/roadmap.json, generated from roadmap/roadmap.toml by tools/roadmap.py) and the live state
|
||||
// of the issues and pull requests its items link: the open ones and those closed lately, then (with a token) the
|
||||
// older ones in one GraphQL request. Without GitHub the hub shows the links without their state.
|
||||
const roadmap = JSON.parse(await readFile(join(site, "data", "roadmap.json"), "utf8"));
|
||||
const linked = new Set(roadmap.items.flatMap((i) => (i.links || []).map((l) => Number((l.match(/^#(\d+)$/) || [])[1])).filter(Boolean)));
|
||||
let hubLive = [];
|
||||
try {
|
||||
const urls = [1, 2, 3].map((p) => `https://api.github.com/repos/${REPO}/issues?state=open&per_page=100&page=${p}`);
|
||||
urls.push(`https://api.github.com/repos/${REPO}/issues?state=closed&sort=updated&direction=desc&per_page=100`);
|
||||
for (const url of urls) {
|
||||
const res = await fetch(url, { headers: githubHeaders, signal: AbortSignal.timeout(15000) });
|
||||
if (!res.ok) throw new Error(`${res.status} from GitHub`);
|
||||
hubLive.push(...(await res.json()).map(slimIssue));
|
||||
}
|
||||
const missing = [...linked].filter((n) => !hubLive.some((i) => i.n === n));
|
||||
if (missing.length && process.env.GITHUB_TOKEN) {
|
||||
const fields = missing.map((n) => `n${n}: issueOrPullRequest(number: ${n}) { ... on Issue { number title state stateReason url } ... on PullRequest { number title state isDraft mergedAt url } }`).join(" ");
|
||||
const res = await fetch("https://api.github.com/graphql", {
|
||||
method: "POST",
|
||||
headers: githubHeaders,
|
||||
body: JSON.stringify({ query: `query { repository(owner: "ludovic111", name: "horizon") { ${fields} } }` }),
|
||||
signal: AbortSignal.timeout(15000),
|
||||
});
|
||||
const nodes = Object.values((await res.json()).data?.repository || {}).filter(Boolean);
|
||||
hubLive.push(
|
||||
...nodes.map((x) =>
|
||||
slimIssue({
|
||||
number: x.number, title: x.title, html_url: x.url, draft: x.isDraft,
|
||||
state: x.state === "OPEN" ? "open" : "closed", state_reason: x.stateReason === "NOT_PLANNED" ? "not_planned" : null,
|
||||
pull_request: "isDraft" in x ? { merged_at: x.mergedAt } : undefined,
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(`hub: ${e.message}; the page will load the states itself`);
|
||||
}
|
||||
const hubLinked = new Map(hubLive.filter((i) => linked.has(i.n)).map((i) => [i.n, i]));
|
||||
|
||||
// --- The parity table ------------------------------------------------------------------
|
||||
|
||||
const status = section(readme, "Project status") ?? "";
|
||||
@@ -170,7 +210,7 @@ await writeFile(join(dist, "favicon.ico"), Buffer.concat([ico, png32]));
|
||||
const names = {};
|
||||
const rewrite = (code) => code.replace(/"\.\/(\w+\.js)"/g, (all, file) => (names[file] ? `"./${names[file]}"` : all));
|
||||
// Dependencies before what imports them.
|
||||
const modules = ["markdown.js", "versions.js", "chrome.js", "hardware.js", "estimate.js", "releases.js", "contributors.js", "bench.js", "main.js", "releases-page.js", "benchmarks-page.js", "docs-page.js"];
|
||||
const modules = ["markdown.js", "versions.js", "chrome.js", "hardware.js", "estimate.js", "releases.js", "contributors.js", "bench.js", "hub.js", "main.js", "releases-page.js", "benchmarks-page.js", "docs-page.js", "hub-page.js"];
|
||||
for (const file of modules) {
|
||||
const code = rewrite(await readFile(join(site, "src", file), "utf8"));
|
||||
names[file] = `${file.replace(".js", "")}.${fingerprint(code)}.js`;
|
||||
@@ -203,7 +243,7 @@ const unavailable = `<p class="lede">The release notes could not be loaded here.
|
||||
|
||||
// One top bar and phone menu for Home, Releases, Benchmarks and every Docs page.
|
||||
const navSections = [["/#about", "About"], ["/#screenshots", "In game"], ["/#parity", "Parity"], ["/#launcher", "Launcher"], ["/#recent", "New", "Recently added"], ["/#community", "Community"]];
|
||||
const navPages = [["/releases", "Releases"], ["/benchmarks", "Benchmarks"], ["/docs/", "Docs", "Documentation"]];
|
||||
const navPages = [["/hub", "Hub"], ["/releases", "Releases"], ["/benchmarks", "Benchmarks"], ["/docs/", "Docs", "Documentation"]];
|
||||
const navLink = ([href, label, menuLabel], current, menu = false) =>
|
||||
`<a href="${href}"${href === current ? ' aria-current="page"' : ""}${href === "/#contributors" ? ` data-contributors${contributors.length ? "" : " hidden"}` : ""}>${menu && menuLabel ? menuLabel : label}</a>`;
|
||||
const siteNav = (current) => ` <header class="nav" id="top">
|
||||
@@ -233,7 +273,7 @@ const siteFooter = ` <footer class="footer">
|
||||
<div class="container">
|
||||
<div class="footer-bar">
|
||||
<span class="footer-mark">Made in the open, in Rust.</span>
|
||||
<nav class="footer-links" aria-label="Elsewhere"><a href="/">Home</a><a href="/releases">Releases</a><a href="/benchmarks">Benchmarks</a><a href="/docs/">Docs</a><a href="/docs/how-horizon-is-built">How it's built</a><a href="https://github.com/${REPO}">GitHub</a><a href="/privacy">Privacy</a><a href="/LEGAL.md">Assets</a></nav>
|
||||
<nav class="footer-links" aria-label="Elsewhere"><a href="/">Home</a><a href="/hub">Hub</a><a href="/releases">Releases</a><a href="/benchmarks">Benchmarks</a><a href="/docs/">Docs</a><a href="/docs/how-horizon-is-built">How it's built</a><a href="https://github.com/${REPO}">GitHub</a><a href="/privacy">Privacy</a><a href="/LEGAL.md">Assets</a></nav>
|
||||
</div>
|
||||
</div>
|
||||
<p class="footer-word" aria-hidden="true">horizon</p>
|
||||
@@ -282,6 +322,12 @@ const values = {
|
||||
CONTRIBUTORS: contributorsHtml(contributors),
|
||||
CONTRIBUTORS_HIDDEN: contributors.length ? "" : " hidden",
|
||||
BAKED: JSON.stringify(baked).replace(/</g, "\\u003c"),
|
||||
HUB_JS: `/assets/${names["hub-page.js"]}`,
|
||||
HUB_OVERVIEW: overviewHtml(roadmap, hubLinked),
|
||||
HUB_ROADMAP: roadmapHtml(roadmap, hubLinked),
|
||||
HUB_AREAS: areaFilterHtml(roadmap),
|
||||
HUB_HELP_WANTED: helpWantedHtml(roadmap),
|
||||
HUB_DATA: JSON.stringify({ roadmap, live: [...hubLinked.values()] }).replace(/</g, "\\u003c"),
|
||||
YEAR: String(new Date().getUTCFullYear()),
|
||||
};
|
||||
|
||||
@@ -358,8 +404,8 @@ const docPages = renderedDocs.map((d, i) => {
|
||||
};
|
||||
});
|
||||
|
||||
const pages = ["index.html", "404.html", "privacy.html", "releases.html", "benchmarks.html"];
|
||||
const currentPath = { "releases.html": "/releases", "benchmarks.html": "/benchmarks" };
|
||||
const pages = ["index.html", "404.html", "privacy.html", "releases.html", "benchmarks.html", "hub.html"];
|
||||
const currentPath = { "releases.html": "/releases", "benchmarks.html": "/benchmarks", "hub.html": "/hub" };
|
||||
for (const page of pages) {
|
||||
let html = await readFile(join(site, "src", page), "utf8");
|
||||
const own = { ...values, SITE_NAV: siteNav(currentPath[page]) };
|
||||
@@ -382,6 +428,10 @@ for (const { file, values: own } of docPages) {
|
||||
docPageFiles.push(file);
|
||||
}
|
||||
|
||||
// The roadmap for other readers (Kira, scripts): /hub/roadmap.json, as tools/roadmap.py wrote it.
|
||||
await mkdir(join(dist, "hub"), { recursive: true });
|
||||
await cp(join(site, "data", "roadmap.json"), join(dist, "hub", "roadmap.json"));
|
||||
|
||||
// The pages' inline scripts (they mark the page as scripted and apply the saved theme before CSS
|
||||
// applies) and the inlined stylesheet: the Content-Security-Policy in the Caddyfile allows them by hash.
|
||||
const allHtml = (await Promise.all([...pages, ...docPageFiles].map((page) => readFile(join(dist, page), "utf8")))).join("\n");
|
||||
@@ -389,7 +439,7 @@ const hashes = (re) => [...new Set([...allHtml.matchAll(re)].map((m) => `'sha256
|
||||
await writeFile(join(dist, ".csp-script"), hashes(/<script>([\s\S]*?)<\/script>/g));
|
||||
await writeFile(join(dist, ".csp-style"), hashes(/<style>([\s\S]*?)<\/style>/g));
|
||||
|
||||
const urls = ["/", "/releases", "/benchmarks", ...docs.map((d) => d.path), "/privacy"];
|
||||
const urls = ["/", "/hub", "/releases", "/benchmarks", ...docs.map((d) => d.path), "/privacy"];
|
||||
await writeFile(
|
||||
join(dist, "sitemap.xml"),
|
||||
`<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n${urls.map((u) => ` <url><loc>https://playhorizon.dev${u}</loc></url>`).join("\n")}\n</urlset>\n`,
|
||||
@@ -397,5 +447,5 @@ await writeFile(
|
||||
|
||||
console.log(
|
||||
`built dist/ from ${readmeFrom}: ${body.length} subsystems, ${percent}, ${harnesses} harnesses, ` +
|
||||
`${ours.length} releases (${game.length} game)${launcher ? `, launcher ${launcher.tag_name}` : ""}, ${benchSummary.groups.length} benchmark rows, ${contributors.length} contributors, ${docs.length} docs pages`,
|
||||
`${ours.length} releases (${game.length} game)${launcher ? `, launcher ${launcher.tag_name}` : ""}, ${benchSummary.groups.length} benchmark rows, ${contributors.length} contributors, ${docs.length} docs pages, ${roadmap.items.length} roadmap items (${hubLinked.size}/${linked.size} links live)`,
|
||||
);
|
||||
|
||||
@@ -0,0 +1,557 @@
|
||||
{
|
||||
"format": "horizon-roadmap",
|
||||
"version": 1,
|
||||
"source": "roadmap/roadmap.toml",
|
||||
"overview": {
|
||||
"today_plain": "Horizon is Minecraft: Java Edition 26.3 rewritten from scratch in Rust, so it runs faster on the same computer. Single player, LAN, servers, resource packs and Horizon's own mods work today, on your own copy of the game.",
|
||||
"today_dev": "A native Rust and wgpu reimplementation of Java 26.3: the same saves, rules and terrain, checked against the real game by more than 300 differential harnesses (a Java oracle and a Rust probe on the same inputs). Single player runs on its own server thread, like vanilla's integrated server.",
|
||||
"help_plain": "Play it and tell us what differs from vanilla (Discord or GitHub), run the benchmark on your computer, vote for what you want next, or pick one of the Help wanted items.",
|
||||
"help_dev": "Read CONTRIBUTING.md, pick a Help wanted item or a To do card, check vanilla's code for the behaviour, and paste the block `python3 tools/pr_ready.py` prints in your pull request."
|
||||
},
|
||||
"statuses": [
|
||||
{
|
||||
"id": "now",
|
||||
"name": "Now"
|
||||
},
|
||||
{
|
||||
"id": "next",
|
||||
"name": "Next"
|
||||
},
|
||||
{
|
||||
"id": "later",
|
||||
"name": "Later"
|
||||
},
|
||||
{
|
||||
"id": "help-wanted",
|
||||
"name": "Help wanted"
|
||||
},
|
||||
{
|
||||
"id": "shipped",
|
||||
"name": "Recently shipped"
|
||||
}
|
||||
],
|
||||
"areas": [
|
||||
{
|
||||
"id": "performance",
|
||||
"name": "Performance"
|
||||
},
|
||||
{
|
||||
"id": "modpacks",
|
||||
"name": "Modpacks"
|
||||
},
|
||||
{
|
||||
"id": "servers",
|
||||
"name": "Servers and multiplayer"
|
||||
},
|
||||
{
|
||||
"id": "mods",
|
||||
"name": "Mods and API"
|
||||
},
|
||||
{
|
||||
"id": "gameplay",
|
||||
"name": "Gameplay parity"
|
||||
},
|
||||
{
|
||||
"id": "rendering",
|
||||
"name": "Rendering"
|
||||
},
|
||||
{
|
||||
"id": "launcher",
|
||||
"name": "Launcher"
|
||||
},
|
||||
{
|
||||
"id": "extras",
|
||||
"name": "Horizon extras"
|
||||
},
|
||||
{
|
||||
"id": "project",
|
||||
"name": "Code and tools"
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": "smooth-frames",
|
||||
"title": "Steady frames at long render distances",
|
||||
"status": "now",
|
||||
"area": "performance",
|
||||
"plain": "Making Horizon faster than vanilla on every computer, with smooth camera movement even at 32 chunks, by spreading the work better over the processor's cores.",
|
||||
"dev": "Frame pacing at render distance 32 (#678): long frames come from work competing with the render thread. In review: world generation workers build free structure starts instead of queueing them (#1760), the worker pool leaves one core as vanilla does (#1778), and the terrain vertex arena is read as storage where flat draws run (#1742). Still open: far terrain at 48 to 64 chunks (#718) and CPU-bound fields of block entities (#717). Every change shows before and after numbers from `tools/perf_bench.py` against vanilla 26.3 (docs/benchmark.md).",
|
||||
"links": [
|
||||
"#678",
|
||||
"#1760",
|
||||
"#1778",
|
||||
"#1742",
|
||||
"#718",
|
||||
"#717",
|
||||
"docs/benchmark.md"
|
||||
],
|
||||
"focus": true
|
||||
},
|
||||
{
|
||||
"id": "block-storage",
|
||||
"title": "Faster block lookups",
|
||||
"status": "now",
|
||||
"area": "performance",
|
||||
"plain": "Speeding up the code that reads and writes the blocks of the world, which almost everything in the game goes through: generation, lighting, meshing and ticking.",
|
||||
"dev": "`PalettedContainer` and `PackedStorage` find an entry's word by multiply and shift instead of an integer division (#1790, #1794); meshing looks up baked models by index, not by name (#1747). Each change keeps the paletted storage harnesses identical and shows its microbenchmark (docs/performance/paletted-container-access-results.md).",
|
||||
"links": [
|
||||
"#1790",
|
||||
"#1794",
|
||||
"#1747",
|
||||
"docs/performance/paletted-container-access-results.md"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "modpack-worldgen",
|
||||
"title": "Modpacks' world generation, natively",
|
||||
"status": "now",
|
||||
"area": "modpacks",
|
||||
"plain": "Making the world-generation mods of popular modpacks (new structures, YUNG's dungeons and mineshafts, packs built on Lithostitched) generate their worlds in Horizon, natively and fast.",
|
||||
"dev": "`horizon-port-pack` carries a pack's data-driven content over; structure mods that need code get a native port: YUNG's worldgen as written (#1746), Lithostitched's limited and guaranteed elements with pool and processor modifiers (#1777), its processors as the game's own types (#1765). Proved by the structure blocks and layout harnesses (#1753, #1757). Mods whose Java code does more than world generation don't run (docs/modpacks.md).",
|
||||
"links": [
|
||||
"#1746",
|
||||
"#1777",
|
||||
"#1765",
|
||||
"#1753",
|
||||
"#1757",
|
||||
"docs/modpacks.md"
|
||||
],
|
||||
"focus": true
|
||||
},
|
||||
{
|
||||
"id": "server-clients",
|
||||
"title": "Playing on servers: everything shows as it should",
|
||||
"status": "now",
|
||||
"area": "servers",
|
||||
"plain": "When you play on a server, other players, mobs, items and menus look and behave as in vanilla: skins, poses, item names, inventories and server networks.",
|
||||
"dev": "Client-of-a-server fixes in `game/remote*.rs` and `horizon-protocol`: mobs' aggressive and item-use flags (#1802, #1798), ghost items after a remote menu (#1795), skins (#1652), cookies and transfer packets for proxy networks (#1650), firework boosts (#1671), living-entity attributes and simulation distance (#1731), styled item names (#1702), primed TNT between updates (#1710).",
|
||||
"links": [
|
||||
"#1802",
|
||||
"#1798",
|
||||
"#1795",
|
||||
"#1652",
|
||||
"#1650",
|
||||
"#1671",
|
||||
"#1731",
|
||||
"#1702",
|
||||
"#1710"
|
||||
],
|
||||
"focus": true,
|
||||
"ongoing": true
|
||||
},
|
||||
{
|
||||
"id": "server-thread",
|
||||
"title": "Single player as a server: the last differences",
|
||||
"status": "now",
|
||||
"area": "gameplay",
|
||||
"plain": "Single player now runs a small server in the background, as vanilla does. We are fixing what still behaves differently there; every fix also works for LAN and server players.",
|
||||
"dev": "Since #1514 single player runs on the server thread (`game/integrated.rs`) and the window joins it as a client; `--in-frame` keeps the old path. The open `[server-thread]` issues list the gaps. In review: a tool that changes a block ends the click (#1797), potions keep their potion over the connection (#1796), mobs' aggression and arm swings (#1802). docs/server-levels.md.",
|
||||
"links": [
|
||||
"#1514",
|
||||
"#1797",
|
||||
"#1796",
|
||||
"#1802",
|
||||
"docs/server-levels.md"
|
||||
],
|
||||
"focus": true,
|
||||
"ongoing": true
|
||||
},
|
||||
{
|
||||
"id": "mod-registry",
|
||||
"title": "Horizon's mod registry",
|
||||
"status": "now",
|
||||
"area": "mods",
|
||||
"plain": "One place for mods, modpacks and resource packs made for Horizon: browse them on the website and install them from the launcher in one click.",
|
||||
"dev": "Merged: the registry index (schema 1, `.hpack`, checks before install, #1634), `cargo horizon-mod check` (#1642) and the submission service (`crates/horizon-mod-registry`, #1659). In review: the website's /mods (#1596) and /mods/submit (#1635), and in the launcher the registry as a source (#1636), install, enable and takedowns (#1637), the Mods page (#1638) and modpacks as their own profiles (#1640).",
|
||||
"links": [
|
||||
"#1634",
|
||||
"#1642",
|
||||
"#1659",
|
||||
"#1596",
|
||||
"#1635",
|
||||
"#1636",
|
||||
"#1637",
|
||||
"#1638",
|
||||
"#1640",
|
||||
"docs/mods.md"
|
||||
],
|
||||
"focus": true
|
||||
},
|
||||
{
|
||||
"id": "server-dialogs",
|
||||
"title": "Server dialogs and login screens",
|
||||
"status": "now",
|
||||
"area": "servers",
|
||||
"plain": "Servers that show dialogs, such as the register and login screens of AuthMe, will work in Horizon.",
|
||||
"dev": "26.3's dialog packets and model (#1720), the dialog screen with its buttons and actions (#1734), then text and boolean inputs (#1735).",
|
||||
"links": [
|
||||
"#1720",
|
||||
"#1734",
|
||||
"#1735"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "languages",
|
||||
"title": "Play in your language",
|
||||
"status": "now",
|
||||
"area": "gameplay",
|
||||
"plain": "Item names, container titles and server messages follow the language you pick, as in vanilla. Today parts of the game stay in English.",
|
||||
"dev": "Translatable components resolved through the selected language for items, containers and server text (#1806), on top of the bundled languages the prepared resources carry (#1594). Left: the client's own screens (#1672) and the main menu with zh_cn (#1774).",
|
||||
"links": [
|
||||
"#1806",
|
||||
"#1594",
|
||||
"#1672",
|
||||
"#1774"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "shader-packs",
|
||||
"title": "Shader packs, written again from scratch",
|
||||
"status": "now",
|
||||
"area": "rendering",
|
||||
"plain": "Shader packs were removed and are being rebuilt from scratch. They come back, off by default, once the best-known packs draw properly.",
|
||||
"dev": "A clean-room rewrite in `horizon-shaderpack`, from the packs' public format documentation only: reading packs, the preprocessor and `.properties` files are merged (#1584, #1585, #1586); translating programs to WGSL through naga, buffers, uniforms and the terrain, entity, sky, weather and hand stages are in review (#1698 to #1801).",
|
||||
"links": [
|
||||
"#1561",
|
||||
"#1584",
|
||||
"#1586",
|
||||
"#1698",
|
||||
"#1771",
|
||||
"#1786",
|
||||
"#1801"
|
||||
],
|
||||
"ongoing": true
|
||||
},
|
||||
{
|
||||
"id": "discord-presence",
|
||||
"title": "Discord Rich Presence",
|
||||
"status": "now",
|
||||
"area": "extras",
|
||||
"plain": "Your Discord profile can show that you are playing Horizon, with a switch to turn it off.",
|
||||
"dev": "A Discord IPC client on its own thread (#1787) and the presence with its setting (#1788). Merged: it ships with the next release.",
|
||||
"links": [
|
||||
"#1787",
|
||||
"#1788"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "lean-code",
|
||||
"title": "A leaner codebase that builds faster",
|
||||
"status": "now",
|
||||
"area": "project",
|
||||
"plain": "Cleaning up Horizon's code: removing what nothing uses and making it quicker to build, so fixes and new features land faster.",
|
||||
"dev": "A review of the whole tree: dead code and stubs removed (#1432, #1658), one probe binary per crate (#1453, #1454), shared harness helpers (#1448), clippy clean on the whole tree (#1707). docs/architecture.md maps each feature to its files and harnesses.",
|
||||
"links": [
|
||||
"#1432",
|
||||
"#1658",
|
||||
"#1453",
|
||||
"#1454",
|
||||
"#1448",
|
||||
"#1707",
|
||||
"docs/architecture.md"
|
||||
],
|
||||
"ongoing": true
|
||||
},
|
||||
{
|
||||
"id": "microsoft-sign-in",
|
||||
"title": "Microsoft sign-in (coming soon)",
|
||||
"status": "next",
|
||||
"area": "launcher",
|
||||
"plain": "Coming soon: sign in with your Microsoft account to play on online-mode servers. The code is ready; it waits for Microsoft's approval.",
|
||||
"dev": "Device-code sign-in in the launcher and online-mode login in the client (docs/microsoft-account.md). It is turned on by setting the app's client id once Minecraft API access is approved; until then the launcher shows \"Coming soon\".",
|
||||
"links": [
|
||||
"docs/microsoft-account.md",
|
||||
"#1270"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "curseforge",
|
||||
"title": "CurseForge in the mod browser (coming soon)",
|
||||
"status": "next",
|
||||
"area": "modpacks",
|
||||
"plain": "Coming soon: search and download CurseForge mods and modpacks from the launcher, as you can with Modrinth today.",
|
||||
"dev": "The mod browser lists CurseForge as coming soon (docs/mod-browser.md): it needs CurseForge API access. Meanwhile packs import from a CurseForge zip or instance folder, and jars only CurseForge hosts come from the player's own instance (docs/modpacks.md).",
|
||||
"links": [
|
||||
"docs/mod-browser.md",
|
||||
"docs/modpacks.md"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "benchmarks",
|
||||
"title": "Fresh benchmarks against vanilla",
|
||||
"status": "next",
|
||||
"area": "performance",
|
||||
"plain": "New public numbers comparing Horizon with vanilla on many kinds of computers, measured the same way every time, on the website's Benchmarks page.",
|
||||
"dev": "Redo the comparison after the current performance work (#1073); reliability, coverage and presentation (#1346); a scene must count as loaded only once its first chunk arrives (#1749). Players' reports come in through `--benchmark` and `horizon-launcher data benchmark` (docs/benchmark.md).",
|
||||
"links": [
|
||||
"#1073",
|
||||
"#1346",
|
||||
"#1749",
|
||||
"docs/benchmark.md"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pistons-push",
|
||||
"title": "Pistons push players and mobs",
|
||||
"status": "next",
|
||||
"area": "gameplay",
|
||||
"plain": "Pistons and slime blocks will push players, mobs and items as in vanilla. Today moving blocks pass through them.",
|
||||
"dev": "Port `PistonMovingBlockEntity.moveCollidedEntities` and `moveStuckEntities` (honey), the slime bounce and `Entity.limitPistonMovement` for `MoverType.PISTON`, in single player and for a server's players. Issues #1496, #1609, #1608, #1704, #1758.",
|
||||
"links": [
|
||||
"#1496",
|
||||
"#1609",
|
||||
"#1608",
|
||||
"#1704",
|
||||
"#1758"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "intel-mac",
|
||||
"title": "Horizon on Intel Macs",
|
||||
"status": "next",
|
||||
"area": "launcher",
|
||||
"plain": "Builds of the game and the launcher for Macs with an Intel processor.",
|
||||
"dev": "x86_64 game and launcher builds, picked per processor (#1171). Before it ships it needs a run on a real Intel Mac: Rosetta on Apple Silicon only proves the CPU code. Requests: #1161, #1792.",
|
||||
"links": [
|
||||
"#1171",
|
||||
"#1161",
|
||||
"#1792"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ai-companion",
|
||||
"title": "An optional AI teammate",
|
||||
"status": "later",
|
||||
"area": "extras",
|
||||
"plain": "An AI teammate that plays beside you and that you can talk to. It is off unless you turn it on, and the No AI switch hides it completely.",
|
||||
"dev": "Draft pull requests: the companion (#1068), its safety modes and their evaluation (#1069), and a route that finishes the game (#1070). Local models first; it ships only once the safety evaluation passes.",
|
||||
"links": [
|
||||
"#1068",
|
||||
"#1069",
|
||||
"#1070"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "new-versions",
|
||||
"title": "Following new Minecraft versions",
|
||||
"status": "later",
|
||||
"area": "gameplay",
|
||||
"plain": "When Mojang releases a new version of the game, Horizon follows it, and every system is checked against the new version again.",
|
||||
"dev": "The port pipeline detects a release, diffs its classes against 26.3 and writes a port report (docs/version-ports.md); the harnesses then run against the new version.",
|
||||
"links": [
|
||||
"docs/version-ports.md"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "benchmark-your-pc",
|
||||
"title": "Benchmark your computer",
|
||||
"status": "help-wanted",
|
||||
"area": "performance",
|
||||
"plain": "Run Horizon's built-in benchmark and share the report: every new computer makes the performance work more accurate. No coding needed.",
|
||||
"dev": "`horizon-launcher play --arg=--benchmark --arg=standard` writes a JSON report; `horizon-launcher data benchmark <report>` shows what would be sent and uploads it (website/docs/performance.md). Results from three installs with the same hardware appear on the Benchmarks page. Example: #1711.",
|
||||
"links": [
|
||||
"website/docs/performance.md",
|
||||
"#1711"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "end-city-banners",
|
||||
"title": "End city banners keep their pattern",
|
||||
"status": "help-wanted",
|
||||
"area": "gameplay",
|
||||
"plain": "Banners in End cities show as plain magenta instead of with their pattern.",
|
||||
"dev": "Compare the banner block entities the End city templates place with vanilla's (`EndCityPieces`, the templates' block entity NBT, `BannerBlockEntity`'s patterns), in `crates/horizon-world/src/worldgen/structure/`. Issue #1438; possibly related: #526.",
|
||||
"links": [
|
||||
"#1438",
|
||||
"#526"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "end-city-loot",
|
||||
"title": "Enchanted loot in End cities",
|
||||
"status": "help-wanted",
|
||||
"area": "gameplay",
|
||||
"plain": "Armour and tools in End city chests should come enchanted, as in vanilla.",
|
||||
"dev": "`loot.rs` implements `enchant_with_levels`: find why the End city chest table's rolls come out bare, and compare them with vanilla's for a few seeds. Issues #1437, #1660.",
|
||||
"links": [
|
||||
"#1437",
|
||||
"#1660"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "item-cooldowns",
|
||||
"title": "Cooldowns drawn on items",
|
||||
"status": "help-wanted",
|
||||
"area": "gameplay",
|
||||
"plain": "After you throw an ender pearl, its slot should show the cooldown sweeping away, as in vanilla.",
|
||||
"dev": "Vanilla draws `ItemCooldowns`' percent as a white overlay over the slot (`GuiGraphicsExtractor.itemDecorations` and `itemCooldown`) in the hotbar and in inventories. Issue #1763.",
|
||||
"links": [
|
||||
"#1763"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "chat-settings",
|
||||
"title": "Chat settings and team prefixes",
|
||||
"status": "help-wanted",
|
||||
"area": "gameplay",
|
||||
"plain": "The Hidden and Commands Only chat settings should hide chat, and team prefixes should appear before names in chat.",
|
||||
"dev": "Vanilla checks `ChatVisiblity` before it delivers chat and system messages (#1376), and chat uses the team-formatted display name (#1378). Both issues have exact steps to reproduce.",
|
||||
"links": [
|
||||
"#1376",
|
||||
"#1378"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pointer-hand",
|
||||
"title": "A pointing hand over buttons",
|
||||
"status": "help-wanted",
|
||||
"area": "gameplay",
|
||||
"plain": "The mouse pointer should turn into a pointing hand over menu buttons, as in vanilla 26.3.",
|
||||
"dev": "26.3's `AbstractWidget` asks for a cursor from `CursorTypes` when it is hovered; winit's `CursorIcon::Pointer` gives the same shape. Issue #1347.",
|
||||
"links": [
|
||||
"#1347"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "text-field-keys",
|
||||
"title": "Ctrl+Backspace and scroll bars in menus",
|
||||
"status": "help-wanted",
|
||||
"area": "gameplay",
|
||||
"plain": "Ctrl+Backspace should delete a whole word in the creative search, and every list's scroll bar should be draggable.",
|
||||
"dev": "`EditBox` deletes by word with Ctrl (#1764); the Game Rules and Statistics lists' scroll bars can't be dragged (#1782, after #978).",
|
||||
"links": [
|
||||
"#1764",
|
||||
"#1782"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "chicken-flap",
|
||||
"title": "Chickens flap while they fall",
|
||||
"status": "help-wanted",
|
||||
"area": "gameplay",
|
||||
"plain": "Chickens should flap their wings while they fall, not stand still in the air.",
|
||||
"dev": "Vanilla's `Chicken.aiStep` updates `flap` and `flapSpeed` when the chicken isn't on the ground, and the model's wings follow them. Issue #1706.",
|
||||
"links": [
|
||||
"#1706"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "server-resource-packs",
|
||||
"title": "Server resource packs",
|
||||
"status": "shipped",
|
||||
"area": "servers",
|
||||
"plain": "Servers can send you their resource pack: Horizon asks, downloads it and applies it, like vanilla.",
|
||||
"dev": "The dedicated server offers server.properties' pack (#1562); the client's pack manager, downloads, prompt and Server Resource Packs setting (#1569, #1570).",
|
||||
"links": [
|
||||
"#1562",
|
||||
"#1569",
|
||||
"#1570"
|
||||
],
|
||||
"shipped_in": "v0.2.48"
|
||||
},
|
||||
{
|
||||
"id": "server-thread-default",
|
||||
"title": "Single player on its own server thread",
|
||||
"status": "shipped",
|
||||
"area": "gameplay",
|
||||
"plain": "Single player runs on a server thread, as vanilla does, so the world keeps ticking smoothly while the window draws.",
|
||||
"dev": "`game/integrated.rs` runs a second `Game` with one level per dimension; the window joins it through memory like a LAN guest (#1514).",
|
||||
"links": [
|
||||
"#1514",
|
||||
"docs/server-levels.md"
|
||||
],
|
||||
"shipped_in": "v0.2.39"
|
||||
},
|
||||
{
|
||||
"id": "metal-occlusion",
|
||||
"title": "GPU occlusion culling on Macs",
|
||||
"status": "shipped",
|
||||
"area": "performance",
|
||||
"plain": "On Macs the GPU now skips terrain hidden behind hills and caves: 8 to 48% more frames per second at 32 chunks on an M4 Pro.",
|
||||
"dev": "GPU occlusion culling on Metal (#1434).",
|
||||
"links": [
|
||||
"#1434"
|
||||
],
|
||||
"shipped_in": "v0.2.17"
|
||||
},
|
||||
{
|
||||
"id": "gpu-animated-textures",
|
||||
"title": "Animated textures on the GPU",
|
||||
"status": "shipped",
|
||||
"area": "performance",
|
||||
"plain": "Water, lava and other animated blocks are now animated by the graphics card: 1.7 to 2.4 times better 1% lows on Intel graphics.",
|
||||
"dev": "Frames uploaded once, no per-tick CPU blend or copy (#1239).",
|
||||
"links": [
|
||||
"#1239"
|
||||
],
|
||||
"shipped_in": "v0.2.5"
|
||||
},
|
||||
{
|
||||
"id": "far-detail",
|
||||
"title": "Far Detail for integrated graphics",
|
||||
"status": "shipped",
|
||||
"area": "performance",
|
||||
"plain": "An optional Reduced setting for far terrain, suggested on integrated graphics, that saves 2 to 4 ms of GPU time per frame.",
|
||||
"dev": "Opt-in reduced far terrain (#1199), on far-terrain chunk summaries built on the workers (#1029).",
|
||||
"links": [
|
||||
"#1199",
|
||||
"#1029"
|
||||
],
|
||||
"shipped_in": "v0.2.5"
|
||||
},
|
||||
{
|
||||
"id": "mod-browser",
|
||||
"title": "The launcher's mod browser",
|
||||
"status": "shipped",
|
||||
"area": "modpacks",
|
||||
"plain": "Search Modrinth for mods, modpacks and resource packs from the launcher; it says before installing what works in Horizon.",
|
||||
"dev": "The Mods page (#1154), Java mods checked before install (#1242), project pages, filters and galleries (#1243), modpacks ported in the same step (#1246). docs/mod-browser.md.",
|
||||
"links": [
|
||||
"#1154",
|
||||
"#1242",
|
||||
"#1243",
|
||||
"#1246",
|
||||
"docs/mod-browser.md"
|
||||
],
|
||||
"shipped_in": "launcher@0.2.0"
|
||||
},
|
||||
{
|
||||
"id": "launcher-look",
|
||||
"title": "A blocky, Minecraft-like launcher",
|
||||
"status": "shipped",
|
||||
"area": "launcher",
|
||||
"plain": "The launcher got a new blocky look in Horizon's purple, in dark and light.",
|
||||
"dev": "The Blocks look (#1269), from `horizon-theme` (docs/design-system.md).",
|
||||
"links": [
|
||||
"#1269",
|
||||
"docs/design-system.md"
|
||||
],
|
||||
"shipped_in": "launcher@0.2.0"
|
||||
},
|
||||
{
|
||||
"id": "dynamic-lights",
|
||||
"title": "Dynamic lights",
|
||||
"status": "shipped",
|
||||
"area": "extras",
|
||||
"plain": "An optional extra: torches you hold, drop or set on fire light up what is around them.",
|
||||
"dev": "Held, dropped and burning light sources (#1162), in Horizon Extras, off by default.",
|
||||
"links": [
|
||||
"#1162"
|
||||
],
|
||||
"shipped_in": "v2026.10.22"
|
||||
},
|
||||
{
|
||||
"id": "servers-page",
|
||||
"title": "Host a server from the launcher",
|
||||
"status": "shipped",
|
||||
"area": "servers",
|
||||
"plain": "The launcher's Servers page creates, starts, backs up and updates a Horizon server with buttons, and invites friends.",
|
||||
"dev": "The launcher's Servers page (#1026) over `horizon-server` (docs/hosting.md).",
|
||||
"links": [
|
||||
"#1026",
|
||||
"docs/hosting.md"
|
||||
],
|
||||
"shipped_in": "launcher-v0.15.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -17,6 +17,11 @@ createServer(async (req, res) => {
|
||||
res.writeHead(301, { Location: "/docs/hosting" });
|
||||
return res.end();
|
||||
}
|
||||
// The roadmap page became the hub's Roadmap tab.
|
||||
if (path === "/roadmap") {
|
||||
res.writeHead(301, { Location: "/hub#roadmap" });
|
||||
return res.end();
|
||||
}
|
||||
if (path === "/docs") path = "/docs/index.html";
|
||||
// /privacy and /docs/<page> are .html files, as the Caddyfile rewrites them.
|
||||
if (!extname(path)) path += ".html";
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
// The hub page (/hub): its tabs (one per #hash, so /hub#roadmap and /hub#item-<id> can be linked), the
|
||||
// Simple / Technical switch (remembered in localStorage), the area filter, and the live state of every
|
||||
// linked issue and pull request, refreshed from GitHub's public API. Without JavaScript, every tab reads
|
||||
// one after the other with what was baked at build time.
|
||||
import { cached, get, setUpMenu, setUpTheme } from "./chrome.js";
|
||||
import { REPO, overviewHtml, roadmapHtml, slimIssue } from "./hub.js";
|
||||
|
||||
const root = document.documentElement;
|
||||
const data = JSON.parse(document.getElementById("hub-data").textContent);
|
||||
const tabs = [...document.querySelectorAll('.hub-tabs [role="tab"]')];
|
||||
const pill = document.querySelector(".hub-tabs .tab-pill");
|
||||
let area = "all";
|
||||
|
||||
// --- Tabs ------------------------------------------------------------------------------------------------------
|
||||
|
||||
const panelOf = (tab) => document.getElementById(tab.getAttribute("aria-controls"));
|
||||
const place = (tab) => {
|
||||
pill.style.width = `${tab.offsetWidth}px`;
|
||||
pill.style.height = `${tab.offsetHeight}px`;
|
||||
pill.style.transform = `translate(${tab.offsetLeft}px, ${tab.offsetTop}px)`;
|
||||
};
|
||||
function choose(tab, { focus = false, push = false } = {}) {
|
||||
for (const t of tabs) {
|
||||
const on = t === tab;
|
||||
t.setAttribute("aria-selected", String(on));
|
||||
t.tabIndex = on ? 0 : -1;
|
||||
panelOf(t).classList.toggle("is-active", on);
|
||||
}
|
||||
place(tab);
|
||||
if (focus) tab.focus();
|
||||
if (push && location.hash !== `#${panelOf(tab).id}`) history.replaceState(null, "", `#${panelOf(tab).id}`);
|
||||
}
|
||||
// "#roadmap" opens its tab; "#item-x" or "#help-wanted" opens the tab holding it and scrolls there.
|
||||
function follow() {
|
||||
const target = location.hash && document.getElementById(decodeURIComponent(location.hash.slice(1)));
|
||||
const tab = tabs.find((t) => target && (panelOf(t) === target || panelOf(t).contains(target))) || tabs[0];
|
||||
choose(tab);
|
||||
if (target && target !== panelOf(tab)) {
|
||||
if (target.dataset.area && area !== "all" && target.dataset.area !== area) filter("all");
|
||||
requestAnimationFrame(() => target.scrollIntoView({ block: "start" }));
|
||||
}
|
||||
}
|
||||
tabs.forEach((tab, i) => {
|
||||
tab.addEventListener("click", () => choose(tab, { push: true }));
|
||||
tab.addEventListener("keydown", (e) => {
|
||||
const step = { ArrowRight: 1, ArrowLeft: -1 }[e.key];
|
||||
if (step) choose(tabs[(i + step + tabs.length) % tabs.length], { focus: true, push: true });
|
||||
});
|
||||
});
|
||||
// Links inside the page ("Help wanted", an item of the overview) switch tabs through the hash.
|
||||
addEventListener("hashchange", follow);
|
||||
addEventListener("resize", () => place(tabs.find((t) => t.getAttribute("aria-selected") === "true")));
|
||||
document.fonts?.ready.then(() => place(tabs.find((t) => t.getAttribute("aria-selected") === "true")));
|
||||
|
||||
// --- Simple / Technical ----------------------------------------------------------------------------------------
|
||||
|
||||
const detailButtons = [...document.querySelectorAll("[data-detail]")];
|
||||
function detail(mode) {
|
||||
if (mode === "dev") root.dataset.detail = "dev";
|
||||
else delete root.dataset.detail;
|
||||
detailButtons.forEach((b) => b.setAttribute("aria-pressed", String(b.dataset.detail === mode)));
|
||||
}
|
||||
detailButtons.forEach((b) =>
|
||||
b.addEventListener("click", () => {
|
||||
detail(b.dataset.detail);
|
||||
try {
|
||||
localStorage.setItem("hub:detail", b.dataset.detail);
|
||||
} catch {}
|
||||
}),
|
||||
);
|
||||
detail(root.dataset.detail === "dev" ? "dev" : "plain");
|
||||
|
||||
// --- Area filter -----------------------------------------------------------------------------------------------
|
||||
|
||||
const areaButtons = [...document.querySelectorAll("[data-area-filter]")];
|
||||
function filter(to) {
|
||||
area = to;
|
||||
areaButtons.forEach((b) => b.setAttribute("aria-pressed", String(b.dataset.areaFilter === area)));
|
||||
for (const section of document.querySelectorAll("[data-roadmap] .hub-section")) {
|
||||
let shown = 0;
|
||||
for (const item of section.querySelectorAll(".hub-item")) {
|
||||
item.hidden = area !== "all" && item.dataset.area !== area;
|
||||
if (!item.hidden) shown++;
|
||||
}
|
||||
section.hidden = shown === 0;
|
||||
}
|
||||
}
|
||||
areaButtons.forEach((b) => b.addEventListener("click", () => filter(b.dataset.areaFilter)));
|
||||
|
||||
// --- Live state from GitHub ------------------------------------------------------------------------------------
|
||||
|
||||
// The open issues and pull requests, and those closed or merged lately: four requests at most, kept ten minutes.
|
||||
async function loadLive() {
|
||||
const list = [];
|
||||
for (let page = 1; page <= 3; page++) {
|
||||
const batch = await get(`https://api.github.com/repos/${REPO}/issues?state=open&per_page=100&page=${page}`);
|
||||
list.push(...batch.map(slimIssue));
|
||||
if (batch.length < 100) break;
|
||||
}
|
||||
const closed = await get(`https://api.github.com/repos/${REPO}/issues?state=closed&sort=updated&direction=desc&per_page=100`);
|
||||
return list.concat(closed.map(slimIssue));
|
||||
}
|
||||
|
||||
async function refresh() {
|
||||
const fresh = await cached("horizon:hub-live", loadLive).catch(() => null);
|
||||
if (!fresh) return;
|
||||
// What the build knew about older links stays; GitHub's answer wins for the rest.
|
||||
const live = new Map([...data.live, ...fresh].map((i) => [i.n, i]));
|
||||
document.querySelector("[data-overview]").innerHTML = overviewHtml(data.roadmap, live);
|
||||
document.querySelector("[data-roadmap]").innerHTML = roadmapHtml(data.roadmap, live);
|
||||
filter(area);
|
||||
const note = document.querySelector("[data-live-note]");
|
||||
if (note) note.textContent = "Pull request and issue states are live from GitHub.";
|
||||
}
|
||||
|
||||
setUpTheme();
|
||||
setUpMenu();
|
||||
follow();
|
||||
refresh().then(() => location.hash.startsWith("#item-") && follow());
|
||||
@@ -0,0 +1,110 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<title>Hub · Horizon</title>
|
||||
<meta name="description" content="Where Horizon is: what is being done now, what comes next, what shipped, and how to help, in plain words or in technical detail.">
|
||||
<meta name="theme-color" content="#ece7f7" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#0f0d17" media="(prefers-color-scheme: dark)">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<link rel="canonical" href="https://playhorizon.dev/hub">
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
<link rel="icon" href="/favicon-32.png" sizes="32x32" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="Horizon">
|
||||
<meta property="og:title" content="Hub · Horizon">
|
||||
<meta property="og:description" content="What is being done on Horizon now, what comes next, what shipped, and how to help.">
|
||||
<meta property="og:url" content="https://playhorizon.dev/hub">
|
||||
<meta property="og:image" content="https://playhorizon.dev/og.png">
|
||||
<link rel="preconnect" href="https://api.github.com" crossorigin>
|
||||
<style>{{STYLE}}</style>
|
||||
<script>document.documentElement.classList.replace("no-js", "js"); try { const t = localStorage.getItem("theme"); if (t === "light" || t === "dark") document.documentElement.dataset.theme = t; if (localStorage.getItem("hub:detail") === "dev") document.documentElement.dataset.detail = "dev" } catch {}</script>
|
||||
<script type="module" src="{{HUB_JS}}"></script>
|
||||
</head>
|
||||
<body class="subpage">
|
||||
<a class="skip" href="#main">Skip to the content</a>
|
||||
{{SITE_NAV}}
|
||||
<main id="main" class="section page-main hub">
|
||||
<div class="container">
|
||||
<p class="kicker"><span>Hub</span>Now, next and how to help</p>
|
||||
<h1 class="display page-title">Where Horizon is going</h1>
|
||||
<p class="lede">What is being done, what comes next, what shipped and where you can help. No dates: things are Now, Next or Later. Read it in plain words, or switch to the technical picture.</p>
|
||||
<div class="hub-bar">
|
||||
<div class="tabs hub-tabs" role="tablist" aria-label="Hub">
|
||||
<span class="tab-pill" aria-hidden="true"></span>
|
||||
<button type="button" role="tab" id="tab-overview" aria-controls="overview" aria-selected="true">Overview</button>
|
||||
<button type="button" role="tab" id="tab-roadmap" aria-controls="roadmap" aria-selected="false" tabindex="-1">Roadmap</button>
|
||||
<button type="button" role="tab" id="tab-contribute" aria-controls="contribute" aria-selected="false" tabindex="-1">Contribute</button>
|
||||
</div>
|
||||
<div class="hub-detail" role="group" aria-label="Detail">
|
||||
<button type="button" class="button secondary small" data-detail="plain" aria-pressed="true">Simple</button>
|
||||
<button type="button" class="button secondary small" data-detail="dev" aria-pressed="false">Technical</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hub-panel is-active" role="tabpanel" id="overview" aria-labelledby="tab-overview" data-overview>
|
||||
{{HUB_OVERVIEW}}
|
||||
</div>
|
||||
|
||||
<div class="hub-panel" role="tabpanel" id="roadmap" aria-labelledby="tab-roadmap">
|
||||
<div class="release-filter hub-areas" role="group" aria-label="Area">
|
||||
{{HUB_AREAS}}
|
||||
</div>
|
||||
<div data-roadmap>
|
||||
{{HUB_ROADMAP}}
|
||||
</div>
|
||||
<p class="meta hub-source">The roadmap lives in the repository: <a href="https://github.com/ludovic111/horizon/blob/main/ROADMAP.md">ROADMAP.md</a>, generated from <a href="https://github.com/ludovic111/horizon/blob/main/roadmap/roadmap.toml">roadmap/roadmap.toml</a>. Pull requests carry the <code>roadmap:<id></code> label of their item. <span data-live-note></span></p>
|
||||
</div>
|
||||
|
||||
<div class="hub-panel" role="tabpanel" id="contribute" aria-labelledby="tab-contribute">
|
||||
<section class="hub-block" aria-labelledby="h-first">
|
||||
<h2 class="title" id="h-first">Good first tasks</h2>
|
||||
<p class="hub-plain hub-intro">Each one is a small difference from vanilla, with an issue that says how to see it.</p>
|
||||
<p class="hub-dev hub-intro">Each links its issue; the technical text says where in the code and in vanilla to start.</p>
|
||||
<ol class="index hub-rows">{{HUB_HELP_WANTED}}</ol>
|
||||
</section>
|
||||
<section class="hub-block" aria-labelledby="h-ways">
|
||||
<h2 class="title" id="h-ways">Ways to help</h2>
|
||||
<div class="hub-cards">
|
||||
<article class="highlight">
|
||||
<h3>Tell us what differs</h3>
|
||||
<p>Something that doesn't play like vanilla is a bug. Say what you did, what happened and what vanilla does, with your Horizon version and system.</p>
|
||||
<p class="hub-actions"><a class="button secondary small" href="{{DISCORD}}">Discord</a><a class="button secondary small" href="https://github.com/ludovic111/horizon/issues/new">GitHub issue</a></p>
|
||||
</article>
|
||||
<article class="highlight">
|
||||
<h3>Take a task</h3>
|
||||
<p>Pick a good first task or an open issue. On Discord, <code>/claim 1234</code> tells everyone you are on issue 1234, so nobody starts the same work; <code>/unclaim</code> frees it.</p>
|
||||
<p class="hub-actions"><a class="button secondary small" href="https://github.com/ludovic111/horizon/issues">Open issues</a></p>
|
||||
</article>
|
||||
<article class="highlight">
|
||||
<h3>Bring your AI agent</h3>
|
||||
<p>On Discord, <code>/agent connect</code> gives your coding agent a personal token for Kira's MCP server: it reads the work board, claims tasks and posts its progress in your name.</p>
|
||||
<p class="hub-actions"><a class="button secondary small" href="{{DISCORD}}">Join the Discord</a></p>
|
||||
</article>
|
||||
<article class="highlight">
|
||||
<h3>Benchmark your computer</h3>
|
||||
<p>Run the built-in benchmark and share the report: every new machine makes the performance work more accurate. No coding needed.</p>
|
||||
<p class="hub-actions"><a class="button secondary small" href="/docs/performance">How to</a></p>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
<section class="hub-block" aria-labelledby="h-rules">
|
||||
<h2 class="title" id="h-rules">The rules</h2>
|
||||
<ol class="hub-rules">
|
||||
<li><strong>Vanilla is the specification.</strong> Wherever Minecraft 26.3 has the feature, Horizon does exactly what it does: read vanilla's code, then match it.</li>
|
||||
<li><strong>Small pull requests, proven.</strong> One change each, under about 500 lines, with the block <code>python3 tools/pr_ready.py</code> prints: formatting, Clippy, tests and the harnesses your change can affect.</li>
|
||||
<li><strong>Say who wrote it.</strong> If an AI agent wrote or posts it, the pull request says so, and commits keep its co-author line.</li>
|
||||
<li><strong>Never commit Mojang's files.</strong> No game jars, assets, decompiled code or prepared resources, and nothing taken from other mods' code.</li>
|
||||
</ol>
|
||||
<p class="hub-actions"><a class="button primary" href="/docs/contributing">The contributing guide</a><a class="button secondary" href="https://github.com/ludovic111/horizon/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a></p>
|
||||
</section>
|
||||
</div>
|
||||
<p class="disclaimer">Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.</p>
|
||||
</div>
|
||||
</main>
|
||||
{{SITE_FOOTER}}
|
||||
<script type="application/json" id="hub-data">{{HUB_DATA}}</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,175 @@
|
||||
// The hub (/hub): the roadmap from website/data/roadmap.json (generated from roadmap/roadmap.toml by
|
||||
// tools/roadmap.py), with each item's issues and pull requests in their live GitHub state. Shared by build.mjs
|
||||
// (baked into the page) and hub-page.js (refreshed from GitHub in the browser). Every item says the same thing
|
||||
// twice: `plain` (.hub-plain) for players and `dev` (.hub-dev) for contributors; the page's Simple / Technical
|
||||
// switch shows one of them.
|
||||
import { escape, inline } from "./markdown.js";
|
||||
|
||||
export const REPO = "ludovic111/horizon";
|
||||
const issueUrl = (n) => `https://github.com/${REPO}/issues/${n}`;
|
||||
const fileUrl = (path) => `https://github.com/${REPO}/blob/main/${path}`;
|
||||
|
||||
// The issues a pull request closes when merged: "Fixes #12", "closes #3, resolves #4" (as Kira's board reads them).
|
||||
export function fixesIn(text) {
|
||||
const out = new Set();
|
||||
for (const m of String(text ?? "").matchAll(/\b(?:fix(?:e[sd])?|close[sd]?|resolve[sd]?)\s*:?\s+((?:#\d+(?:\s*(?:,|and)\s*)?)+)/gi)) {
|
||||
for (const n of m[1].matchAll(/#(\d+)/g)) out.add(Number(n[1]));
|
||||
}
|
||||
return [...out].sort((a, b) => a - b);
|
||||
}
|
||||
|
||||
// A GitHub issue or pull request (from /issues, which lists both) reduced to what the hub shows.
|
||||
export function slimIssue(raw) {
|
||||
const pr = Boolean(raw.pull_request);
|
||||
const merged = pr && raw.pull_request.merged_at;
|
||||
return {
|
||||
n: raw.number,
|
||||
title: String(raw.title || ""),
|
||||
kind: pr ? "pr" : "issue",
|
||||
state: merged ? "merged" : raw.state === "open" ? "open" : raw.state_reason === "not_planned" ? "dropped" : "closed",
|
||||
draft: Boolean(raw.draft),
|
||||
user: raw.user?.login || "",
|
||||
labels: (raw.labels || []).map((l) => (typeof l === "string" ? l : l.name)).filter(Boolean),
|
||||
assigned: (raw.assignees || []).length > 0,
|
||||
fixes: pr ? fixesIn(raw.body) : [],
|
||||
at: merged || raw.closed_at || raw.updated_at || "",
|
||||
url: raw.html_url || issueUrl(raw.number),
|
||||
};
|
||||
}
|
||||
|
||||
const number = (link) => Number((String(link).match(/^#(\d+)$/) || [])[1]) || null;
|
||||
|
||||
// "#12 in review", "#13 merged": a link's state, when GitHub told us.
|
||||
function linkState(issue) {
|
||||
if (!issue) return null;
|
||||
if (issue.kind === "pr") return issue.state === "open" ? (issue.draft ? "in progress" : "in review") : issue.state;
|
||||
return issue.state === "open" ? "open" : "closed";
|
||||
}
|
||||
|
||||
function linkHtml(link, live) {
|
||||
const n = number(link);
|
||||
if (!n) {
|
||||
const url = link.startsWith("https://") ? link : fileUrl(link);
|
||||
return `<a class="hub-link" href="${escape(url)}">${escape(link.replace(/^https:\/\//, ""))}</a>`;
|
||||
}
|
||||
const issue = live.get(n);
|
||||
const state = linkState(issue);
|
||||
const label = issue ? `${issue.kind === "pr" ? "Pull request" : "Issue"} #${n}: ${issue.title}` : `#${n}`;
|
||||
return `<a class="hub-link${state ? ` is-${state.replace(" ", "-")}` : ""}" href="${issueUrl(n)}" title="${escape(label)}">#${n}${state ? ` <span>${state}</span>` : ""}</a>`;
|
||||
}
|
||||
|
||||
// The technical text with its #N and the item's own paths as links.
|
||||
function devHtml(item) {
|
||||
let text = item.dev.replace(/(^|[^\w[/`])#(\d+)\b/g, (_, before, n) => `${before}[#${n}](${issueUrl(n)})`);
|
||||
for (const link of item.links || []) {
|
||||
if (!number(link) && !link.startsWith("https://")) text = text.replace(link, `[${link}](${fileUrl(link)})`);
|
||||
}
|
||||
return inline(text);
|
||||
}
|
||||
|
||||
// "2 pull requests in review · 3 merged · 1 issue open", from the item's links.
|
||||
export function progress(item, live) {
|
||||
const known = (item.links || []).map(number).filter(Boolean).map((n) => live.get(n)).filter(Boolean);
|
||||
const pulls = known.filter((i) => i.kind === "pr");
|
||||
const count = (list, word) => (list.length ? `${list.length} ${word}` : "");
|
||||
const parts = [
|
||||
count(pulls.filter((p) => p.state === "open" && !p.draft), pulls.filter((p) => p.state === "open" && !p.draft).length === 1 ? "pull request in review" : "pull requests in review"),
|
||||
count(pulls.filter((p) => p.state === "open" && p.draft), "in progress"),
|
||||
count(pulls.filter((p) => p.state === "merged"), "merged"),
|
||||
count(known.filter((i) => i.kind === "issue" && i.state === "open"), known.filter((i) => i.kind === "issue" && i.state === "open").length === 1 ? "issue open" : "issues open"),
|
||||
].filter(Boolean);
|
||||
return parts.join(" · ");
|
||||
}
|
||||
|
||||
const areaName = (roadmap, id) => roadmap.areas.find((a) => a.id === id)?.name || id;
|
||||
|
||||
export function itemHtml(item, roadmap, live) {
|
||||
const done = item.status === "shipped";
|
||||
const state = done ? "" : progress(item, live);
|
||||
return `<article class="hub-item" id="item-${escape(item.id)}" data-area="${escape(item.area)}" data-item="${escape(item.id)}">
|
||||
<p class="hub-item-meta"><span class="badge">${escape(areaName(roadmap, item.area))}</span>${done ? `<span class="badge badge-game">${escape(item.shipped_in)}</span>` : ""}${item.ongoing ? `<span class="hub-ongoing">Ongoing</span>` : ""}</p>
|
||||
<h3 class="hub-item-title">${escape(item.title)}</h3>
|
||||
<p class="hub-plain">${inline(item.plain)}</p>
|
||||
<p class="hub-dev">${devHtml(item)}</p>
|
||||
${state ? `<p class="hub-progress" data-progress>${escape(state)}</p>` : ""}
|
||||
<p class="hub-links">${(item.links || []).map((l) => linkHtml(l, live)).join("")}</p>
|
||||
</article>`;
|
||||
}
|
||||
|
||||
const SECTION_LEDE = {
|
||||
now: "Being worked on, with pull requests open or just merged.",
|
||||
next: "Decided, and up after what is being done now.",
|
||||
later: "Decided, further out.",
|
||||
"help-wanted": "Good first contributions: a clear vanilla behaviour, an issue with the steps, a place to start.",
|
||||
shipped: "Out in a release. The journal has every change.",
|
||||
};
|
||||
|
||||
// The Roadmap tab: one section per status, the items in the file's order (areas by priority).
|
||||
export function roadmapHtml(roadmap, live = new Map()) {
|
||||
const order = new Map(roadmap.areas.map((a, i) => [a.id, i]));
|
||||
return roadmap.statuses
|
||||
.map(({ id, name }) => {
|
||||
const items = roadmap.items.filter((i) => i.status === id);
|
||||
if (!items.length) return "";
|
||||
// Shipped stays newest first; the others go by the areas' priority.
|
||||
if (id !== "shipped") items.sort((a, b) => order.get(a.area) - order.get(b.area));
|
||||
return `<section class="hub-section" id="${id}" data-status="${id}" aria-labelledby="h-${id}">
|
||||
<div class="hub-section-head"><h2 class="title" id="h-${id}">${escape(name)}</h2><p class="meta">${escape(SECTION_LEDE[id] || "")}</p></div>
|
||||
<div class="hub-items">
|
||||
${items.map((item) => itemHtml(item, roadmap, live)).join("\n")}
|
||||
</div>
|
||||
</section>`;
|
||||
})
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
// The area filter's buttons: every area that has an item.
|
||||
export function areaFilterHtml(roadmap) {
|
||||
const used = roadmap.areas.filter((a) => roadmap.items.some((i) => i.area === a.id));
|
||||
return [`<button type="button" class="button secondary small" data-area-filter="all" aria-pressed="true">All</button>`]
|
||||
.concat(used.map((a) => `<button type="button" class="button secondary small" data-area-filter="${escape(a.id)}" aria-pressed="false">${escape(a.name)}</button>`))
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
// The Overview tab: where Horizon is, the 3 to 5 things in focus, what is next, what shipped last, how to help.
|
||||
export function overviewHtml(roadmap, live = new Map()) {
|
||||
const o = roadmap.overview;
|
||||
const focus = roadmap.items.filter((i) => i.focus);
|
||||
const next = roadmap.items.filter((i) => i.status === "next");
|
||||
const shipped = roadmap.items.filter((i) => i.status === "shipped").slice(0, 3);
|
||||
const row = (item, i, meta) => `<li class="row"><a href="#item-${escape(item.id)}" data-goto="roadmap"><span class="row-index">${String(i + 1).padStart(2, "0")}</span><span class="hub-row-body"><span class="hub-row-title">${escape(item.title)}</span><span class="hub-plain">${inline(item.plain)}</span><span class="hub-dev">${inline(item.dev)}</span></span><span class="row-meta">${escape(meta(item))}</span></a></li>`;
|
||||
return `<div class="hub-today">
|
||||
<p class="hub-plain hub-lead">${inline(o.today_plain)}</p>
|
||||
<p class="hub-dev hub-lead">${inline(o.today_dev)}</p>
|
||||
</div>
|
||||
<section class="hub-block" aria-labelledby="h-focus">
|
||||
<h2 class="title" id="h-focus">Being done now</h2>
|
||||
<ol class="index hub-rows">${focus.map((item, i) => row(item, i, (x) => progress(x, live))).join("")}</ol>
|
||||
</section>
|
||||
<section class="hub-block" aria-labelledby="h-next">
|
||||
<h2 class="title" id="h-next">Next</h2>
|
||||
<ol class="index hub-rows">${next.map((item, i) => row(item, i, (x) => areaName(roadmap, x.area))).join("")}</ol>
|
||||
</section>
|
||||
<section class="hub-block" aria-labelledby="h-shipped">
|
||||
<h2 class="title" id="h-shipped">Recently shipped</h2>
|
||||
<ol class="index hub-rows">${shipped.map((item, i) => row(item, i, (x) => `In ${x.shipped_in}`)).join("")}</ol>
|
||||
</section>
|
||||
<section class="hub-block hub-help" aria-labelledby="h-help">
|
||||
<h2 class="title" id="h-help">How to help</h2>
|
||||
<p class="hub-plain">${inline(o.help_plain)}</p>
|
||||
<p class="hub-dev">${inline(o.help_dev)}</p>
|
||||
<p class="hub-actions"><a class="button primary" href="#contribute" data-goto="contribute">Contribute</a><a class="button secondary" href="#help-wanted" data-goto="roadmap">Help wanted</a></p>
|
||||
</section>`;
|
||||
}
|
||||
|
||||
// The Contribute tab's list of good first tasks.
|
||||
export function helpWantedHtml(roadmap) {
|
||||
return roadmap.items
|
||||
.filter((i) => i.status === "help-wanted")
|
||||
.map((item, i) => {
|
||||
const first = (item.links || []).map(number).find(Boolean);
|
||||
const href = first ? issueUrl(first) : `#item-${item.id}`;
|
||||
return `<li class="row"><a href="${escape(href)}"><span class="row-index">${String(i + 1).padStart(2, "0")}</span><span class="hub-row-body"><span class="hub-row-title">${escape(item.title)}</span><span class="hub-plain">${inline(item.plain)}</span><span class="hub-dev">${inline(item.dev)}</span></span><span class="row-meta">${first ? `#${first}` : ""}</span></a></li>`;
|
||||
})
|
||||
.join("");
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fixesIn, overviewHtml, progress, roadmapHtml, slimIssue } from "./hub.js";
|
||||
|
||||
const roadmap = JSON.parse(readFileSync(new URL("../data/roadmap.json", import.meta.url), "utf8"));
|
||||
|
||||
const pr = (number, extra = {}) => ({ number, title: `PR ${number}`, state: "open", pull_request: { merged_at: null }, user: { login: "a" }, labels: [], assignees: [], body: "", ...extra });
|
||||
const issue = (number, extra = {}) => ({ number, title: `Issue ${number}`, state: "open", user: { login: "b" }, labels: [{ name: "bug" }], assignees: [], ...extra });
|
||||
|
||||
test("pull requests and issues reduce to their hub state", () => {
|
||||
assert.deepEqual(fixesIn("Fixes #12, #13 and closes #4. Mentions #9."), [4, 12, 13]);
|
||||
const merged = slimIssue(pr(5, { state: "closed", pull_request: { merged_at: "2030-01-01T00:00:00Z" }, body: "Fixes #3" }));
|
||||
assert.equal(merged.kind, "pr");
|
||||
assert.equal(merged.state, "merged");
|
||||
assert.deepEqual(merged.fixes, [3]);
|
||||
assert.equal(slimIssue(issue(6, { state: "closed", state_reason: "not_planned" })).state, "dropped");
|
||||
assert.deepEqual(slimIssue(issue(7)).labels, ["bug"]);
|
||||
});
|
||||
|
||||
test("an item's progress counts its pull requests and issues", () => {
|
||||
const live = new Map([
|
||||
[1, slimIssue(pr(1))],
|
||||
[2, slimIssue(pr(2, { draft: true }))],
|
||||
[3, slimIssue(pr(3, { state: "closed", pull_request: { merged_at: "2030-01-01T00:00:00Z" } }))],
|
||||
[4, slimIssue(issue(4))],
|
||||
]);
|
||||
const item = { links: ["#1", "#2", "#3", "#4", "#99", "docs/x.md"] };
|
||||
assert.equal(progress(item, live), "1 pull request in review · 1 in progress · 1 merged · 1 issue open");
|
||||
assert.equal(progress(item, new Map()), "");
|
||||
});
|
||||
|
||||
test("the roadmap renders every item once, with both texts, in its status's section", () => {
|
||||
const html = roadmapHtml(roadmap);
|
||||
for (const item of roadmap.items) {
|
||||
assert.equal(html.split(`id="item-${item.id}"`).length, 2, item.id);
|
||||
}
|
||||
assert.ok(html.indexOf('id="now"') < html.indexOf('id="next"'));
|
||||
assert.ok(html.includes('class="hub-plain"') && html.includes('class="hub-dev"'));
|
||||
// Shipped items say which release had them.
|
||||
assert.ok(html.includes(`>${roadmap.items.find((i) => i.status === "shipped").shipped_in}<`));
|
||||
});
|
||||
|
||||
test("the overview lists the focus items and never nests links", () => {
|
||||
const html = overviewHtml(roadmap);
|
||||
for (const item of roadmap.items.filter((i) => i.focus)) assert.ok(html.includes(`href="#item-${item.id}"`), item.id);
|
||||
for (const row of html.match(/<li class="row">[\s\S]*?<\/li>/g)) assert.equal(row.split("<a ").length, 2, row);
|
||||
});
|
||||
+62
-1
@@ -645,7 +645,7 @@ code { border-radius: 0; background: var(--well); box-shadow: 0 0 0 1px var(--ou
|
||||
|
||||
/* Releases: a filter, then every release as a panel that opens. */
|
||||
.release-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
|
||||
.release-filter .button[aria-pressed="true"] { background: var(--face); color: var(--on-face); box-shadow: inset 0 var(--block-bevel) 0 var(--face-bevel), inset 0 calc(-1 * var(--block-lip)) 0 var(--face-lip); }
|
||||
.release-filter .button[aria-pressed="true"], .hub-detail .button[aria-pressed="true"] { background: var(--face); color: var(--on-face); box-shadow: inset 0 var(--block-bevel) 0 var(--face-bevel), inset 0 calc(-1 * var(--block-lip)) 0 var(--face-lip); }
|
||||
.release-count { margin: 16px 0 12px; }
|
||||
.release-list { display: grid; gap: 8px; }
|
||||
.release-list .release + .release { margin-top: 0; }
|
||||
@@ -726,3 +726,64 @@ code { border-radius: 0; background: var(--well); box-shadow: 0 0 0 1px var(--ou
|
||||
.release-detail { padding-left: 0; margin-left: 0; }
|
||||
.machine { padding: 16px; }
|
||||
}
|
||||
|
||||
/* --- The hub (/hub): tabs, the Simple / Technical switch, roadmap items as panels ------------------- */
|
||||
|
||||
.hub-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; }
|
||||
.hub-tabs { margin-bottom: 0; }
|
||||
.hub-detail { display: flex; gap: 8px; }
|
||||
/* A link to a tab (/hub#roadmap) lands with the tabs in view under the top bar. */
|
||||
.hub-panel { margin-top: 40px; scroll-margin-top: calc(var(--nav) + 120px); }
|
||||
.js .hub-panel:not(.is-active) { display: none; }
|
||||
/* Simple shows `plain`, Technical shows `dev`; without the switch (no JavaScript) Simple reads. */
|
||||
.hub .hub-dev { display: none; }
|
||||
:root[data-detail="dev"] .hub .hub-dev { display: block; }
|
||||
:root[data-detail="dev"] .hub .hub-plain { display: none; }
|
||||
.hub-lead { max-width: 60ch; font-size: var(--text-heading); line-height: var(--text-heading-line); color: var(--ink); }
|
||||
.hub-block { margin-top: 56px; }
|
||||
.hub-block > .title { margin-bottom: 16px; }
|
||||
.hub-intro { margin-bottom: 16px; color: var(--ink-soft); max-width: var(--measure); }
|
||||
.hub-rows .row > a { grid-template-columns: var(--index) minmax(0, 1fr) auto; align-items: baseline; }
|
||||
.hub-row-body { display: grid; gap: 4px; min-width: 0; }
|
||||
.hub-row-title { font-size: clamp(18px, 1.8vw, 22px); font-weight: 500; color: var(--ink); }
|
||||
.hub-row-body .hub-plain, .hub-row-body .hub-dev { color: var(--ink-soft); font-size: var(--text-ui); max-width: 80ch; }
|
||||
.hub-rows .row-meta { max-width: 16rem; }
|
||||
.hub-section { margin-top: 48px; }
|
||||
.hub-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
|
||||
.hub-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px; margin-top: 16px; }
|
||||
.hub-item {
|
||||
display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; scroll-margin-top: calc(var(--nav) + 24px);
|
||||
background: var(--panel); border: var(--block-outline) solid var(--outline); box-shadow: var(--panel-edges);
|
||||
}
|
||||
.hub-item:target { box-shadow: var(--panel-edges), 0 0 0 3px var(--accent); }
|
||||
.hub-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
||||
.hub-item-meta .badge { margin-right: 0; }
|
||||
.hub-ongoing { font: var(--text-micro) / 1 var(--mono); letter-spacing: var(--text-micro-tracking); color: var(--muted); }
|
||||
.hub-item-title { font-size: var(--text-heading); line-height: var(--text-heading-line); }
|
||||
.hub-item .hub-plain, .hub-item .hub-dev { font-size: var(--text-ui); color: var(--ink-soft); }
|
||||
.hub-progress { font: var(--text-micro) / 1.4 var(--mono); letter-spacing: var(--text-micro-tracking); color: var(--ink); }
|
||||
.hub-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
|
||||
.hub-link {
|
||||
display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 7px; font: var(--text-micro) / 1.3 var(--mono);
|
||||
color: var(--ink-soft); background: var(--well); box-shadow: 0 0 0 var(--block-outline) var(--outline);
|
||||
}
|
||||
.hub-link span { color: var(--muted); }
|
||||
.hub-link:hover { color: var(--accent); }
|
||||
.hub-link.is-merged { background: color-mix(in srgb, var(--success) 18%, var(--well)); }
|
||||
.hub-link.is-in-review { background: color-mix(in srgb, var(--accent) 18%, var(--well)); }
|
||||
.hub-link.is-in-progress { background: color-mix(in srgb, var(--warn) 22%, var(--well)); }
|
||||
.hub-link.is-merged span, .hub-link.is-in-review span, .hub-link.is-in-progress span { color: var(--ink); }
|
||||
.hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
|
||||
.hub-cards .highlight { justify-content: flex-start; }
|
||||
.hub-cards h3 { font-size: var(--text-heading); line-height: var(--text-heading-line); }
|
||||
.hub-cards p { color: var(--ink-soft); font-size: var(--text-ui); }
|
||||
.hub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
|
||||
.hub-cards .hub-actions { margin-top: auto; }
|
||||
.hub-rules { list-style: decimal; padding-left: 20px; max-width: var(--measure); }
|
||||
.hub-rules li + li { margin-top: 10px; }
|
||||
.hub-rules li::marker { color: var(--muted); font-family: var(--mono); }
|
||||
.hub-source { margin-top: 40px; max-width: var(--measure); }
|
||||
@media (max-width: 720px) {
|
||||
.hub-rows .row > a { grid-template-columns: var(--index) minmax(0, 1fr); }
|
||||
.hub-rows .row-meta { grid-column: 2; text-align: left; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user