From 5eabdae40fc34a8c89944f55332323470fb7bc27 Mon Sep 17 00:00:00 2001 From: Harenome Ranaivoarivony-Razanajato Date: Tue, 24 Nov 2026 14:14:52 +0100 Subject: [PATCH] feat(web): draw every icon for the size it is shown at, 16, 24 or 32 px Each symbol of the sprite holds a 16, a 24 and a 32 drawing, with 1 px lines at 16 and 24 and 2 px at 32, straight lines on whole pixels and a duotone fill. .ic is 16 px, .ic-lg 24 px and .ic-xl 32 px, each showing its own drawing, and no icon keeps a size of its own. Close, remove, add, pager, move, disclosure and dropdown buttons draw sprite icons instead of text glyphs. Icons are named after what they draw, the old names kept as aliases. The nav toggle draws the sidebar folding, Model prices a coin, and Sort by the direction of the sort on. --- app/static/builder/command-builder.css | 12 +- app/static/builder/command-builder.js | 10 +- app/static/builder/model-picker.js | 2 +- app/static/builder/recipes.css | 3 +- app/static/catalogue/catalogue.css | 3 +- app/static/notifications.js | 2 +- app/static/onboarding.css | 1 - app/static/runs/live-board.css | 2 +- app/static/runs/live-board.js | 2 +- app/static/runs/start.css | 2 - app/static/settings/settings.css | 8 +- app/static/style.css | 24 +-- app/static/tables.js | 7 + app/templates/_icons.svg | 205 ++++++++++++++++-------- app/templates/_tables.html | 4 +- app/templates/base.html | 6 +- app/templates/builder/new_run.html | 4 +- app/templates/compare/compare.html | 8 +- app/templates/runs/job.html | 6 +- app/templates/runs/setup.html | 11 +- app/templates/runs/start.html | 4 +- app/templates/settings/custom_keys.html | 2 +- app/templates/settings/settings.html | 12 +- app/templates/traces/_attempts.html | 2 +- app/templates/traces/_conversation.html | 2 +- app/templates/traces/_judgement.html | 2 +- app/tests/test_icons.py | 114 ++++++++++++- app/ui_tests/test_attempt_routes.py | 4 +- 28 files changed, 320 insertions(+), 144 deletions(-) diff --git a/app/static/builder/command-builder.css b/app/static/builder/command-builder.css index 98f86f05..3ffa42ab 100644 --- a/app/static/builder/command-builder.css +++ b/app/static/builder/command-builder.css @@ -1,6 +1,5 @@ #nullius-builder { --nb-bg: var(--bg); --nb-surface: var(--surface); --nb-soft: var(--surface-2); --nb-text: var(--text); --nb-muted: var(--text-dim); --nb-line: var(--border); --nb-blue: var(--accent); --nb-tint: var(--accent-soft); --nb-ok: var(--ok); --nb-warn: var(--warn); --nb-red: var(--bad); color: var(--text); font: 14px/1.5 var(--sans); text-align: left; } -#nullius-builder *{box-sizing:border-box}#nullius-builder button,#nullius-builder input,#nullius-builder select{font:inherit}#nullius-builder button{cursor:pointer}#nullius-builder button:disabled{cursor:default;opacity:.55}#nullius-builder button:focus-visible,#nullius-builder input:focus-visible,#nullius-builder select:focus-visible,#nullius-builder summary:focus-visible{outline:2px solid var(--nb-blue);outline-offset:3px}#nullius-builder [hidden]{display:none!important}#nullius-builder h1,#nullius-builder h2,#nullius-builder h3,#nullius-builder p{margin:0}#nullius-builder h2{font-size:19px;font-weight:500;letter-spacing:-.35px}#nullius-builder h3{font-size:14px;font-weight:500}#nullius-builder small{font-size:12px;color:var(--nb-muted)}#nullius-builder strong{font-weight:500}#nullius-builder .nb-mono{font:12px/1.65 var(--mono);overflow-wrap:anywhere}#nullius-builder .nb-kicker{font:11px/1.5 var(--mono);letter-spacing:1.2px;color:var(--nb-muted);text-transform:uppercase;margin-bottom:9px}#nullius-builder .nb-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--nb-line);color:var(--nb-text);background:var(--nb-surface);border-radius:7px;padding:8px 12px;white-space:nowrap;font-size:12px}#nullius-builder .nb-button:hover{border-color:var(--nb-blue)}#nullius-builder .nb-primary{background:var(--nb-blue);color:var(--nb-bg);border-color:var(--nb-blue)}#nullius-builder .nb-steps{display:flex;gap:4px;border-bottom:1px solid var(--nb-line);margin-bottom:24px}#nullius-builder .nb-step{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:12px 3px;background:none;border:0;border-bottom:2px solid transparent;color:var(--nb-muted);font-size:12px}#nullius-builder .nb-step[aria-pressed=true]{color:var(--nb-blue);border-bottom-color:var(--nb-blue)}#nullius-builder .nb-step em{font:11px var(--mono);font-style:normal;color:inherit}#nullius-builder .nb-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(265px,.68fr);gap:26px;align-items:start}#nullius-builder .nb-editor{min-width:0}#nullius-builder .nb-sectionhead{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px}#nullius-builder .nb-state{font:11px/1.4 var(--mono);color:var(--nb-ok);margin-top:4px;display:block}#nullius-builder .nb-state.warn{color:var(--nb-warn)}#nullius-builder .nb-note{padding:12px 0;color:var(--nb-muted);font-size:12px;line-height:1.7}#nullius-builder .nb-notice{padding:12px 14px;background:var(--nb-soft);border-left:2px solid var(--nb-warn);border-radius:0 6px 6px 0;font-size:12px;color:var(--nb-muted);margin:15px 0}#nullius-builder .nb-notice strong{display:block;color:var(--nb-warn);margin-bottom:3px}#nullius-builder .nb-field{display:grid;gap:7px;color:var(--nb-muted);font-size:12px;margin-bottom:16px}#nullius-builder .nb-field input,#nullius-builder .nb-field select{width:100%;min-width:0;color:var(--nb-text);border:1px solid var(--nb-line);border-radius:7px;background:var(--nb-surface);padding:10px 11px;font-size:13px}#nullius-builder select option{color:var(--nb-text);background:var(--nb-surface)}#nullius-builder .nb-field input[type=checkbox]{width:17px;height:17px;accent-color:var(--nb-blue)}#nullius-builder .nb-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}#nullius-builder input[type=checkbox]{accent-color:var(--nb-blue);width:17px;height:17px;flex-shrink:0}#nullius-builder .nb-subtabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:17px}#nullius-builder .nb-subtab{border:0;background:none;color:var(--nb-muted);border-radius:6px;padding:7px 10px;font-size:12px}#nullius-builder .nb-subtab[aria-pressed=true]{background:var(--nb-soft);color:var(--nb-text)}#nullius-builder .nb-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--nb-line);padding-top:18px;margin-top:23px}#nullius-builder .nb-reviewrow{padding:14px 0;border-bottom:1px solid var(--nb-line);display:flex;justify-content:space-between;align-items:center;gap:12px}#nullius-builder .nb-reviewrow small{display:block;margin-bottom:3px}#nullius-builder .nb-reviewrow strong{overflow-wrap:anywhere}#nullius-builder .nb-custom{border:1px solid var(--nb-line);border-radius:8px;padding:13px;margin-bottom:10px;background:var(--nb-surface)}#nullius-builder .nb-custom .nb-field{margin-bottom:9px}#nullius-builder .nb-rowhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}#nullius-builder .nb-remove{border:0;background:none;color:var(--nb-muted);padding:3px 7px}#nullius-builder .nb-error{color:var(--nb-red);font-size:12px;margin-top:8px}#nullius-builder details{border-top:1px solid var(--nb-line);margin-top:16px;padding-top:12px}#nullius-builder summary{cursor:pointer;font-size:12px;color:var(--nb-muted)}#nullius-builder .nb-badge{color:var(--nb-blue);font-size:11px} -#nullius-builder .ic { width: var(--ic-sm); height: var(--ic-sm); } /* the builder's interface icons: a size under the page's .ic */ +#nullius-builder *{box-sizing:border-box}#nullius-builder button,#nullius-builder input,#nullius-builder select{font:inherit}#nullius-builder button{cursor:pointer}#nullius-builder button:disabled{cursor:default;opacity:.55}#nullius-builder button:focus-visible,#nullius-builder input:focus-visible,#nullius-builder select:focus-visible,#nullius-builder summary:focus-visible{outline:2px solid var(--nb-blue);outline-offset:3px}#nullius-builder [hidden]{display:none!important}#nullius-builder h1,#nullius-builder h2,#nullius-builder h3,#nullius-builder p{margin:0}#nullius-builder h2{font-size:19px;font-weight:500;letter-spacing:-.35px}#nullius-builder h3{font-size:14px;font-weight:500}#nullius-builder small{font-size:12px;color:var(--nb-muted)}#nullius-builder strong{font-weight:500}#nullius-builder .nb-mono{font:12px/1.65 var(--mono);overflow-wrap:anywhere}#nullius-builder .nb-kicker{font:11px/1.5 var(--mono);letter-spacing:1.2px;color:var(--nb-muted);text-transform:uppercase;margin-bottom:9px}#nullius-builder .nb-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--nb-line);color:var(--nb-text);background:var(--nb-surface);border-radius:7px;padding:8px 12px;white-space:nowrap;font-size:12px}#nullius-builder .nb-button:hover{border-color:var(--nb-blue)}#nullius-builder .nb-primary{background:var(--nb-blue);color:var(--nb-bg);border-color:var(--nb-blue)}#nullius-builder .nb-steps{display:flex;gap:4px;border-bottom:1px solid var(--nb-line);margin-bottom:24px}#nullius-builder .nb-step{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:12px 3px;background:none;border:0;border-bottom:2px solid transparent;color:var(--nb-muted);font-size:12px}#nullius-builder .nb-step[aria-pressed=true]{color:var(--nb-blue);border-bottom-color:var(--nb-blue)}#nullius-builder .nb-step em{font:11px var(--mono);font-style:normal;color:inherit}#nullius-builder .nb-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(265px,.68fr);gap:26px;align-items:start}#nullius-builder .nb-editor{min-width:0}#nullius-builder .nb-sectionhead{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:17px}#nullius-builder .nb-state{font:11px/1.4 var(--mono);color:var(--nb-ok);margin-top:4px;display:block}#nullius-builder .nb-state.warn{color:var(--nb-warn)}#nullius-builder .nb-note{padding:12px 0;color:var(--nb-muted);font-size:12px;line-height:1.7}#nullius-builder .nb-notice{padding:12px 14px;background:var(--nb-soft);border-left:2px solid var(--nb-warn);border-radius:0 6px 6px 0;font-size:12px;color:var(--nb-muted);margin:15px 0}#nullius-builder .nb-notice strong{display:block;color:var(--nb-warn);margin-bottom:3px}#nullius-builder .nb-field{display:grid;gap:7px;color:var(--nb-muted);font-size:12px;margin-bottom:16px}#nullius-builder .nb-field input,#nullius-builder .nb-field select{width:100%;min-width:0;color:var(--nb-text);border:1px solid var(--nb-line);border-radius:7px;background:var(--nb-surface);padding:10px 11px;font-size:13px}#nullius-builder select option{color:var(--nb-text);background:var(--nb-surface)}#nullius-builder .nb-field input[type=checkbox]{width:17px;height:17px;accent-color:var(--nb-blue)}#nullius-builder .nb-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}#nullius-builder input[type=checkbox]{accent-color:var(--nb-blue);width:17px;height:17px;flex-shrink:0}#nullius-builder .nb-subtabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:17px}#nullius-builder .nb-subtab{border:0;background:none;color:var(--nb-muted);border-radius:6px;padding:7px 10px;font-size:12px}#nullius-builder .nb-subtab[aria-pressed=true]{background:var(--nb-soft);color:var(--nb-text)}#nullius-builder .nb-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--nb-line);padding-top:18px;margin-top:23px}#nullius-builder .nb-reviewrow{padding:14px 0;border-bottom:1px solid var(--nb-line);display:flex;justify-content:space-between;align-items:center;gap:12px}#nullius-builder .nb-reviewrow small{display:block;margin-bottom:3px}#nullius-builder .nb-reviewrow strong{overflow-wrap:anywhere}#nullius-builder .nb-custom{border:1px solid var(--nb-line);border-radius:8px;padding:13px;margin-bottom:10px;background:var(--nb-surface)}#nullius-builder .nb-custom .nb-field{margin-bottom:9px}#nullius-builder .nb-rowhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}#nullius-builder .nb-remove{display:inline-grid;place-items:center;border:0;background:none;color:var(--nb-muted);padding:3px 7px}#nullius-builder .nb-error{color:var(--nb-red);font-size:12px;margin-top:8px}#nullius-builder details{border-top:1px solid var(--nb-line);margin-top:16px;padding-top:12px}#nullius-builder summary{cursor:pointer;font-size:12px;color:var(--nb-muted)}#nullius-builder .nb-badge{color:var(--nb-blue);font-size:11px} @media(max-width:850px){#nullius-builder .nb-layout{grid-template-columns:1fr}} @media(max-width:520px){#nullius-builder .nb-step{font-size:11px;gap:3px;flex-direction:column}#nullius-builder .nb-two{grid-template-columns:1fr;gap:0}#nullius-builder .nb-field input,#nullius-builder .nb-field select{font-size:16px}} @media(pointer:coarse){#nullius-builder button{min-height:44px}} @@ -14,14 +13,14 @@ #nullius-builder .nb-saved { width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 640px); } #nullius-builder .nb-dialoghead { display: flex; justify-content: space-between; align-items: center; gap: 12px; } #nullius-builder .nb-dialoghead h2 { margin: 0; } -#nullius-builder .nb-dialogclose { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--nb-muted); font-size: 20px; line-height: 1; cursor: pointer; } +#nullius-builder .nb-dialogclose { flex: none; display: grid; place-items: center; padding: 0; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--nb-muted); font-size: 20px; line-height: 1; cursor: pointer; } #nullius-builder .nb-dialogclose:hover { background: var(--nb-soft); color: var(--nb-text); } /* a message: a toast at the bottom right, its bar counting down the seconds it stays; paused while pointed at */ #nullius-builder .nb-toast { position: fixed; inset: auto 16px 16px auto; margin: 0; z-index: 50; display: flex; align-items: center; gap: 12px; box-sizing: border-box; width: max-content; max-width: min(420px, calc(100vw - 32px)); padding: 12px 10px 14px 16px; border: 1px solid var(--nb-line); border-radius: 10px; background: var(--nb-surface); color: var(--nb-text); font-size: 13px; box-shadow: 0 12px 32px #0005; overflow: hidden; } #nullius-builder .nb-toast:not(:popover-open) { display: none; } #nullius-builder .nb-toast[hidden] { display: none; } #nullius-builder .nb-toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; } -#nullius-builder .nb-toast-close { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--nb-muted); font-size: 18px; line-height: 1; cursor: pointer; } +#nullius-builder .nb-toast-close { flex: none; display: grid; place-items: center; padding: 0; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--nb-muted); font-size: 18px; line-height: 1; cursor: pointer; } #nullius-builder .nb-toast-close:hover { background: var(--nb-soft); color: var(--nb-text); } #nullius-builder .nb-toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--nb-blue); transform-origin: left; animation: nb-toast-time 5s linear forwards; } #nullius-builder .nb-toast:hover .nb-toast-bar, #nullius-builder .nb-toast:focus-within .nb-toast-bar { animation-play-state: paused; } @@ -137,7 +136,6 @@ #nullius-builder .nb-fixed { color: var(--nb-text); font-size: 15px; font-weight: 400; } #nullius-builder .nb-radio-mark { flex: none; width: var(--ic-lg); height: var(--ic-lg); border-radius: 6px; color: var(--nb-text); } #nullius-builder .nb-radio-icon { display: grid; place-items: center; color: var(--nb-blue); } -#nullius-builder .nb-radio-icon svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; } /* a button whose request is on its way: a spinner before its words until the answer's toast arrives */ #nullius-builder .nb-button.nb-loading { cursor: progress; opacity: 1; } @@ -156,7 +154,7 @@ #nullius-builder .nb-tile[aria-pressed=true] { border-color: var(--nb-blue); background: var(--nb-tint); } #nullius-builder .nb-tile-head { display: flex; align-items: center; gap: 10px; min-width: 0; } #nullius-builder .nb-tile-head .nb-mark { flex: none; width: 26px; height: 26px; display: grid; place-items: center; color: var(--nb-blue); font-size: 15px; font-weight: 500; } -#nullius-builder .nb-tile-head .nb-mark svg { width: var(--ic-lg); height: var(--ic-lg); } +#nullius-builder .nb-tile-head .nb-mark svg { width: var(--ic-lg); height: var(--ic-lg); } /* the marks; an icon here is .ic-lg */ #nullius-builder .nb-nullius-mark { width: 26px; height: 26px; color: var(--nb-text); } #nullius-builder .nb-tile-head strong { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #nullius-builder .nb-tile-check { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: var(--nb-bg); } @@ -224,7 +222,7 @@ #nullius-builder .nb-model-control { display: flex; position: relative; min-width: 0; } #nullius-builder .nb-model-control input { padding: 6px 36px 6px 11px; min-height: 34px; font-size: 13px; } -#nullius-builder .nb-model-open { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 32px; border: 0; background: transparent; color: var(--nb-muted); border-radius: 7px; } +#nullius-builder .nb-model-open { display: grid; place-items: center; padding: 0; position: absolute; right: 1px; top: 1px; bottom: 1px; width: 32px; border: 0; background: transparent; color: var(--nb-muted); border-radius: 7px; } .nb-model-option { display: flex; flex-direction: column; gap: 2px; } .nb-model-option small, .nb-model-status { color: var(--text-dim); font-size: 12px; } .nb-model-status { padding: 8px 9px; } diff --git a/app/static/builder/command-builder.js b/app/static/builder/command-builder.js index 78c03bbd..ecca0699 100644 --- a/app/static/builder/command-builder.js +++ b/app/static/builder/command-builder.js @@ -33,7 +33,7 @@ return C.servedRow(rec, role, shown(rec, role), out, entry && entry.result); }; const chips = (role, chosen) => chosen.map((slug, i) => `${esc(slug) || '“”'}` - + button('×', `data-served-remove="${i}" data-served-role="${role}" aria-label="Remove ${esc(slug)} from Served by, ${NAME[role]}"`, 'nb-remove') + '').join(''); + + button('', `data-served-remove="${i}" data-served-role="${role}" aria-label="Remove ${esc(slug)} from Served by, ${NAME[role]}"`, 'nb-remove') + '').join(''); const field = (rec, role) => { if (!C.servedRoles(rec).includes(role)) return ''; const s = row(rec, role); return ``; }; @@ -181,7 +181,7 @@ const ref = vocab.filter(a => a.kind === 'reference'), ctl = vocab.filter(a => a.kind === 'control'); if (ref.length) html += `

