Implement dashboard UI improvements

This commit is contained in:
2026-05-19 02:16:24 +02:00
parent bf09782f68
commit cc21c5869e
9 changed files with 342 additions and 25 deletions

View File

@@ -17,6 +17,8 @@ const STEP_LABEL = {
test: "Test",
review: "Review",
finished: "Finished",
addressed: "Addressed",
resolved: "Resolved",
wont_fix: "Won't Fix",
};
const STEP_COLOR = {
@@ -27,6 +29,8 @@ const STEP_COLOR = {
test: "#06b6d4",
review: "#6366f1",
finished: "#16a34a",
addressed: "#16a34a",
resolved: "#16a34a",
wont_fix: "#9ca3af",
};
const STEP_HINT = {
@@ -37,8 +41,11 @@ const STEP_HINT = {
test: "Verifying the implementation works correctly.",
review: "Awaiting review by the original suggester.",
finished: "Shipped and confirmed.",
addressed: "Implemented before the current workflow labels existed.",
resolved: "Resolved before the current workflow labels existed.",
wont_fix: "Decided not to implement.",
};
const CLOSED_STATUSES = new Set(["finished", "addressed", "resolved", "wont_fix"]);
function nextStep(current) {
const i = STEPS.indexOf(current);
return i >= 0 && i < STEPS.length - 1 ? STEPS[i + 1] : null;
@@ -58,7 +65,7 @@ const feedbackState = (async function*() {
data = items
.filter(t => t.debt_type === "dashboard-improvement")
.sort((a, b) => {
const st = {submitted:0, analyse:1, plan:2, implement:3, test:4, review:5, finished:6, wont_fix:7, open:8, in_progress:9, resolved:10};
const st = {submitted:0, analyse:1, plan:2, implement:3, test:4, review:5, finished:6, addressed:7, resolved:8, wont_fix:9, open:10, in_progress:11};
return (st[a.status] ?? 99) - (st[b.status] ?? 99);
});
}
@@ -82,8 +89,8 @@ const _ts = feedbackState.ts;
import {injectTocTop} from "./components/toc-sidebar.js";
import {withDocHelp} from "./components/doc-overlay.js";
const _active = data.filter(t => t.status !== "finished" && t.status !== "wont_fix");
const _finished = data.filter(t => t.status === "finished");
const _active = data.filter(t => !CLOSED_STATUSES.has(t.status));
const _finished = data.filter(t => ["finished", "addressed", "resolved"].includes(t.status));
const _wontfix = data.filter(t => t.status === "wont_fix");
const _kpiBox = html`<div class="kpi-infobox">