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
8 changes: 8 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,14 @@ compatibly.
- A pinch selects nothing (the same day, A PINCH SELECTS NOTHING; "pinching should not select objects"): when the second
finger lands the first finger's press is spent and the selection put back as it stood before it (`_pressSelBefore`).
- A tile with no name, count or note has no tip ("Remove tool tip long press to change name").
- The foot is shown and hidden by a button (1 Dec 2026, THE FOOT IS SHOWN AND HIDDEN in `draw.html`; Tom: "On the bottom
toolbar, show name above icon, not belo. Show button in upper left to show hide. Bottom toolbar, the same as games
header"): `#bFoot`, pinned in the top bar's upper left as the menu's button is in its upper right (a direct child of
`.topbar`, not one of the ring's), toggles `body.foot-off`, which hides the drawing's strip, a tool's strip, the
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`).
- Comments explain *why*, at length. Keep the voice.

## Testing
Expand Down
81 changes: 76 additions & 5 deletions draw.html
Original file line number Diff line number Diff line change
Expand Up @@ -1918,6 +1918,18 @@
button#gearBtn.icon-btn { position: absolute; right: 8px; top: calc(50% + 1px); transform: translateY(-50%); z-index: 300; }
/* (its chip is the bar's own: "The menu button itself should have the same style as the buttons on the toolbar") */
button#gearBtn.icon-btn:hover { transform: translateY(-50%); }
/* THE FOOT'S BUTTON, the menu's twin at the other end: pinned over the ring in the upper left, the bar's own
chip, gold while the foot is put away (so a page with no foot says where it went). */
button#bFoot.icon-btn { position: absolute; left: 8px; top: calc(50% + 1px); transform: translateY(-50%); z-index: 300; }
button#bFoot.icon-btn:hover { transform: translateY(-50%); }
/* THE FOOT PUT AWAY: everything that stands at the foot of the scene view goes, and the canvas has the
room (the shape bar's margin is what kept it; resizeCanvas is run after). !important as chrome-off's
rule is, for the modes' more specific ones. */
body.foot-off .shape-bar,
body.foot-off .shape-scroller,
body.foot-off .add-strip,
body.foot-off #animBar,
body.foot-off #aiBar { display: none !important; }
/* The settings panel is the topmost layer in the app, above the edit bar, the
shape bar and every popover. It was already above them by declaration order,
but on nothing more than "no one else set a z-index" — one stacking context
Expand Down Expand Up @@ -2921,10 +2933,11 @@
ANIMATION'S CONTROLS ARE A TABLE, NOT A BAR). */
body.morphing #shapeBar { display: flex; height: 0; min-height: 0; padding: 0; overflow: hidden; margin-bottom: 104px; }
body.morphing.anim-bar #shapeBar { margin-bottom: calc(104px + var(--anim-h, 52px)); }
/* a tile of the animation's strips is a picture with its word under it */
/* a tile of the strips is a picture with its word over it (1 Dec 2026, Tom: "On the bottom toolbar, show
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 { font: 10px system-ui, sans-serif; color: var(--fg-muted); line-height: 1; }
.add-strip > .controls > .anim-tile .cap { order: -1; font: 10px system-ui, sans-serif; color: var(--fg-muted); line-height: 1; }
.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
Expand Down Expand Up @@ -3160,6 +3173,7 @@
/* Pinned to the RIGHT so it never spins out of reach: settings is the way out of
any mess, and a ring has no fixed slots to keep it in. */
button#gearBtn.icon-btn { top: calc(50% + 4px); }
button#bFoot.icon-btn { top: calc(50% + 4px); }
/* The lock gets the mirror treatment on the left, and for the same reason: the ring
has no fixed slots, and "spin the bar to find the lock" is not a thing anyone
would guess either. */
Expand Down Expand Up @@ -3843,6 +3857,14 @@
<path d="M4 6.5h16M4 12h16M4 17.5h16"/>
</svg>
</button>
<!-- THE FOOT'S BUTTON (1 Dec 2026, Tom: "Show button in upper left to show hide", of the bottom toolbar, "the same
as games header"): pinned in the bar's upper left as the menu's is in its upper right, where the games
page keeps the button that brings its bottom row. See THE FOOT IS SHOWN AND HIDDEN in the script. -->
<button id="bFoot" class="icon-btn" title="hide the bottom toolbar" aria-label="Bottom toolbar" aria-controls="addStrip" aria-expanded="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3.5" y="4.5" width="17" height="15" rx="2.5"/><path d="M3.5 14.5h17"/><path d="M7.5 17h.01M12 17h.01M16.5 17h.01"/>
</svg>
</button>
</div>

<!-- The colour popover stood here, opened by the two toolbar buttons. Both are gone:
Expand Down Expand Up @@ -57065,9 +57087,13 @@ <h4>Files</h4>
// offsetWidth); a hidden one is taken at the widest chip's width; and a chip's size is written before it is shown.
const ws = btns.map(b => (b.style.display === 'none' ? 0 : b.offsetWidth) || chipW);
const sum = ws.reduce((a, w) => a + w, 0);
if (sum + (n - 1) * GAP_MIN <= W - 2 * GAP_MIN) { // they fit: one even row, centred
// a strip with a button pinned over each end (the top bar: the foot's and the menu's) counts that room as
// taken, so a row that would only just fit does not stand its first and last chips under them; it is
// a ring then, and a ring runs under them as it turns (`data-inset`, the room at each end)
const inset = +strip.dataset.inset || 0;
if (sum + (n - 1) * GAP_MIN <= W - 2 * GAP_MIN - 2 * inset) { // they fit: one even row, centred
f = 0;
const g = Math.max(GAP_MIN, Math.min(GAP, (W - sum) / (n + 1)));
const g = Math.max(GAP_MIN, Math.min(GAP, (W - 2 * inset - sum) / (n + 1)));
let x = (W - sum - (n - 1) * g) / 2;
btns.forEach((b, i) => {
b.style.setProperty('--ring-s', '1');
Expand Down Expand Up @@ -57393,6 +57419,7 @@ <h4>Files</h4>
// lock, Shapes, Draw and Fill whole.
// (the lock led the ring from 15 Nov 2026; it is the menu's since the 16th, THE LOCK IS THE MENU'S, and is held off the bar above)
}
document.querySelector('.topbar .controls').dataset.inset = '44';
const _topRing = makeRing(document.querySelector('.topbar .controls'));
if (_topRing)
_topRing.focus(1); // (the second chip at the focus, so Shapes, Draw and Fill are the three drawn largest; 27 Nov 2026, the new ring: a half-way focus left none at full size)
Expand Down Expand Up @@ -59030,6 +59057,50 @@ <h4>Files</h4>
};
})();

// THE FOOT IS SHOWN AND HIDDEN (1 Dec 2026, Tom: "Show button in upper left to show hide", with "On the bottom
// toolbar, show name above icon" and "Bottom toolbar, the same as games header"). The foot of the scene view
// (the drawing's strip, a tool's strip, the animation's bar, the AI's) takes a sixth of a phone's screen and
// could only be turned to something else, never put away: the hold that hid the bars went on 13 Nov, and the
// tour is the one thing left that hides them. So a button, pinned in the upper left as the menu's is in the
// upper right, where the games page keeps the button for its bottom row. A press puts the foot away and the
// drawing has the room; a press brings it back as it was (the strip's mode is not touched, only not shown).
// A press on one of the top bar's own buttons brings it back too, since what such a button does is said at
// the foot and a press that showed nothing would look like a button that does nothing. It is remembered,
// as the lock is. window.__foot is for the checks.
(function() {
const b = $('bFoot'), KEY = 'tangent.footOffV1';
if (!b)
return;
function set(off, quiet) {
off = !!off;
if (document.body.classList.contains('foot-off') === off)
return;
document.body.classList.toggle('foot-off', off);
b.classList.toggle('active', off);
b.setAttribute('aria-expanded', String(!off)); // not aria-pressed: that is how a top-bar button says its strip is up
b.title = off ? 'show the bottom toolbar' : 'hide the bottom toolbar';
try {
localStorage.setItem(KEY, off ? '1' : '0');
} catch (_) {}
if (typeof resizeCanvas === 'function')
resizeCanvas();
if (!quiet)
drawAll();
}
b.addEventListener('click', () => set(!document.body.classList.contains('foot-off')));
document.addEventListener('click', e => {
if (document.body.classList.contains('foot-off') && e.target && e.target.closest && e.target.closest('.topbar .controls .icon-btn'))
set(false);
}, true);
window.__foot = { set, get off() { return document.body.classList.contains('foot-off'); } };
let was = '';
try {
was = localStorage.getItem(KEY) || '';
} catch (_) {}
if (was === '1')
setTimeout(() => set(true), 0);
})();

// THE BUTTONS SAY THEIR NAMES (13 Nov 2026, Tom: "The header buttons should show button title", and "what do
// you think?" to a label under every icon, a name that pops up, or both). The top bar is thirty icons with no
// words, and what each one is was told only by its title: a sentence, which a mouse sees after a second's
Expand All @@ -59056,7 +59127,7 @@ <h4>Files</h4>
bDrawLine: 'Straight lines', bDrawShape: 'Drag out a shape', bPlot: 'Plot a formula', bText: 'Text',
bAi: 'AI', bArrows: 'Line', bDrawMenu: 'Draw', bAlign: 'Align', bGroup: 'Group', bMergeTop: 'Merge', bOrder: 'Order', bSelStrip: 'Selection', bArrangeOpen: 'Arrange',
bMorphOpen: 'Morph', bTools: 'Mirror', bRead: 'Reading', bGrid: 'Grid', bTourStrip: 'Tour',
bStyle: 'Fill', bLine: 'Outline', bDesc: 'Name and note', bFit: 'Fit to view', gearBtn: 'Settings',
bStyle: 'Fill', bLine: 'Outline', bDesc: 'Name and note', bFit: 'Fit to view', gearBtn: 'Settings', bFoot: 'Footer',
// the edit view's bar
bLockEdit: 'Lock', bCancelEdit: 'Close', bUndoEdit: 'Undo', bRedoEdit: 'Redo',
bLeafVH: 'Tangent construction', bAutoEdit: 'Walk the contour', bCascadeEdit: 'Cascade dial',
Expand Down
18 changes: 18 additions & 0 deletions tests/editor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ try {
/* The shapes panel draws its hundred tiles when it is first opened, not as the page starts (12 Nov 2026, the
tiles were nearly all that panel's start-up cost): none before the press, all of them after it, and a pick
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 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));
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');
let st = await shown(); if (!st.off || st.strip !== 'none' || st.pressed !== 'false') throw new Error('a press did not put the foot away: ' + JSON.stringify(st));
await page.click('#bStyle'); // a top-bar button's values are said at the foot: its press brings the foot back
st = await shown(); if (st.off || st.strip === 'none') throw new Error('a top-bar button did not bring the foot back: ' + JSON.stringify(st));
await page.click('#bFoot'); await page.click('#bFoot');
st = await shown(); if (st.off || st.strip === 'none' || st.pressed !== 'true') throw new Error('a second press did not bring the foot back: ' + JSON.stringify(st));
await page.evaluate(() => { window.__strip.open(null); try { localStorage.removeItem('tangent.footOffV1'); } catch (_) {} });
});
/* The top bar's buttons say their names (13 Nov 2026, Tom: "The header buttons should show button title"): under
the button while the mouse is over it, gone when it leaves. */
await step('the header buttons say their names', async () => {
Expand Down