Benchmark reference

${ref.map(a => chip(a.id, a.label, on(a.id), `title="${esc(a.summary || '')}"`)).join('')}
`; html += `

Under evaluation

${vocab.filter(a => a.kind === 'evaluated').map(a => chip(a.id, a.label, on(a.id), `title="${esc(a.summary || '')}"`)).join('')}` - + rec.customAgents.map((p, i) => `${chip('custom-' + i, 'custom', on('custom-' + i))}${button('×', `data-remove-custom-agent="${i}"`, 'nb-remove')}`).join('') + + rec.customAgents.map((p, i) => `${chip('custom-' + i, 'custom', on('custom-' + i))}${button('', `data-remove-custom-agent="${i}" aria-label="Remove custom agent ${i + 1}"`, 'nb-remove')}`).join('') + button('+ Custom agent', 'id="nb-add-custom-agent"', 'nb-subtab') + '
'; // Harbor's own agents: what the recipe's Harbor registers, once it has been scanned (Runner step). const builtin = vocab.filter(a => a.kind === 'builtin'); @@ -401,7 +401,7 @@ // Harbor's own mark where Harbor fetches the tasks; a plain icon where no one's mark belongs. Square tiles, so // a mark is never read as a second radio button. const HARBOR_MARK = ''; - const iconTile = name => ``; + const iconTile = name => ``; const SOURCE_MARK = { hub: HARBOR_MARK, registry: HARBOR_MARK, local: iconTile('folder'), generate: iconTile('wand') }; const SOURCE_HINT = { hub: 'Harbor fetches the tasks when the run starts.', registry: 'Harbor fetches the tasks when the run starts.', @@ -649,11 +649,11 @@ } // one tile: {attr, key, on, title, mark, line, note, meta, foot, data (more attributes), tip (its title)} const tile = t => `'; // a machine to run on: this one or a host, its connection state filled in by Test connection - const icon = name => ``; + const icon = name => ``; const machineTile = (attr, v, t, sub, on) => tile({attr, key: v, on, mark: v === 'local' ? icon('machine') : icon('network'), title: t, tip: sub, foot: v !== 'local' ? `` : ''}); // The grids drawn by the server and run by the card toolkit (tables.js): the Benchmark step's (/new-run/benchmarks, diff --git a/app/static/builder/model-picker.js b/app/static/builder/model-picker.js index 25c64740..53a83521 100644 --- a/app/static/builder/model-picker.js +++ b/app/static/builder/model-picker.js @@ -140,7 +140,7 @@ input.setAttribute('role', 'combobox'); input.setAttribute('aria-autocomplete', 'list'); input.setAttribute('aria-expanded', 'false'); input.setAttribute('aria-controls', 'provider-models-' + (++serial)); const wrap = document.createElement('span'); wrap.className = 'nb-model-control'; input.before(wrap); wrap.append(input); - const button = document.createElement('button'); button.type = 'button'; button.className = 'nb-model-open'; button.textContent = '⌄'; + const button = document.createElement('button'); button.type = 'button'; button.className = 'nb-model-open'; button.innerHTML = ''; button.setAttribute('aria-label', severalOf(input) ? 'Browse the serving providers' : 'Browse provider models'); button.addEventListener('click', e => { e.preventDefault(); input.focus(); void open(input, true); }); wrap.append(button); input.addEventListener('focus', () => { if(!choosing)void open(input); }); diff --git a/app/static/builder/recipes.css b/app/static/builder/recipes.css index 62a393be..f6a1ab9c 100644 --- a/app/static/builder/recipes.css +++ b/app/static/builder/recipes.css @@ -1,14 +1,13 @@ /* The Recipes page: one row per saved recipe; Info and Delete in one dialog (the Launches page's, runs/launches.css). */ .rcp-name { overflow-wrap: anywhere; } /* a name wraps, never cut */ .rcp-warn { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12.5px; color: var(--patch_failed_tests); cursor: help; } -.rcp-warn .ic { width: 14px; height: 14px; } .rcp-val { display: block; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* the whole value is its tooltip */ #recipes td[data-col="name"] { white-space: normal; } dialog.std-how.launch-delete.wide { width: min(56rem, calc(100vw - 32px)); } .launch-delete .rcp-problems { list-style: none; padding: 0; margin: 12px 0 0; } .rcp-problems li { display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; margin-top: 4px; border-radius: 8px; font-size: 13px; background: color-mix(in srgb, var(--patch_failed_tests) 12%, var(--surface)); } -.rcp-problems .ic { width: 14px; height: 14px; color: var(--patch_failed_tests); align-self: center; } +.rcp-problems .ic { color: var(--patch_failed_tests); align-self: center; } .rcp-step h3 em { font-style: normal; margin-right: 8px; } .rcp-row { display: grid; grid-template-columns: minmax(7rem, 12rem) 1fr; gap: 12px; padding: 4px 0; border-top: 1px solid var(--border-soft); } .rcp-row small { color: var(--text-dim); } diff --git a/app/static/catalogue/catalogue.css b/app/static/catalogue/catalogue.css index fa87a01f..4087a55b 100644 --- a/app/static/catalogue/catalogue.css +++ b/app/static/catalogue/catalogue.css @@ -40,7 +40,7 @@ tr:has([data-pick]:not(:disabled)) { cursor: pointer; } :is(.bench-card:has(> .bench-card-title [data-pick][aria-pressed="true"]), .table-wrap .grid tbody tr:has([data-pick]:checked) > td) > * { --accent-soft: var(--pick-fill); --border: var(--pick-line); } .pick-check { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--btn-fg); visibility: hidden; } -.pick-check .ic { width: 12px; height: 12px; stroke-width: 3; } +.pick-check .ic { --ic-w16: 2; } /* 2px: a 1px diagonal breaks up, white on the accent */ .bench-card:has([data-pick][aria-pressed="true"]) .pick-check { visibility: visible; } .bench-card:has(> .bench-card-title [data-pick]:disabled) { opacity: .55; } .bench-card:has(> .bench-card-title [data-pick]:disabled):hover { border-color: var(--border-soft); } @@ -364,7 +364,6 @@ dialog.std-how::backdrop { background: rgba(0, 0, 0, .45); } .std-hostreq { margin-top: 14px; } /* what some options need on the machine: a note on the card, not a way to run */ .bench-card-setup { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .78rem; color: var(--text-dim); } -.bench-card-setup svg { width: 13px; height: 13px; flex: none; } a.std-need { font-size: .78rem; color: var(--text-dim); text-decoration: underline dotted; } .std-setups { --setup-padding: 22px; } diff --git a/app/static/notifications.js b/app/static/notifications.js index 097a500a..5a5127fa 100644 --- a/app/static/notifications.js +++ b/app/static/notifications.js @@ -17,7 +17,7 @@ if (key) [...tray.children].filter(t => t.dataset.noticeKey === key).forEach(t => t.remove()); const toast = document.createElement('div'); toast.className = 'toast ' + (error ? 'bad' : 'ok'); toast.dataset.noticeKey = key; const text = document.createElement('span'); text.className = 'toast-text'; text.textContent = message; - const close = document.createElement('button'); close.type = 'button'; close.className = 'toast-close'; close.setAttribute('aria-label', 'Dismiss'); close.textContent = '×'; + const close = document.createElement('button'); close.type = 'button'; close.className = 'toast-close'; close.setAttribute('aria-label', 'Dismiss'); close.innerHTML = ''; const bar = document.createElement('span'); bar.className = 'toast-bar'; bar.setAttribute('aria-hidden', 'true'); const dismiss = () => { toast.remove(); if (!tray.children.length) tray.remove(); }; close.addEventListener('click', dismiss); bar.addEventListener('animationend', dismiss); diff --git a/app/static/onboarding.css b/app/static/onboarding.css index 79080837..ded67d03 100644 --- a/app/static/onboarding.css +++ b/app/static/onboarding.css @@ -61,7 +61,6 @@ body.onb-open .shell { margin-right: 310px; } .onb-rail { position: relative; } .onb-rail .onb-x { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: var(--text-faint); cursor: pointer; padding: 0; } -.onb-rail .onb-x .ic { width: 13px; height: 13px; } .onb-rail .onb-count { margin-right: 22px; } .onb-rail .onb-x:hover { background: var(--surface-2); color: var(--text); } :root[data-rail="collapsed"] .onb-rail .onb-x { display: none; } diff --git a/app/static/runs/live-board.css b/app/static/runs/live-board.css index b8da7721..f961e883 100644 --- a/app/static/runs/live-board.css +++ b/app/static/runs/live-board.css @@ -124,7 +124,7 @@ .lb-drawer header { display: flex; align-items: start; justify-content: space-between; gap: 10px; } .lb-drawer h3 { margin: 0; font: 500 13.5px/1.35 var(--mono); text-transform: none; letter-spacing: 0; color: var(--text); overflow-wrap: anywhere; } .lb-drawer h3 small { display: block; margin-top: 3px; font: 400 12px var(--sans); text-transform: none; letter-spacing: 0; color: var(--text-dim); } -.lb-x { width: 28px; height: 28px; flex: none; border: 1px solid var(--lb-hair); border-radius: 7px; background: var(--surface); cursor: pointer; font-size: 16px; line-height: 1; color: var(--text-dim); } +.lb-x { display: grid; place-items: center; padding: 0; width: 28px; height: 28px; flex: none; border: 1px solid var(--lb-hair); border-radius: 7px; background: var(--surface); cursor: pointer; font-size: 16px; line-height: 1; color: var(--text-dim); } .lb-river { display: grid; gap: 6px; } .lb-rl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); } .lb-track { position: relative; height: 22px; border-radius: 4px; background: var(--lb-track); } diff --git a/app/static/runs/live-board.js b/app/static/runs/live-board.js index b7a9d787..07f396f3 100644 --- a/app/static/runs/live-board.js +++ b/app/static/runs/live-board.js @@ -256,7 +256,7 @@ : t.state === 'running' ? `${PHASE_LABEL[t.phase] || t.phase}, ${clock(t.elapsed_sec)} of ${t.timeout_sec ? clock(t.timeout_sec) : 'no limit'}` : stateOf(s) === 'finished' ? 'Not run' : `Queued${t.position != null ? ', position ' + (t.position + 1) : ''}`; const href = trialHref(t, opts); - return `

${esc(shortTask(t))}${esc(state)}${t.agent ? ' · ' + esc(t.agent) : ''}

+ return `

${esc(shortTask(t))}${esc(state)}${t.agent ? ' · ' + esc(t.agent) : ''}

${t0 == null ? 'not started' : hms(starts[keys[0]])}${tl.ended ? 'ended ' + hms(tl.ended) : limEnd ? 'limit ' + clock(limEnd - t0) + ' in' : ''}
${segs}
${phases}
${t.state !== 'running' && (t.activity || t.last_line) ? `

Last line, redacted${redacted(t.activity || t.last_line)}

` : ''} diff --git a/app/static/runs/start.css b/app/static/runs/start.css index 5b215f86..8c44e8e7 100644 --- a/app/static/runs/start.css +++ b/app/static/runs/start.css @@ -5,7 +5,6 @@ .start-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; } .start-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 2vw, 36px); border: 1px solid var(--border-soft); border-radius: 14px; background: var(--surface); color: var(--text); } .start-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-strong); } -.start-ic .ic { width: 20px; height: 20px; } .start-t { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: -.01em; text-transform: none; color: var(--text); } .start-d { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-dim); } .start-go { margin-top: auto; font-size: 14px; color: var(--accent); white-space: nowrap; } @@ -24,7 +23,6 @@ .start-card { min-height: clamp(256px, 22vh, 320px); box-shadow: var(--shadow); } .start-ic { flex: none; width: 42px; height: 42px; border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent); } -.start-ic .ic { width: 22px; height: 22px; } .start-action { display: inline-flex; align-items: center; gap: 16px; align-self: flex-start; margin-top: auto; padding: 10px 15px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 500; } .start-action:hover { text-decoration: none; border-color: var(--accent); } .start-primary { background: var(--accent); color: var(--btn-fg); border-color: transparent; } diff --git a/app/static/settings/settings.css b/app/static/settings/settings.css index 66c20c84..f1d5793b 100644 --- a/app/static/settings/settings.css +++ b/app/static/settings/settings.css @@ -28,7 +28,7 @@ .st-card { margin: 0; padding: 16px 20px 14px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; min-width: 0; } .st-card legend { display: inline-flex; align-items: center; gap: 9px; padding: 0 6px; font-weight: 500; font-size: 15px; } .st-logo { width: var(--ic-lg); height: var(--ic-lg); flex: none; color: var(--text); } -.st-icon { width: 20px; height: 20px; margin: 2px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--text-dim); } +.st-icon { margin: 4px; color: var(--text-dim); } /* a 16 px icon in a logo's 24 px slot */ .st-card-unset { border-style: dashed; background: color-mix(in srgb, var(--surface) 55%, var(--bg)); } /* a card's rows: a label, then what it holds - an endpoint, a key, a field */ .st-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 16px; align-items: center; } @@ -56,7 +56,6 @@ .st-key-card { border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); min-width: 0; overflow: hidden; } .st-key-summary { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 18px 20px; } .st-key-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--text-dim); } -.st-key-icon svg { width: 21px; height: 21px; } .st-key-copy { min-width: 0; } .st-key-copy h3, .st-key-new h3 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); overflow-wrap: anywhere; } .st-key-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint); white-space: nowrap; } @@ -162,7 +161,7 @@ .st-constraint:has(.st-slider:not([hidden])) { margin-bottom: 0; } .st-constraint > .st-slider { grid-column: 1 / -1; grid-row: 1; margin-bottom: 14px; } } -.st-clear { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: inherit; font: inherit; line-height: 1; cursor: pointer; opacity: .55; } +.st-clear { flex: none; display: grid; place-items: center; padding: 0; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: inherit; font: inherit; line-height: 1; cursor: pointer; opacity: .55; } .st-clear:hover, .st-clear:focus-visible { opacity: 1; background: color-mix(in srgb, var(--bad) 20%, transparent); } .st-clear.off { visibility: hidden; } .st-slider { grid-column: 1; } @@ -229,7 +228,6 @@ .st-nav-label { margin: 20px 12px 6px; font-size: 12px; color: var(--text-faint); } .st-index a { justify-content: flex-start; gap: 10px; } .st-index a span { color: inherit; font-size: 15px; } -.st-index a .ic { flex: none; width: 17px; height: 17px; } .st-index [hidden] { display: none; } .st-search-empty { padding: 8px 12px; font-size: 13px; color: var(--text-dim); } .st-theme-options { display: flex; flex-wrap: wrap; gap: 8px; } @@ -271,7 +269,6 @@ .st-provider-add span { font-size: 18px; font-weight: 400; line-height: 1; } .st-provider-back { align-self: flex-start; } .st-provider-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; } -#providers [data-provider-test-all] .ic, #providers [data-provider-test] .ic { width: 15px; height: 15px; } .st-provider-test:empty { display: none; } /* a phone: the actions take their own row under the name */ @media (max-width: 560px) { #providers .st-provider-summary { flex-wrap: wrap; justify-content: flex-end; } #providers .st-provider-summary > div { flex-basis: calc(100% - 34px); } } @@ -318,7 +315,6 @@ .st-sandbox-rows > .st-row + .st-row { padding-top: 14px; border-top: 1px solid var(--border-soft); } .settings-page .st-sandbox-rows .st-input { height: 34px; min-height: 34px; padding-block: 0; } .settings-page #sandbox .st-row-value.st-value, .settings-page #prices .st-row-value.st-value, .settings-page #data-providers .st-row-value.st-value { flex-direction: row; justify-content: flex-start; align-items: center; } -#prices [data-prices-update] .ic { width: 15px; height: 15px; } #prices [data-prices-update].busy .ic { animation: st-prices-spin .9s linear infinite; } @keyframes st-prices-spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { #prices [data-prices-update].busy .ic { animation: none; } } diff --git a/app/static/style.css b/app/static/style.css index 78accf26..83a27e22 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -6,6 +6,7 @@ --topbar-height: 56px; --ic-sm: 16px; /* an interface icon: inline with text, in a button, a row */ --ic-lg: 24px; /* an interface icon standing as a tile; a logo in a card, a row or a tile */ + --ic-xl: 32px; /* an interface icon at its largest drawn size */ --tool-h: 2.1rem; /* a page's buttons and a table's controls: as tall as a small button with its icon */ --h1-size: clamp(1.75rem, 2.5vw, 2.15rem); --head-gap: 1.5rem; /* under a page's head, on every page */ @@ -339,7 +340,7 @@ tr.tone-good .jdot { background: #4cc26a; } tr.tone-warn .jdot { background: #d9 tr.tone-good .jbar .fill { background: #4cc26a; } tr.tone-warn .jbar .fill { background: #d9a933; } tr.tone-bad .jbar .fill { background: #ee6b7a; } .jbar .floor { position: absolute; top: 0; height: 100%; background: repeating-linear-gradient(135deg, rgba(212, 167, 44, 0.55) 0 2px, transparent 2px 5px); } .jmore { width: 2rem; text-align: right; } -.jdisclose { border: 0; background: none; color: var(--text-dim); font-size: 1.2rem; cursor: pointer; padding: 0 .3rem; } +.jdisclose { display: inline-grid; place-items: center; border: 0; background: none; color: var(--text-dim); font-size: 1.2rem; cursor: pointer; padding: 0 .3rem; } .jdisclose[aria-expanded="true"] { transform: rotate(90deg); } .flag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.8em; font-weight: 500; border: 1px solid var(--border-soft); } .flag.raised { color: var(--bad); border-color: currentColor; } @@ -394,14 +395,12 @@ button.seg:hover { filter: brightness(1.25); } .seg-toggle > [aria-current="true"], .seg-toggle > [aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); } /* a search box, its icon first (the Settings page's too) */ .st-search { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: var(--surface-2); color: var(--text-dim); } -.st-search .ic { flex: none; width: 17px; height: 17px; } .st-search input { min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font: 13px var(--sans); } .st-search input:focus-visible { outline: none; } .st-search:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } /* the toolkit's one clear control; the browser's own is hidden */ .st-search [data-search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } .st-search-clear { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin: -2px -4px -2px 0; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--text-faint); cursor: pointer; } -.st-search-clear .ic { width: 14px; height: 14px; } .st-search-clear:hover { color: var(--text); background: var(--surface); } .st-search-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; } .menu-wrap { position: relative; } @@ -537,6 +536,7 @@ button.seg:hover { filter: brightness(1.25); } .grid.compare tr.row-differs { background: color-mix(in srgb, var(--patch_failed_tests) 8%, transparent); } .grid.compare tr.row-differs td:first-child { box-shadow: inset 2px 0 0 var(--patch_failed_tests); } .disclose { + display: inline-grid; place-items: center; font: inherit; font-size: .8rem; cursor: pointer; width: 1.4rem; background: none; border: none; padding: 0; margin-right: .3rem; color: var(--text-faint); @@ -1077,7 +1077,7 @@ tr.control-row td { color: var(--text-dim); } .attempt-tab:hover { color: var(--text); border-color: var(--text-faint); } .attempt-tab[aria-current] { color: var(--text); background: var(--accent-soft); border-color: var(--accent); font-weight: 600; } .attempt-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } -.attempt-retried { width: 12px; height: 12px; margin-left: -.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; } +.attempt-retried { margin-left: -.15rem; } /* an attempt's tries, when its runner kept the ones before its last: tabs of their own under the attempt's, underlined, the last the one that counts */ .try-tabs { display: flex; flex-wrap: wrap; gap: 0 1.2rem; width: fit-content; max-width: 100%; margin-top: .6rem; padding-right: .4rem; border-bottom: 1px solid var(--border); } @@ -1190,6 +1190,7 @@ pre.msg { color: var(--text); max-height: 220px; } .path-row { display: flex; gap: .6rem; margin-bottom: .5rem; align-items: center; } .row-x { font: inherit; font-size: .9rem; cursor: pointer; flex: none; + display: inline-grid; place-items: center; padding: 0; width: 2.6rem; height: 2.6rem; border-radius: 8px; background: none; color: var(--text-faint); border: 1px solid transparent; @@ -1289,11 +1290,11 @@ input[type=text].invalid:focus { box-shadow: inset 0 0 0 1px var(--bad); } .alert { position: relative; padding-right: 2.1rem; } .alert-x { position: absolute; top: .35rem; right: .4rem; + display: grid; place-items: center; padding: 0; width: 1.5rem; height: 1.5rem; line-height: 1; cursor: pointer; background: none; border: none; border-radius: 6px; color: inherit; opacity: .5; font: inherit; font-size: .9rem; } -.alert-x::before { content: "×"; } .alert-x:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); } .alert-x:focus-visible { outline: none; opacity: 1; box-shadow: 0 0 0 2px var(--accent-soft); } @@ -1491,7 +1492,10 @@ a.chip { text-decoration: none; } @media (prefers-reduced-motion: no-preference) { .shell { transition: grid-template-columns .16s ease; } } -.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } +.ic { width: var(--ic-sm); height: var(--ic-sm); flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; } +/* A symbol drawn per size shows its 16-grid drawing unless the icon is sized --ic-lg or --ic-xl: each such rule picks its drawing. */ +.ic-lg { width: var(--ic-lg); height: var(--ic-lg); --ic-d16: none; --ic-d24: inline; --ic-d32: none; } +.ic-xl { width: var(--ic-xl); height: var(--ic-xl); --ic-d16: none; --ic-d24: none; --ic-d32: inline; } .side-top { display: flex; align-items: center; justify-content: space-between; gap: .3rem; padding: .1rem .45rem .65rem; min-height: 42px; } .side .brand { font-size: 1.35rem; font-weight: 500; gap: .5rem; padding: 0; letter-spacing: -.05em; } @@ -1532,7 +1536,7 @@ a.chip { text-decoration: none; } .ws-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; flex: 1; } .ws-caption { font-size: .69rem; color: var(--text-dim); line-height: 1.4; margin-bottom: 3px; } .ws-label { font-weight: 500; font-size: .88rem; line-height: 1.35; overflow-wrap: anywhere; } /* a name wraps, never cut */ -.ws-chev { color: var(--text-faint); width: 16px; height: 16px; } +.ws-chev { color: var(--text-faint); } .ws-pop { position: absolute; top: calc(100% + 8px); left: 0; width: 272px; max-width: calc(100vw - 24px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; @@ -1633,7 +1637,7 @@ a.chip { text-decoration: none; } } .tree-caret:hover { color: var(--text); background: var(--surface); } .tree-caret:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; } -.tree-caret .ic { width: 15px; height: 15px; transition: transform .12s; } +.tree-caret .ic { transition: transform .12s; } .nav-tree.folded .tree-caret .ic { transform: rotate(-90deg); } .tree-kids { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 .2rem .9rem; padding-left: .55rem; border-left: 1px solid var(--border-soft); } .tree-item { @@ -1740,7 +1744,7 @@ pre.instruction { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 32 .toast { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 10px 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; box-shadow: 0 12px 32px #0005; overflow: hidden; } .toast.bad { border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); } .toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; } -.toast-close { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text-dim); font-size: 18px; line-height: 1; cursor: pointer; } +.toast-close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text-dim); font-size: 18px; line-height: 1; cursor: pointer; } .toast-close:hover { background: var(--surface-2); color: var(--text); } .toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform-origin: left; animation: toast-time 5s linear forwards; } .toast.bad .toast-bar { background: var(--bad); animation-duration: 10s; } @@ -1843,7 +1847,7 @@ select.ui-select-native { display: none !important; } /* Bundled upstream agent marks, shared by catalogue pages and the builder. */ .agent-logo { display: block; width: 100%; height: 100%; object-fit: contain; flex: none; } -.nav-agent-logo { width: 18px; height: 18px; } +.nav-agent-logo { width: var(--ic-sm); height: var(--ic-sm); } /* A mark with its own version for dark backgrounds: the one that suits the theme. */ :root[data-theme="dark"] .on-light-bg, :root:not([data-theme="dark"]) .on-dark-bg { display: none; } diff --git a/app/static/tables.js b/app/static/tables.js index fa09f614..b4156e16 100644 --- a/app/static/tables.js +++ b/app/static/tables.js @@ -192,6 +192,11 @@ window.NulliusTable = { /* A table's controls row: narrow's search and Filter, and the Sort by menu, which sets the sort and follows a header click. Returns {passes, resort}, as narrow and sortable do. */ + /* Sort by's icon, when it has one, says the direction of the sort on, or none. */ + sortIcon(btn, on, dir) { + btn?.querySelector('use')?.setAttribute('href', on ? (dir > 0 ? '#i-sort-asc' : '#i-sort-desc') : '#i-sort'); + }, + toolbar(table, tools, changed) { const passes = this.narrow(tools, changed); const [sbtn, smenu] = [tools.querySelector('[data-tools-btn="sort"]'), tools.querySelector('[data-tools="sort"]')]; @@ -201,6 +206,7 @@ window.NulliusTable = { const {col, dir} = resort.state(), on = col === null ? '' : heads[col].dataset.col; smenu.querySelectorAll('[data-sort-col]').forEach(r => { r.checked = r.value === on; }); smenu.querySelectorAll('[data-sort-dir]').forEach(r => { r.checked = Boolean(on) && r.value === (dir > 0 ? 'asc' : 'desc'); r.disabled = !on; }); + this.sortIcon(sbtn, on, dir); }; const resort = this.sortable(table, () => { sync(); changed(); }); if (smenu) { @@ -279,6 +285,7 @@ window.NulliusTable = { const c = smenu.querySelector('[data-sort-col]:checked'), on = c.value, num = c.dataset.type === 'num'; const dir = e?.target.matches('[data-sort-dir]') ? (e.target.value === 'asc' ? 1 : -1) : (num ? -1 : 1); dirs.forEach(r => { r.checked = Boolean(on) && r.value === (dir > 0 ? 'asc' : 'desc'); r.disabled = !on; }); + this.sortIcon(sbtn, on, dir); const key = card => { const raw = card.getAttribute('data-s-' + on) ?? ''; return num ? parseFloat(raw) || 0 : raw.toLowerCase(); }; (on ? [...items].sort((a, b) => { const x = key(a), y = key(b); return (x < y ? -1 : x > y ? 1 : 0) * dir; }) : items).forEach(c => c.parentNode.appendChild(c)); }; diff --git a/app/templates/_icons.svg b/app/templates/_icons.svg index adf75c87..29618160 100644 --- a/app/templates/_icons.svg +++ b/app/templates/_icons.svg @@ -1,77 +1,152 @@ {#- The interface's icons, included by base.html: one symbol each, referenced by . - Hand-drawn on a 24-grid, stroke only, so they take the item's colour and weight (`.ic` in style.css). #} + Stroked in the item's colour (`.ic` in style.css), most with a tone under the strokes: the same colour at + --ic-duo's opacity. A redrawn symbol holds three drawings, one per + displayed size, each on its own grid and never scaled: a 16-grid and a 24-grid with a 1 px stroke, a 32-grid + with a 2 px stroke, horizontal and vertical lines on whole pixels. Detail is only added as the size grows, never + removed: what a smaller drawing shows, each larger one shows too. The size picks one through + --ic-d16/--ic-d24/--ic-d32 (style.css). + An alias is a second id for a symbol: its only child a of it, never of another alias. #} diff --git a/app/templates/_tables.html b/app/templates/_tables.html index 1cfe06b7..384cb1da 100644 --- a/app/templates/_tables.html +++ b/app/templates/_tables.html @@ -167,9 +167,9 @@
- + - +
{% endmacro %} diff --git a/app/templates/base.html b/app/templates/base.html index aaa24685..fd439811 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -403,11 +403,11 @@ {% endif %} {#- Every notice a page is sent (Flask's flash) is a toast at the bottom left, as the builder's: it goes after a - few seconds - an error after twice as many - its bar counting them, paused while pointed at, or on its ×. #} + few seconds - an error after twice as many - its bar counting them, paused while pointed at, or on its close. #} {% set notices = get_flashed_messages(with_categories=true) %} {% if notices %}
- {% for category, message in notices %}
{{ message }}
{% endfor %} + {% for category, message in notices %}
{{ message }}
{% endfor %}