Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ package of the redesign that builds it. Anything not in this table does not anim
| M1 | Every page | Cross-document view transition, root crossfade 220ms | continuity | none (as today) | WP2 |
| M2 | Home → `/mcp/`, `/standards/` → spec, `/explorer/` → scenario | Shared `view-transition-name` on the data view (matrix plate from `MatrixThumb.astro` as `matrix`, map; on the explorer, the scenario title into the page h1) so it morphs instead of crossfading | "this is the same object, larger" | none | WP3, WP5, WP6 |
| M3 | Home facts, server page facts, spec page facts (`Facts.astro`) | Count-up from 0 to the value, 600ms, once, when 50% in view, tabular figures | "these are live numbers" | value rendered at once | WP3 |
| M4 | Standards map, decorative plate | Highlighted path draws in (`stroke-dashoffset`), 1200ms, halo fades after, once on load | "follow this path" | path shown complete | WP5, WP8 |
| M4 | Decorative plate | Highlighted path draws in (`stroke-dashoffset`), 1200ms, halo fades after, once on load. The standards map dropped it in R-12: its spine is two or three short edges, so the draw read as a glitch, not a path; the spine is drawn complete at full strength | "follow this path" | path shown complete | WP8 |
| M5 | Explorer chain | Per step: the sender and receiver light up in the actor head, the current arrow draws in (300ms, ease-out), the body fades up 8px (220ms); earlier steps keep a quieter arrow and later ones a hairline, in colour, not opacity, so text keeps its contrast | "you are here" | arrow and body shown, highlight and dimming applied without transition | WP6, R-08 |
| M6 | Explorer chain | One scene clock (a Web Animations API timeline) holds the playhead; Play, Pause, Previous, Next, the scrub bar, a click on a step or a log line and the arrow keys all move it. Steps advance every 2.5 s. Auto-advance (amended by review follow-up 8): armed once per page, it starts when the chain has sat in view for 1 s with no input, and stops for good on hover, touch, focus, scroll or any key; it never restarts by itself and never starts with a step in the URL. Play, once pressed, pauses on any click, key or scroll | guided reading | Play button hidden, no auto-advance; the scrub bar and the step buttons still seek | WP6, R-08 |
| M7 | Explorer token view | On step change, claims that differ from the previous hop get a 2px `--signal` rail that fades to `--rule` over 480ms, starting when the message has drawn (300ms) and 40ms apart | "this is what changed in the token" | rail shown without fade | WP6, R-08 |
Expand All @@ -265,6 +265,7 @@ package of the redesign that builds it. Anything not in this table does not anim
| M16 | Theme toggle | Icon swap only; no rotation | n/a | n/a | WP2 |
| M17 | Explorer toggles | A toggle link swaps the chain in place (crumbs, toggles, notice, steps) through a same-document view transition, 220ms; steps the two chains share morph, the rest fade, and M8 runs on the new rails. The toggle stays its own static page for a reload, a new tab or no JS | "the same chain, with one thing changed" | ordinary navigation | R-08 |
| M18 | Explorer chain | A quiet decision log under the chain gains one line per step reached (number, sender → receiver, message), the newest fading in over 220ms; a line seeks back to its step | "what has happened so far" | lines appear | R-08 |
| M19 | Standards map | Hovering or focusing a node fades the documents and lines outside its neighbourhood to 22% over 220ms, and its own lines to full colour. The highlight holds for 280ms while the pointer crosses the gap to the next node, so moving across the map changes the highlight once per node instead of flashing back to full strength in every gap | "these are its relations" | applied and lifted at once | R-12 |

