From ff97a142f36e7b397debc63ca616f611f43d3cf1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 17:30:29 +0000 Subject: [PATCH] The foot: no word on a tile, no plate, and a ring that uses the whole strip A strip tile says its name in the popup alone. The drawing's strip and a tool's strip have no background. A ring's horizon is moved out past the strip's ends until the chip farthest round stands on them, and chips are drawn down to 0.06 of their size, so the ring no longer stops a third short. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_014hCELpcHAGzoWBsNzXgZw8 --- CLAUDE.md | 10 +++++++-- draw.html | 53 ++++++++++++++++++++++++++++++++++++++---------- tests/editor.mjs | 21 +++++++++++++++++-- 3 files changed, 69 insertions(+), 15 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index f4dbf72..b1aa1de 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -261,7 +261,7 @@ compatibly. should be used by default. draw repos uses the old ring. update it to the new ring."; THE RING READ FROM ONE VANTAGE at `makeRing`): every bar made by `makeRing` (the top bar, the edit view's footer, each strip mode, the animation's chips) lays chip k at d = k − f from the focus f, on the line chart x = s/(1 + |s|) with s = d/H (no square root, no trig, the - strip's ends the horizon), each chip drawn smaller as its room shrinks (`--ring-s`, gone below 0.15), and is a plain + strip's ends the horizon until 1 Dec 2026, see the foot's item below), each chip drawn smaller as its room shrinks (`--ring-s`, gone below `RING_GONE`), and is a plain centred row, nothing turning, whenever the chips' own widths fit side by side. `focus(i)` and `__ring.focus` are in chips; `__ring.angle` is kept as a name for the same number. The shape browser follows the same law since the same day (Tom: "update the shape browser to the new ring to."; THE SHAPE BROWSER IS THE RING READ FROM ONE VANTAGE TOO at `currentAngle`): @@ -491,7 +491,13 @@ compatibly. animation's bar and the AI's; gold while the foot is away, remembered (`tangent.footOffV1`), and a press on one of the ring's buttons brings the foot back. The strip's mode is not touched. `window.__foot` (`set`, `off`) for the checks. The top ring counts the room under the two pinned buttons as taken (`data-inset`), so its row stands between them. A - strip tile's name is over its picture (`.anim-tile .cap`, `order: -1`). + strip tile's name was put over its picture, and then taken off its face (the same day: "Text is still being shown on the + icons in two different ways. Only show text on the icons tooltip popup."): `.anim-tile .cap` stays in the tile, not + shown, and the name is the popup's alone. The foot has no plate ("Remove the background from the footer": + `.shape-scroller` and `.add-strip` are transparent). A ring uses the whole strip ("The footer should use the full + width, it is being clipped"; THE RING USES THE WHOLE STRIP at `makeRing`, and the shape browser's `layoutCarousel`): + the horizon is moved out past the strip's ends until the chip farthest round stands on them, the focus's neighbours + still a pitch apart, and a chip is drawn down to 0.06 of its size (`RING_GONE`; it was 0.15). - Comments explain *why*, at length. Keep the voice. ## Testing diff --git a/draw.html b/draw.html index ce54510..2542fef 100644 --- a/draw.html +++ b/draw.html @@ -2380,8 +2380,10 @@ on the drawing rather than as the scene's index. A light, transparent plate with a blur behind it gives them a surface to stand on and still shows the artwork running underneath. */ - background: var(--bar-bg); - border-top: 1px solid var(--bar-line); + /* NO PLATE (1 Dec 2026, Tom: "Remove the background from the footer."): the tiles are chips with + their own fill and stand on the drawing, as the top bar's do. */ + background: transparent; + border-top: 0; /* THE STRIP TAKES THE POINTER, all 104px of it. It was pointer-events:none with the tiles opting back in, so a press that landed between two thumbnails fell THROUGH to the canvas: you would go to nudge the browser and pan the drawing instead, and a @@ -2799,7 +2801,7 @@ nothing on it yet still has the way in. */ .add-strip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; height: 104px; - background: var(--bar-bg); border-top: 1px solid var(--bar-line); + background: transparent; border-top: 0; /* no plate: "Remove the background from the footer" */ display: none; } body.adding .add-strip { display: block; } @@ -2937,7 +2939,11 @@ name above icon, not belo": the word was under the picture, where a finger pressing the tile covers it) */ .add-strip > .controls > .anim-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--fg); } .add-strip > .controls > .anim-tile svg { width: 36px; height: 36px; } - .add-strip > .controls > .anim-tile .cap { order: -1; font: 10px system-ui, sans-serif; color: var(--fg-muted); line-height: 1; } + /* NO WORD ON A TILE (1 Dec 2026, Tom: "Text is still being shown on the icons in two different ways. Only show + text on the icons tooltip popup."): a tile said its name twice, in a word on its face and in the + name that pops up over it (THE BUTTONS SAY THEIR NAMES). The popup is the one way now; the word is + kept in the tile for a reader of the page and for the tiles whose word is their value. */ + .add-strip > .controls > .anim-tile .cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .add-strip > .controls > .anim-tile.on .cap { color: var(--gold); } /* The edit footer, hidden by the canvas long-press. Edit mode is where the drawing wants the whole window — you are inside one shape, working close — and the footer is the @@ -30831,8 +30837,15 @@

Files

if (currentAngle < 0) currentAngle += n; const w = itemExtent - 16; - const half = Math.max(itemExtent, halfWidth - w / 2); - const H = Math.max(1, half / itemExtent - 1); // the focus's neighbours a pitch apart + let half = Math.max(itemExtent, halfWidth - w / 2); + let H = Math.max(1, half / itemExtent - 1); // the focus's neighbours a pitch apart + // the whole strip, as the button rings (THE RING USES THE WHOLE STRIP at makeRing): the horizon moved + // out until the tile farthest round stands at the strip's end + const mFar = n / 2, E = halfWidth - 6 - 0.2 * w; + if (E > itemExtent * 1.05 && itemExtent * mFar > E * 1.02) { + H = Math.max(0.25, mFar * (E - itemExtent) / (itemExtent * mFar - E)); + half = E * (H + mFar) / mFar; + } _browseGeo = { left: strip.getBoundingClientRect().left, mid: halfWidth, half, H, n }; const X = d => BROWSE_LINE.x(d / H) * half; const f0 = Math.round(currentAngle), seen = new Set(); @@ -30845,7 +30858,7 @@

Files

d -= Math.round(d / n) * n; // the nearer way round const itemX = X(d), room = Math.min(X(d + 1) - itemX, itemX - X(d - 1)); const sc = Math.min(1, room / (w + 4)); - if (sc < 0.15) + if (sc < 0.06) // the button rings' RING_GONE break; // and every one past it has less seen.add(e); show.push({ entIdx: e, itemX, x: itemX + halfWidth, sc }); @@ -57032,6 +57045,9 @@

Files

// // Every chip keeps its own element for its whole life (they are buttons, not the browser's pool of tiles); the // layout decides only where each goes, how large, and whether it shows. + // a chip is drawn down to this share of its size and not below (it was 0.15: the chips stopped a third of the + // strip short of each end; at 0.06 the last ones are specks, and the ring goes on to the strip's ends) + const RING_GONE = 0.06; function makeRing(strip) { if (!strip) return null; @@ -57107,8 +57123,23 @@

Files

return; } wrapF(n); - const mid = W / 2, half = Math.max(ITEM, W / 2 - chipW / 2); - const H = Math.max(1, half / ITEM - 1); // the focus's neighbours a pitch apart: half/(H + 1) = ITEM + const mid = W / 2; + let half = Math.max(ITEM, W / 2 - chipW / 2); + let H = Math.max(1, half / ITEM - 1); // the focus's neighbours a pitch apart: half/(H + 1) = ITEM + // THE RING USES THE WHOLE STRIP (1 Dec 2026, Tom: "The footer should use the full width, it is being + // clipped"). With the horizon at the strip's ends a ring of n chips never got there: the chip farthest + // round (n/2 from the focus) stood at (n/2)/(H + n/2) of the way, and the chips went out at 0.15 of + // their size well before that, so the strip's outer third stood empty at each end and the ring read as + // cut off. It is the same line read from the same vantage, with the horizon moved out past the ends + // until the far side of the ring lands on them: E is where the farthest chip is to stand (the strip's + // end, less any pinned button's room and a small chip's half), and H is solved so that it does while + // the focus's neighbours stay a pitch apart (E(H + m)/(m(H + 1)) = ITEM, m = n/2). `half` is then the + // horizon's distance, past the end. A strip too narrow for that keeps the old reading. + const m = n / 2, E = W / 2 - (+strip.dataset.inset || 0) - 6 - 0.2 * chipW; + if (E > ITEM * 1.05 && ITEM * m > E * 1.02) { + H = Math.max(0.25, m * (E - ITEM) / (ITEM * m - E)); + half = E * (H + m) / m; + } geo = { mid, half, H, n }; const X = d => LINE.x(d / H) * half; btns.forEach((b, k) => { @@ -57116,8 +57147,8 @@

Files

let d = k - f; d -= Math.round(d / n) * n; // the nearer way round const x = X(d), room = Math.min(X(d + 1) - x, x - X(d - 1)), sc = Math.min(1, room / (chipW + 4)); - if (sc < 0.15) { - b.style.setProperty('--ring-s', '0.15'); // so it comes back small + if (sc < RING_GONE) { + b.style.setProperty('--ring-s', String(RING_GONE)); // so it comes back small b.style.display = 'none'; return; } diff --git a/tests/editor.mjs b/tests/editor.mjs index c99a8fc..458fef6 100644 --- a/tests/editor.mjs +++ b/tests/editor.mjs @@ -46,12 +46,29 @@ try { from the grid still adds its shape. */ /* The foot is shown and hidden by a button in the upper left, and a strip tile's name is over its picture (1 Dec 2026, Tom: "On the bottom toolbar, show name above icon, not belo. Show button in upper left to show hide"). */ - await step('the foot: a button in the upper left puts it away and brings it back, and a tile\'s name is over its picture', async () => { + await step('the foot: a button in the upper left puts it away and brings it back, and a tile says its name only in the popup', async () => { await page.evaluate(() => window.__strip.open('grid')); await page.waitForFunction(() => document.querySelector('.add-strip .controls[data-mode="grid"] .anim-tile .cap')); const at = await page.evaluate(() => { const t = document.querySelector('.add-strip .controls[data-mode="grid"] .anim-tile'), c = t.querySelector('.cap').getBoundingClientRect(), g = t.querySelector('svg').getBoundingClientRect(), b = document.getElementById('bFoot').getBoundingClientRect(); return { cap: c.bottom, glyph: g.top, bx: b.left, by: b.top, w: innerWidth }; }); - if (!(at.cap <= at.glyph + 0.5)) throw new Error('the tile\'s name is not over its picture: ' + JSON.stringify(at)); + // (the same day, later: "Only show text on the icons tooltip popup": the word is not on the tile at all; its name + // comes in the popup over it) + const face = await page.evaluate(() => { const t = document.querySelector('.add-strip .controls[data-mode="grid"] .anim-tile'), c = t.querySelector('.cap').getBoundingClientRect(); return { w: c.width, h: c.height, text: t.querySelector('.cap').textContent }; }); + if (face.w > 1.5 || face.h > 1.5 || !face.text) throw new Error('a tile still shows its word on its face: ' + JSON.stringify(face)); + await page.hover('.add-strip .controls[data-mode="grid"] .anim-tile'); + const tip = await page.evaluate(() => window.__buttonName()); + if (!tip || !tip.name) throw new Error('a tile pointed at says no name: ' + JSON.stringify(tip)); + await page.mouse.move(640, 300); + // no plate behind the foot, and a ring of more tiles than fit goes out to both ends of the strip ("Remove the + // background from the footer. The footer should use the full width, it is being clipped.") + await page.evaluate(() => window.__strip.open('fill')); + await page.waitForFunction(() => document.querySelectorAll('.add-strip .controls.on > .icon-btn').length > 20); + const span = await page.evaluate(() => { const xs = [...document.querySelectorAll('.add-strip .controls.on > .icon-btn')].filter(b => b.style.display !== 'none').map(b => b.getBoundingClientRect()).filter(r => r.width > 0); + return { left: Math.min(...xs.map(r => r.left)) / innerWidth, right: Math.max(...xs.map(r => r.right)) / innerWidth, + bg: getComputedStyle(document.getElementById('addStrip')).backgroundColor, bg2: getComputedStyle(document.getElementById('shapeScroller')).backgroundColor }; }); + if (!(span.left < 0.06 && span.right > 0.94)) throw new Error('the ring stops short of the strip\'s ends: ' + JSON.stringify(span)); + if (!/rgba\(0, 0, 0, 0\)|transparent/.test(span.bg) || !/rgba\(0, 0, 0, 0\)|transparent/.test(span.bg2)) throw new Error('the foot has a plate: ' + JSON.stringify(span)); + await page.evaluate(() => window.__strip.open('grid')); if (!(at.bx < 20 && at.by < 40)) throw new Error('the foot\'s button is not in the upper left: ' + JSON.stringify(at)); const shown = () => page.evaluate(() => ({ off: window.__foot.off, strip: getComputedStyle(document.getElementById('addStrip')).display, pressed: document.getElementById('bFoot').getAttribute('aria-expanded') })); await page.click('#bFoot');