Removed from the site by the redesign: the pulsing dot in the work-in-progress banner (it loops),
the hover lifts on cards, buttons and the hero thumbnail, the rotating theme toggle, the ambient
Expand Down
1 change: 1 addition & 0 deletions specs/016-visual-redesign/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,4 @@ Items from the redesign review, one pull request each, in order.
- [x] R-09 Content pass (WP9 above): section-root headlines under 24 characters, the title suffix and footer statement, an accessibility statement that lists every motion with its reduced-motion form, `check:prose` as a gate, and the about, contribute, made-in-Europe, legal and 404 pages in plain English
- [x] R-10 Decorative plate (WP8 above): a deterministic miniature delegation chain in the head of the explorer and breach indexes and every spec page, beside the title on wide screens, drawn in once (M4) and complete under reduced motion, with social cards for the two section roots from the same generator
- [x] R-11 Spec page composition: under the head, relations and features take the wide column and a panel beside them holds the figures (revisions, relations, features, counting up as M3) and the revision timeline (its rail drawing in as M13, the entries still so their contrast holds), sticky as on a breach page; below 60rem the panel follows the relations. Relation groups and feature topics pack into columns (`columns: 19rem`) instead of one long list; a group heading is the verb phrase alone ("Builds on", "Is built on by") and the source link follows the note. Features group by topic under a bar of how many carry each level, named in words beside it. A spec with no recorded features shows a sentence in the panel, not a zero and not an empty section. The withdrawn or expired notice moves into the main column. Baselines through the `refresh-screenshots` label
- [x] R-12 Standards map polish (asked by Jan): `layoutGraph` lays out each group of specs joined by dependencies on its own and packs the small groups and the standalone specs (one stack per body) into the columns where they sit highest, under the OAuth tree's short columns, instead of hanging them below its long second column; the drawing is about 40% shorter and the empty lower right is gone. A same-column curve in the last column bows left, inside the frame. The hover highlight no longer flashes: the island delegates pointer events on the drawing, holds the neighbourhood for 280ms while the pointer crosses a gap, redraws only when the node changes, and nodes fade with their lines over `--dur` (M19, new). The spine draw-in and halo on the map are gone (M4 keeps the plate); the spine stays drawn at full strength. Baselines through the `refresh-screenshots` label
108 changes: 36 additions & 72 deletions src/components/StandardsMap.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { type Layout, PAD, wrapLabel } from "@/lib/graph";
import {
BODY_LABEL,
BODY_SHORT,
MATURITY_LABEL,
MATURITY_ORDER,
MATURITY_TAG,
Expand Down Expand Up @@ -32,12 +33,15 @@ const usedMaturities = MATURITY_ORDER.filter((m) => specs.some((s) => s.maturity
// references are the most and the least telling lines, so the map opens without them
const shownByDefault = (t: RelationType) => t !== "references";

// M4: the longest builds-on chain draws in from the oldest document to the newest
// the longest builds-on chain, drawn at full strength as the map's one emphasised path
const spine = buildsOnSpine(specs, relations);
const spineStep = new Map(spine.map((r, i) => [`${r.from}|${r.type}|${r.to}`, i]));
const spineKeys = new Set(spine.map((r) => `${r.from}|${r.type}|${r.to}`));
const spineFirst = spine[0] ? byId.get(spine[0].to) : undefined;
const spineLast = spine.at(-1) ? byId.get(spine.at(-1)?.from ?? "") : undefined;

// the body toggles sit two to a row; a long name takes its short form so each stays one line
const railLabel = (b: SpecBody) => (BODY_LABEL[b].length > 12 ? BODY_SHORT[b] : BODY_LABEL[b]);

const draft = new Set(["individual-draft", "working-group-draft", "candidate"]);
// 13px Geist at weight 500 averages a little under 7px a character
const chipWidth = (text: string) => Math.round(text.length * 7 + 16);
Expand All @@ -61,10 +65,10 @@ const unchecked = (name: string, value: string) =>
const filterCss = [
...usedTypes.map(
(t) =>
`${unchecked("type", t)} :is(#map .edge-${t}, #map .spine-halo[data-type="${t}"]) { visibility: hidden }\n` +
`${unchecked("type", t)} #map .edge-${t} { visibility: hidden }\n` +
`${unchecked("type", t)} #spec-list .xl[data-type="${t}"] { display: none }`,
),
`${scope}:has(input[name="view"][value="recent"]:checked) :is(#map .node:not([data-recent]), #map .band, #map .edge, #map .spine-halo) { opacity: 0.2 }`,
`${scope}:has(input[name="view"][value="recent"]:checked) :is(#map .node:not([data-recent]), #map .band, #map .edge) { opacity: 0.2 }`,
`${scope}:has(input[name="view"][value="recent"]:checked) #spec-list li:not([data-recent]) > .row { opacity: 0.35 }`,
...bodies.map(
(b) =>
Expand Down Expand Up @@ -98,7 +102,9 @@ const filterCss = [
bodies.map((b) => (
<label class="toggle">
<input type="checkbox" name="body" value={b} checked />
<span class="toggle__label">{BODY_LABEL[b]}</span>
<span class="toggle__label" title={railLabel(b) === BODY_LABEL[b] ? undefined : BODY_LABEL[b]}>
{railLabel(b)}
</span>
</label>
))
}
Expand Down Expand Up @@ -182,34 +188,15 @@ const filterCss = [
class="band-box"
aria-hidden="true"
/>
<text x={band.x + 10} y={band.y - 6} class="band-label" data-body={band.body}>
{BODY_LABEL[band.body]}
</text>
</g>
))
}
</g>

<g class="edges" aria-hidden="true">
{
edges
.filter((e) => spineStep.has(key(e)))
.map((e) => (
<path
class="spine-halo"
d={e.d}
pathLength="1"
data-type={e.relation.type}
data-from-body={e.from.spec.body}
data-to-body={e.to.spec.body}
style={`--i: ${spineStep.get(key(e))}; --n: ${spine.length}`}
/>
))
}
{
edges.map((e) => {
const step = spineStep.get(key(e));
const onSpine = step !== undefined;
const onSpine = spineKeys.has(key(e));
return (
<path
class:list={[
Expand All @@ -218,8 +205,6 @@ const filterCss = [
{ symmetric: e.symmetric, spine: onSpine },
]}
d={e.d}
pathLength={onSpine ? "1" : undefined}
style={onSpine ? `--i: ${step}; --n: ${spine.length}` : undefined}
data-relation={key(e)}
data-type={e.relation.type}
data-from={e.relation.from}
Expand All @@ -241,6 +226,17 @@ const filterCss = [
}
</g>

{/* the band names sit above the lines, so a line through the gap never runs over one */}
<g class="band-labels">
{
bands.map((band) => (
<text x={band.x + 10} y={band.y - 6} class="band band-label" data-body={band.body}>
{BODY_LABEL[band.body]}
</text>
))
}
</g>

<g class="nodes">
{
nodes.map((n) => {
Expand Down Expand Up @@ -529,10 +525,15 @@ const filterCss = [
.band-box {
fill: color-mix(in oklch, var(--ink-2) 7%, transparent);
}
/* a line that runs through the gap passes behind the label, which keeps a rim of the plate */
.band-label {
font-size: 11px;
font-weight: 500;
fill: var(--ink-2);
stroke: var(--ground-2);
stroke-width: 4px;
stroke-linejoin: round;
paint-order: stroke;
}
:global(#map-frame[data-enhanced] .band-label) {
cursor: pointer;
Expand Down Expand Up @@ -561,7 +562,7 @@ const filterCss = [
stroke: var(--edge);
stroke-width: 1.5;
transition:
opacity var(--dur-fast) var(--ease),
opacity var(--dur) var(--ease),
stroke var(--dur-fast) var(--ease);
}
.edge-builds-on,
Expand Down Expand Up @@ -597,56 +598,16 @@ const filterCss = [
fill: var(--c);
}

/* the builds-on spine: full colour, drawn in once on load from the oldest end (M4) */
/* the builds-on spine: full colour and a little heavier, so the eye finds one path first */
.edge.spine {
--edge: var(--c);
stroke-width: 2;
stroke-dasharray: 1;
}
.spine-halo {
fill: none;
stroke: var(--signal-soft);
stroke-width: 9;
stroke-linecap: round;
stroke-dasharray: 1;
opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
.edge.spine {
animation: map-draw calc(var(--dur-draw) / var(--n)) linear
calc(var(--dur-draw) / var(--n) * var(--i)) both;
}
.spine-halo {
animation:
map-draw calc(var(--dur-draw) / var(--n)) linear
calc(var(--dur-draw) / var(--n) * var(--i)) both,
map-halo calc(var(--dur-draw) + var(--dur-slow)) linear both;
}
}
/* a negative offset reveals the path from its end, where the older document sits */
@keyframes map-draw {
from {
stroke-dashoffset: -1;
}
to {
stroke-dashoffset: 0;
}
}
/* the halo shows while the spine draws (1200 of 1680ms), then fades out */
@keyframes map-halo {
0%,
100% {
opacity: 0;
}
2%,
71% {
opacity: 1;
}
}

.node {
cursor: pointer;
text-decoration: none;
transition: opacity var(--dur) var(--ease);
}
.node-box {
fill: var(--ground);
Expand Down Expand Up @@ -712,9 +673,12 @@ const filterCss = [
fill: var(--ink-2);
}

/* the neighbourhood highlight, driven by the island */
/*
* the neighbourhood highlight, driven by the island (M19): the rest of the map steps back over
* 220ms rather than blinking, and the island holds it while the pointer crosses a gap
*/
:global(#map .is-far) {
opacity: 0.18;
opacity: 0.22;
}
:global(#map .edge.is-near) {
--edge: var(--c);
Expand Down
36 changes: 33 additions & 3 deletions src/components/StandardsMap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ onMount(() => {
c,
]),
);
let shown: string | null = null;
function show(id: string | null) {
if (!card) return;
const next = id ? cards.get(id) : undefined;
Expand All @@ -112,6 +113,8 @@ onMount(() => {
(neighbours.get(b) ?? neighbours.set(b, new Set()).get(b))?.add(a);
}
function highlight(id: string | null) {
if (id === shown) return;
shown = id;
show(id);
if (!id) {
for (const el of [...nodes, ...edges]) el.classList.remove("is-near", "is-far");
Expand All @@ -130,11 +133,38 @@ onMount(() => {
edge.classList.toggle("is-far", !isNear);
}
}
/*
* The pointer crosses empty space between two nodes on its way from one to the next. Letting
* go at once would flash the whole map back to full strength in every gap, so the highlight
* stays through a short grace and only lifts when the pointer rests off the nodes or leaves.
*/
const GRACE = 280;
let release = 0;
const hold = () => window.clearTimeout(release);
const letGo = (delay: number) => {
hold();
release = window.setTimeout(() => highlight(null), delay);
};
const nodeAt = (target: EventTarget | null) =>
target instanceof Element ? target.closest<SVGElement>("a[data-spec]") : null;
svg.addEventListener("pointerover", (event) => {
if ((event as PointerEvent).pointerType === "touch") return;
const node = nodeAt(event.target);
if (!node) return;
hold();
highlight(node.dataset.spec ?? null);
});
svg.addEventListener("pointerout", (event) => {
if ((event as PointerEvent).pointerType === "touch") return;
if (nodeAt(event.target) && !nodeAt((event as PointerEvent).relatedTarget)) letGo(GRACE);
});
svg.addEventListener("pointerleave", () => letGo(0));
for (const node of nodes) {
const id = node.dataset.spec ?? null;
node.addEventListener("mouseenter", () => highlight(id));
node.addEventListener("mouseleave", () => highlight(null));
node.addEventListener("focus", () => highlight(id));
node.addEventListener("focus", () => {
hold();
highlight(id);
});
node.addEventListener("blur", () => highlight(null));
}

Expand Down
Loading
Loading