forge
Explore
Log in

Don't you dare go Hollow

A setting's control now sits right beside its label on one straight edge, with its hint after it, instead of at the far end of the row

Browse files at this commit

c6433ed60a5bf38fd0042495a3d266f34f9942ffAhmet Kaan GümüşParent: c4b949a
All checks have passed
Show checks
  • style
    • a setting's control now sits right beside its label on one straight edge, with its hint after it, instead of at the far end of the row
    • long settings pages are split into categories, Appearance fits one screen, and Notifications no longer has lines outside its rows
    • Explore moves from the top right to the profile corner, and repo lists get more room
  • feat
    • every job in the run page's Jobs column opens a dropdown of its steps, each with its own progress
    • search matches the rest of the app: a 640px panel with icons, category headings that stay in view, key chips and no duplicate rows
Show full message
💄 style: a setting's control now sits right beside its label on one straight edge, with its hint after it, instead of at the far end of the row; long settings pages are split into categories, Appearance fits one screen, and Notifications no longer has lines outside its rows; ✨ feat: every job in the run page's Jobs column opens a dropdown of its steps, each with its own progress; search matches the rest of the app: a 640px panel with icons, category headings that stay in view, key chips and no duplicate rows; 💄 style: Explore moves from the top right to the profile corner, and repo lists get more room
crates/forge-web/assets/nav.jsmodified+115 -12
@@ -283,6 +283,26 @@
283 syncJobAll();283 syncJobAll();
284 }284 }
285 285
286+ // A job's steps dropdown (details[data-steps-job]) the reader opened or shut is marked data-touched;
287+ // a live swap or a soft navigation keeps that state for the same job. Untouched ones take the server's
288+ // default: open for the selected job.
289+ function captureSteps() {
290+ var out = {};
291+ Array.prototype.forEach.call(document.querySelectorAll('details[data-steps-job][data-touched]'), function (d) {
292+ out[d.getAttribute('data-steps-job')] = d.open;
293+ });
294+ return out;
295+ }
296+
297+ function restoreSteps(kept) {
298+ Array.prototype.forEach.call(document.querySelectorAll('details[data-steps-job]'), function (d) {
299+ var id = d.getAttribute('data-steps-job');
300+ if (!Object.prototype.hasOwnProperty.call(kept, id)) { return; }
301+ d.open = kept[id];
302+ d.setAttribute('data-touched', 'true');
303+ });
304+ }
305+
286 document.addEventListener('click', function (e) {306 document.addEventListener('click', function (e) {
287 var el = e.target && e.target.closest ? e.target : null;307 var el = e.target && e.target.closest ? e.target : null;
288 if (!el) { return; }308 if (!el) { return; }
@@ -293,6 +313,9 @@
293 syncJobAll();313 syncJobAll();
294 return;314 return;
295 }315 }
316+ // The steps toggle is a summary: the browser opens or shuts it, and only the mark is set here.
317+ var steps = el.closest('.ci-tl-steptoggle');
318+ if (steps && steps.parentNode) { steps.parentNode.setAttribute('data-touched', 'true'); return; }
296 var btn = el.closest('[data-job-toggle]');319 var btn = el.closest('[data-job-toggle]');
297 if (!btn) { return; }320 if (!btn) { return; }
298 var li = btn.closest('[data-job-row]');321 var li = btn.closest('[data-job-row]');
@@ -338,7 +361,9 @@
338 // A fit pane keeps its scroll when the page stays put (a live change, a post, a filter), by its place in the page.361 // A fit pane keeps its scroll when the page stays put (a live change, a post, a filter), by its place in the page.
339 var paneTops = how === 'live' || how === 'post' || how === 'query' ? paneScrolls() : null;362 var paneTops = how === 'live' || how === 'post' || how === 'query' ? paneScrolls() : null;
340 var bars = how === 'live' ? barSegments() : null;363 var bars = how === 'live' ? barSegments() : null;
364+ var steps = captureSteps();
341 adopt(doc, keepFields, dd, how === 'live' ? captureJobs() : null);365 adopt(doc, keepFields, dd, how === 'live' ? captureJobs() : null);
366+ restoreSteps(steps);
342 placeRun(listTop);367 placeRun(listTop);
343 if (bars) { growBars(bars); }368 if (bars) { growBars(bars); }
344 if (paneTops) { setPaneScrolls(paneTops); }369 if (paneTops) { setPaneScrolls(paneTops); }
@@ -4008,7 +4033,9 @@
4008 return {4033 return {
4009 label: opener.getAttribute('aria-label') || '',4034 label: opener.getAttribute('aria-label') || '',
4010 placeholder: word('placeholder'),4035 placeholder: word('placeholder'),
4011- hint: word('hint'),4036+ move: word('key-move'),
4037+ open: word('key-open'),
4038+ close: word('key-close'),
4012 empty: word('empty'),4039 empty: word('empty'),
4013 loading: word('loading'),4040 loading: word('loading'),
4014 failed: word('failed'),4041 failed: word('failed'),
@@ -4413,6 +4440,56 @@
4413 opts[pal.sel].scrollIntoView({ block: 'nearest' });4440 opts[pal.sel].scrollIntoView({ block: 'nearest' });
4414 }4441 }
4415 4442
4443+ // The stroke paths of each row's icon, by kind. A page that searches settings text uses the setting's.
4444+ var PALETTE_ICON = {
4445+ repo: ['M4 6.5A1.5 1.5 0 0 1 5.5 5H10l2 2h6.5A1.5 1.5 0 0 1 20 8.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 17.5z'],
4446+ org: ['M3 21h18', 'M5 21V9l7-5 7 5v12', 'M10 21v-5h4v5'],
4447+ page: ['M7 3h7l5 5v13H7z', 'M14 3v5h5', 'M9.5 13h5', 'M9.5 17h5'],
4448+ setting: ['M4 7h9', 'M17 7h3', 'M4 17h3', 'M11 17h9', 'M13 5v4', 'M7 15v4'],
4449+ file: ['M9 8l-4 4 4 4', 'M15 8l4 4-4 4', 'M13 6l-2 12'],
4450+ action: ['M13 3L5 14h6l-1 7 8-11h-6z'],
4451+ search: ['M11 4a7 7 0 1 1 0 14 7 7 0 0 1 0-14z', 'M20 20l-3.5-3.5']
4452+ };
4453+
4454+ function paletteIcon(item) {
4455+ var key = item.kind === 'page' && item.scan ? 'setting' : item.kind;
4456+ var ns = 'http://www.w3.org/2000/svg';
4457+ var svg = document.createElementNS(ns, 'svg');
4458+ svg.setAttribute('class', 'palette-ico');
4459+ svg.setAttribute('viewBox', '0 0 24 24');
4460+ svg.setAttribute('aria-hidden', 'true');
4461+ (PALETTE_ICON[key] || PALETTE_ICON.page).forEach(function (d) {
4462+ var p = document.createElementNS(ns, 'path');
4463+ p.setAttribute('d', d);
4464+ svg.appendChild(p);
4465+ });
4466+ return svg;
4467+ }
4468+
4469+ // A label's text, split after its last "/" so the path is muted and the last segment reads as the
4470+ // name. The two spans together hold the same text as the label.
4471+ function paletteLabel(label) {
4472+ var box = document.createElement('span');
4473+ box.className = 'palette-label';
4474+ var at = label.lastIndexOf('/');
4475+ if (at < 0 || at === label.length - 1) {
4476+ var whole = document.createElement('span');
4477+ whole.className = 'palette-name';
4478+ whole.textContent = label;
4479+ box.appendChild(whole);
4480+ return box;
4481+ }
4482+ var path = document.createElement('span');
4483+ path.className = 'palette-path';
4484+ path.textContent = label.slice(0, at + 1);
4485+ var name = document.createElement('span');
4486+ name.className = 'palette-name palette-tail';
4487+ name.textContent = label.slice(at + 1);
4488+ box.appendChild(path);
4489+ box.appendChild(name);
4490+ return box;
4491+ }
4492+
4416 // Filters and draws the list. Groups keep the order of their best match, so a page named exactly4493 // Filters and draws the list. Groups keep the order of their best match, so a page named exactly
4417 // like the query leads; with no query, the order is tabs, repos, orgs, then pages.4494 // like the query leads; with no query, the order is tabs, repos, orgs, then pages.
4418 function renderPalette() {4495 function renderPalette() {
@@ -4443,6 +4520,14 @@
4443 scored = scored.filter(function (h) { return !h.item.near; });4520 scored = scored.filter(function (h) { return !h.item.near; });
4444 }4521 }
4445 scored.sort(function (a, b) { return b.score - a.score || a.idx - b.idx; });4522 scored.sort(function (a, b) { return b.score - a.score || a.idx - b.idx; });
4523+ // Two routes to one place read as the same row twice; the better match stays.
4524+ var seen = {};
4525+ scored = scored.filter(function (h) {
4526+ var key = h.item.kind + '\n' + h.item.label;
4527+ if (seen[key]) { return false; }
4528+ seen[key] = true;
4529+ return true;
4530+ });
4446 scored = scored.slice(0, PALETTE_MAX);4531 scored = scored.slice(0, PALETTE_MAX);
4447 var kinds = [], groups = {};4532 var kinds = [], groups = {};
4448 scored.forEach(function (h) {4533 scored.forEach(function (h) {
@@ -4476,7 +4561,8 @@
4476 li.setAttribute('role', 'option');4561 li.setAttribute('role', 'option');
4477 li.setAttribute('aria-selected', 'false');4562 li.setAttribute('aria-selected', 'false');
4478 li.setAttribute('data-n', String(n));4563 li.setAttribute('data-n', String(n));
4479- li.textContent = item.label;4564+ li.appendChild(paletteIcon(item));
4565+ li.appendChild(paletteLabel(item.label));
4480 if (item.why) {4566 if (item.why) {
4481 var why = document.createElement('span');4567 var why = document.createElement('span');
4482 why.className = 'palette-why';4568 why.className = 'palette-why';
@@ -4486,9 +4572,8 @@
4486 pal.list.appendChild(li);4572 pal.list.appendChild(li);
4487 });4573 });
4488 });4574 });
4489- pal.note.className = 'palette-note muted small';
4490 if (pal.hits.length) {4575 if (pal.hits.length) {
4491- pal.note.textContent = pal.str.hint;4576+ paletteNote('');
4492 paletteSelect(0);4577 paletteSelect(0);
4493 // With no query Enter must not run an action: the selection starts on the first destination.4578 // With no query Enter must not run an action: the selection starts on the first destination.
4494 if ((!raw || idle) && pal.hits[0].kind === 'action') {4579 if ((!raw || idle) && pal.hits[0].kind === 'action') {
@@ -4497,7 +4582,7 @@
4497 }4582 }
4498 }4583 }
4499 } else {4584 } else {
4500- pal.note.textContent = pal.failed ? pal.str.failed : (pal.data ? pal.str.empty : pal.str.loading);4585+ paletteNote(pal.failed ? pal.str.failed : (pal.data ? pal.str.empty : pal.str.loading));
4501 pal.input.removeAttribute('aria-activedescendant');4586 pal.input.removeAttribute('aria-activedescendant');
4502 }4587 }
4503 }4588 }
@@ -4537,10 +4622,11 @@
4537 load({ target: withoutHash(url), dest: url, init: GET_INIT, how: 'nav', keep: false, post: false, form: null });4622 load({ target: withoutHash(url), dest: url, init: GET_INIT, how: 'nav', keep: false, post: false, form: null });
4538 }4623 }
4539 4624
4540- // Shows a line in the palette's footer, in the colour of its state.4625+ // Shows a line above the key chips, in the colour of its state. An empty text hides the line.
4541 function paletteNote(text, state) {4626 function paletteNote(text, state) {
4542- pal.note.textContent = text;4627+ pal.note.textContent = text || '';
4543 pal.note.className = 'palette-note muted small' + (state ? ' ' + state : '');4628 pal.note.className = 'palette-note muted small' + (state ? ' ' + state : '');
4629+ pal.note.hidden = !text;
4544 }4630 }
4545 4631
4546 // Sends a state-changing control's form as the control itself would: its csrf field and other4632 // Sends a state-changing control's form as the control itself would: its csrf field and other
@@ -4613,6 +4699,22 @@
4613 pal.input = dlg.querySelector('.palette-input');4699 pal.input = dlg.querySelector('.palette-input');
4614 pal.list = dlg.querySelector('.palette-list');4700 pal.list = dlg.querySelector('.palette-list');
4615 pal.note = dlg.querySelector('.palette-note');4701 pal.note = dlg.querySelector('.palette-note');
4702+ pal.note.hidden = true;
4703+ // The footer's key chips: the words beside them are set on each open, in the viewer's language.
4704+ var keys = document.createElement('div');
4705+ keys.className = 'palette-keys';
4706+ pal.keyWords = [];
4707+ [['↑↓'], ['↵'], ['Esc']].forEach(function (key) {
4708+ var chip = document.createElement('span');
4709+ var kbd = document.createElement('kbd');
4710+ kbd.textContent = key[0];
4711+ var word = document.createElement('span');
4712+ chip.appendChild(kbd);
4713+ chip.appendChild(word);
4714+ keys.appendChild(chip);
4715+ pal.keyWords.push(word);
4716+ });
4717+ dlg.querySelector('.palette-box').appendChild(keys);
4616 4718
4617 pal.input.addEventListener('input', renderPalette);4719 pal.input.addEventListener('input', renderPalette);
4618 pal.input.addEventListener('keydown', function (e) {4720 pal.input.addEventListener('keydown', function (e) {
@@ -4665,8 +4767,9 @@
4665 dlg.setAttribute('aria-label', pal.str.label);4767 dlg.setAttribute('aria-label', pal.str.label);
4666 pal.input.placeholder = pal.str.placeholder;4768 pal.input.placeholder = pal.str.placeholder;
4667 pal.input.setAttribute('aria-label', pal.str.placeholder);4769 pal.input.setAttribute('aria-label', pal.str.placeholder);
4668- // Over the path bar when there is one: the dialog's top and left edges sit at the bar's, and it is4770+ [pal.str.move, pal.str.open, pal.str.close].forEach(function (word, i) { pal.keyWords[i].textContent = word; });
4669- // at least 360px wide (never wider than the viewport).4771+ // Over the path bar when there is one: the dialog's top edge sits under the bar and its left edge
4772+ // at the bar's, kept inside the window.
4670 var bar = document.querySelector('.pathbar');4773 var bar = document.querySelector('.pathbar');
4671 if (bar) { anchorPalette(dlg, bar.getBoundingClientRect()); } else { unanchorPalette(dlg); }4774 if (bar) { anchorPalette(dlg, bar.getBoundingClientRect()); } else { unanchorPalette(dlg); }
4672 if (typeof dlg.showModal !== 'function') { return; }4775 if (typeof dlg.showModal !== 'function') { return; }
@@ -4685,19 +4788,19 @@
4685 }4788 }
4686 4789
4687 function anchorPalette(dlg, rect) {4790 function anchorPalette(dlg, rect) {
4688- var width = Math.min(Math.max(360, rect.width), window.innerWidth - 16);4791+ // The width is the stylesheet's (at most 640px, inside the window), so the bar's width never sets it.
4792+ // Only the left edge is clamped, to the width the stylesheet gives the dialog at this window size.
4793+ var width = Math.min(640, window.innerWidth - (window.innerWidth <= 600 ? 16 : 32));
4689 var left = Math.max(8, Math.min(rect.left, window.innerWidth - width - 8));4794 var left = Math.max(8, Math.min(rect.left, window.innerWidth - width - 8));
4690 dlg.classList.add('anchored');4795 dlg.classList.add('anchored');
4691 dlg.style.top = Math.round(rect.bottom + 4) + 'px';4796 dlg.style.top = Math.round(rect.bottom + 4) + 'px';
4692 dlg.style.left = Math.round(left) + 'px';4797 dlg.style.left = Math.round(left) + 'px';
4693- dlg.style.width = Math.round(width) + 'px';
4694 }4798 }
4695 4799
4696 function unanchorPalette(dlg) {4800 function unanchorPalette(dlg) {
4697 dlg.classList.remove('anchored');4801 dlg.classList.remove('anchored');
4698 dlg.style.top = '';4802 dlg.style.top = '';
4699 dlg.style.left = '';4803 dlg.style.left = '';
4700- dlg.style.width = '';
4701 }4804 }
4702 4805
4703 // Ctrl+K and Cmd+K toggle the palette even while a text field has focus, since that is when a4806 // Ctrl+K and Cmd+K toggle the palette even while a text field has focus, since that is when a
crates/forge-web/src/pages/admin_backups.rsmodified+2 -0
@@ -154,6 +154,7 @@ async fn backups_view(
154 }154 }
155 <section class="card rows-pane" aria-label=(g::t(lang, K::Settings))>155 <section class="card rows-pane" aria-label=(g::t(lang, K::Settings))>
156 if settings.enabled {156 if settings.enabled {
157+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Configuration", "Yapılandırma"))</h2>
157 <div class="row-line">158 <div class="row-line">
158 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>159 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>
159 <div class="row-main">160 <div class="row-main">
@@ -198,6 +199,7 @@ async fn backups_view(
198 </div>199 </div>
199 </div>200 </div>
200 }201 }
202+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Run now", "Şimdi çalıştır"))</h2>
201 <div class="row-line">203 <div class="row-line">
202 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 4l13 8-13 8z"/></svg>204 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 4l13 8-13 8z"/></svg>
203 <div class="row-main">205 <div class="row-main">
crates/forge-web/src/pages/admin_mail.rsmodified+1 -0
@@ -285,6 +285,7 @@ async fn mail_view(
285 </span>285 </span>
286 <span class="row-control"><input type="password" name="password" autocomplete="new-password" maxlength="1024"></span>286 <span class="row-control"><input type="password" name="password" autocomplete="new-password" maxlength="1024"></span>
287 </label>287 </label>
288+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Sending", "Gönderim"))</h2>
288 <label class="row-line row-field">289 <label class="row-line row-field">
289 <span class="row-main"><span class="row-title">(g::t(lang, K::FromAddress))</span></span>290 <span class="row-main"><span class="row-title">(g::t(lang, K::FromAddress))</span></span>
290 <span class="row-control"><input type="email" name="from_addr" value=(data.from_addr.as_str()) maxlength="254"></span>291 <span class="row-control"><input type="email" name="from_addr" value=(data.from_addr.as_str()) maxlength="254"></span>
crates/forge-web/src/pages/admin_replication.rsmodified+2 -0
@@ -200,6 +200,7 @@ async fn replication_view(
200 }200 }
201 <section class="card rows-pane" aria-label=(g::t(lang, K::Standby))>201 <section class="card rows-pane" aria-label=(g::t(lang, K::Standby))>
202 if data.enabled {202 if data.enabled {
203+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Target and schedule", "Hedef ve zamanlama"))</h2>
203 <div class="row-line">204 <div class="row-line">
204 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h13l-3-3M20 17H7l3 3"/></svg>205 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h13l-3-3M20 17H7l3 3"/></svg>
205 <div class="row-main">206 <div class="row-main">
@@ -221,6 +222,7 @@ async fn replication_view(
221 <p class="row-status">(data.healthcheck)</p>222 <p class="row-status">(data.healthcheck)</p>
222 </div>223 </div>
223 </div>224 </div>
225+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Status", "Durum"))</h2>
224 <div class="row-line">226 <div class="row-line">
225 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="6" rx="8" ry="3"/><path d="M4 6v12c0 1.7 3.6 3 8 3s8-1.3 8-3V6"/><path d="M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/></svg>227 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="6" rx="8" ry="3"/><path d="M4 6v12c0 1.7 3.6 3 8 3s8-1.3 8-3V6"/><path d="M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/></svg>
226 <div class="row-main">228 <div class="row-main">
crates/forge-web/src/pages/ci_runs.rsmodified+95 -36
@@ -420,13 +420,14 @@ struct JobLine {
420 rerun: Option<String>,420 rerun: Option<String>,
421 /// A running job whose cancel was requested: it shows as stopping until its runner stops it.421 /// A running job whose cancel was requested: it shows as stopping until its runner stops it.
422 stopping: bool,422 stopping: bool,
423- /// The job's steps under its row. Only the selected job has lines; the others have none.423+ /// The job's steps, a dropdown under its row. Every job has its lines; only the selected job's
424+ /// step carries the log's mark.
424 steps: Vec<StepLine>,425 steps: Vec<StepLine>,
425 /// The job's bar along the bottom of its row: one segment per step. Empty for a job with no steps.426 /// The job's bar along the bottom of its row: one segment per step. Empty for a job with no steps.
426 step_bar: Vec<Rect>,427 step_bar: Vec<Rect>,
427 }428 }
428 429
429-/// One step of the selected job, drawn as a line under its row in the jobs pane.430+/// One step of a job, drawn as a line under its row in the jobs pane.
430 struct StepLine {431 struct StepLine {
431 name: String,432 name: String,
432 /// The classes of the step's mark, which carry its state's colour.433 /// The classes of the step's mark, which carry its state's colour.
@@ -439,6 +440,15 @@ struct StepLine {
439 /// The link that opens the step's part of the log. None when the job's log was pruned.440 /// The link that opens the step's part of the log. None when the job's log was pruned.
440 href: Option<String>,441 href: Option<String>,
441 selected: bool,442 selected: bool,
443+ /// The step's progress bar value: 100 when finished, the share of the expected time when running
444+ /// with an estimate, and None (indeterminate) when running without one.
445+ value: Option<String>,
446+ /// A running step's share of its expected time, capped at 99. None when there is no estimate.
447+ pct: Option<String>,
448+ /// A running step's expected duration in seconds, which the page script counts the bar against.
449+ expected_secs: Option<String>,
450+ /// The state class of the step's progress bar, which sets its fill colour.
451+ state_class: &'static str,
442 }452 }
443 453
444 /// One artifact of the run: its download link, the job that made it, its name and size.454 /// One artifact of the run: its download link, the job that made it, its name and size.
@@ -1358,9 +1368,9 @@ fn step_bar(steps: &[BarStep]) -> Vec<Rect> {
1358 rects1368 rects
1359 }1369 }
1360 1370
1361-/// The rail's step lines of a job and the bar under its row. The lines are kept for the selected job1371+/// The rail's step lines of a job and the bar under its row. Every job gets its lines, the dropdown
1362-/// only, and `wanted` marks the step the log shows. A running step's expected time comes from the1372+/// under its row; `wanted` marks the step the log shows and is passed for the selected job only. A
1363-/// repo's step samples.1373+/// running step's expected time comes from the repo's step samples.
1364 fn job_steps(1374 fn job_steps(
1365 job: &Timing,1375 job: &Timing,
1366 steps: &[JobStep],1376 steps: &[JobStep],
@@ -1391,6 +1401,10 @@ fn job_steps(
1391 });1401 });
1392 // A step of a job whose log was pruned has no part of the log to open.1402 // A step of a job whose log was pruned has no part of the log to open.
1393 let href = (job.log_bytes != 0).then(|| format!("{pick}&step={}", step.seq));1403 let href = (job.log_bytes != 0).then(|| format!("{pick}&step={}", step.seq));
1404+ // Only a running step with an estimate has a share; one without is indeterminate, never a guess.
1405+ let pct = expected
1406+ .filter(|secs| *secs > 0)
1407+ .map(|secs| (elapsed * 100 / secs).min(99).to_string());
1394 lines.push(StepLine {1408 lines.push(StepLine {
1395 name: step.name.clone(),1409 name: step.name.clone(),
1396 mark: match state {1410 mark: match state {
@@ -1408,6 +1422,21 @@ fn job_steps(
1408 expected: expected.map(|secs| format!("~{}", span_text(secs))),1422 expected: expected.map(|secs| format!("~{}", span_text(secs))),
1409 selected: href.is_some() && wanted == Some(step.seq),1423 selected: href.is_some() && wanted == Some(step.seq),
1410 href,1424 href,
1425+ value: if running {
1426+ pct.clone()
1427+ } else {
1428+ Some("100".to_owned())
1429+ },
1430+ expected_secs: expected
1431+ .filter(|secs| *secs > 0)
1432+ .map(|secs| secs.to_string()),
1433+ pct,
1434+ state_class: match state {
1435+ StepState::Passed => "ci-sp-pass",
1436+ StepState::Running => "ci-sp-run",
1437+ StepState::Failed => "ci-sp-fail",
1438+ StepState::Cancelled => "ci-sp-off",
1439+ },
1411 });1440 });
1412 }1441 }
1413 (lines, step_bar(&bar))1442 (lines, step_bar(&bar))
@@ -1904,7 +1933,11 @@ async fn run_detail(
1904 &step_samples,1933 &step_samples,
1905 run,1934 run,
1906 &pick,1935 &pick,
1907- wanted_step,1936+ if picked == Some(index) {
1937+ wanted_step
1938+ } else {
1939+ None
1940+ },
1908 now,1941 now,
1909 lang,1942 lang,
1910 );1943 );
@@ -1925,11 +1958,7 @@ async fn run_detail(
1925 lines.push(JobLine {1958 lines.push(JobLine {
1926 id: job.id.clone(),1959 id: job.id.clone(),
1927 selected: picked == Some(index),1960 selected: picked == Some(index),
1928- steps: if picked == Some(index) {1961+ steps,
1929- steps
1930- } else {
1931- Vec::new()
1932- },
1933 step_bar,1962 step_bar,
1934 pick,1963 pick,
1935 expanded: !tail.is_empty() && starts_expanded(job.state, jobs.len()),1964 expanded: !tail.is_empty() && starts_expanded(job.state, jobs.len()),
@@ -2408,10 +2437,31 @@ async fn run_head(lang: Lang, run: &RunDetail, all_href: Option<String>) -> Resu
2408 })2437 })
2409 }2438 }
2410 2439
2440+/// The class of a job's row: `ci-tl-sub` for a matrix combination, `ci-tl-hassteps` when its steps
2441+/// dropdown sits under the row.
2442+fn job_row_class(job: &JobLine) -> Option<&'static str> {
2443+ match (job.sub, job.steps.is_empty()) {
2444+ (true, false) => Some("ci-tl-sub ci-tl-hassteps"),
2445+ (true, true) => Some("ci-tl-sub"),
2446+ (false, false) => Some("ci-tl-hassteps"),
2447+ (false, true) => None,
2448+ }
2449+}
2450+
2451+/// The class of a step's row under its job: a matrix combination's steps sit one level in.
2452+fn step_class(sub: bool) -> &'static str {
2453+ if sub {
2454+ "ci-tl-step ci-tl-step-sub"
2455+ } else {
2456+ "ci-tl-step"
2457+ }
2458+}
2459+
2411 /// The jobs pane (300 px): `Jobs`, one 36 px row per job with its dot, name, image and time at the right,2460 /// The jobs pane (300 px): `Jobs`, one 36 px row per job with its dot, name, image and time at the right,
2412-/// then the run's artifacts. The selected job is the one the log shows.2461+/// then the run's artifacts. Each job's steps are a dropdown under its row, open for the selected job.
2413 #[component]2462 #[component]
2414 async fn run_jobs(lang: Lang, run: &RunDetail) -> Result<impl View> {2463 async fn run_jobs(lang: Lang, run: &RunDetail) -> Result<impl View> {
2464+ let steps_label = crate::pages::passkeys::s(lang, "Steps", "Adımlar");
2415 Ok(view! {2465 Ok(view! {
2416 <section class="ci-pane ci-tl-jobs">2466 <section class="ci-pane ci-tl-jobs">
2417 <h2 class="ci-tl-label">(g::t(lang, K::Jobs))</h2>2467 <h2 class="ci-tl-label">(g::t(lang, K::Jobs))</h2>
@@ -2423,7 +2473,7 @@ async fn run_jobs(lang: Lang, run: &RunDetail) -> Result<impl View> {
2423 if let Some(group) = job.group.as_ref() {2473 if let Some(group) = job.group.as_ref() {
2424 <li class="ci-tl-group">(group.as_str())</li>2474 <li class="ci-tl-group">(group.as_str())</li>
2425 }2475 }
2426- <li class=(job.sub.then_some("ci-tl-sub")) data-kb-row="">2476+ <li class=(job_row_class(job)) data-kb-row="">
2427 <a class="ci-tl-job" href=(job.pick.as_str()) aria-current=(if job.selected { "true" } else { "false" })>2477 <a class="ci-tl-job" href=(job.pick.as_str()) aria-current=(if job.selected { "true" } else { "false" })>
2428 <span class=(job.dot.as_str())></span>2478 <span class=(job.dot.as_str())></span>
2429 <span class="ci-tl-name">(job.name.as_str())</span>2479 <span class="ci-tl-name">(job.name.as_str())</span>
@@ -2446,30 +2496,39 @@ async fn run_jobs(lang: Lang, run: &RunDetail) -> Result<impl View> {
2446 </svg>2496 </svg>
2447 }2497 }
2448 </a>2498 </a>
2449- </li>2499+ if !job.steps.is_empty() {
2450- for step in job.steps.iter() {2500+ <details class="ci-tl-steps" data-steps-job=(job.id.as_str()) open=(job.selected)>
2451- <li data-kb-row="">2501+ <summary class="ci-tl-steptoggle" aria-label=(steps_label)><span class="ci-chev" aria-hidden="true"></span></summary>
2452- if let Some(href) = step.href.as_ref() {2502+ <ul class="ci-tl-steplist">
2453- <a class=(if job.sub { "ci-tl-step ci-tl-step-sub" } else { "ci-tl-step" }) href=(href.as_str()) aria-current=(if step.selected { "true" } else { "false" })>2503+ for step in job.steps.iter() {
2454- <span class=(format!("ci-tl-stepmark {}", step.mark))></span>2504+ <li>
2455- <span class="ci-tl-stepname">(step.name.as_str())</span>2505+ if let Some(href) = step.href.as_ref() {
2456- <span class="ci-tl-dur" data-since=(step.since.as_deref())>(step.duration.as_str())</span>2506+ <a class=(step_class(job.sub)) href=(href.as_str()) aria-current=(if step.selected { "true" } else { "false" })>
2457- if let Some(expected) = step.expected.as_ref() {2507+ <span class=(format!("ci-tl-stepmark {}", step.mark))></span>
2458- <span class="ci-tl-stepexp">(expected.as_str())</span>2508+ <span class="ci-tl-stepname">(step.name.as_str())</span>
2459- }2509+ <span class="ci-tl-dur" data-since=(step.since.as_deref())>(step.duration.as_str())</span>
2460- </a>2510+ if let Some(expected) = step.expected.as_ref() {
2461- } else {2511+ <span class="ci-tl-stepexp">(expected.as_str())</span>
2462- <div class=(if job.sub { "ci-tl-step ci-tl-step-sub" } else { "ci-tl-step" })>2512+ }
2463- <span class=(format!("ci-tl-stepmark {}", step.mark))></span>2513+ <progress class=(format!("ci-est ci-tl-stepprog {}", step.state_class)) max="100" value=(step.value.as_deref()) data-est=(step.pct.as_ref().map(|_| "true")) data-since=(step.pct.as_ref().and_then(|_| step.since.as_deref())) data-expected=(step.expected_secs.as_deref())></progress>
2464- <span class="ci-tl-stepname">(step.name.as_str())</span>2514+ </a>
2465- <span class="ci-tl-dur" data-since=(step.since.as_deref())>(step.duration.as_str())</span>2515+ } else {
2466- if let Some(expected) = step.expected.as_ref() {2516+ <div class=(step_class(job.sub))>
2467- <span class="ci-tl-stepexp">(expected.as_str())</span>2517+ <span class=(format!("ci-tl-stepmark {}", step.mark))></span>
2518+ <span class="ci-tl-stepname">(step.name.as_str())</span>
2519+ <span class="ci-tl-dur" data-since=(step.since.as_deref())>(step.duration.as_str())</span>
2520+ if let Some(expected) = step.expected.as_ref() {
2521+ <span class="ci-tl-stepexp">(expected.as_str())</span>
2522+ }
2523+ <progress class=(format!("ci-est ci-tl-stepprog {}", step.state_class)) max="100" value=(step.value.as_deref()) data-est=(step.pct.as_ref().map(|_| "true")) data-since=(step.pct.as_ref().and_then(|_| step.since.as_deref())) data-expected=(step.expected_secs.as_deref())></progress>
2524+ </div>
2525+ }
2526+ </li>
2468 }2527 }
2469- </div>2528+ </ul>
2470- }2529+ </details>
2471- </li>2530+ }
2472- }2531+ </li>
2473 }2532 }
2474 </ul>2533 </ul>
2475 }2534 }
crates/forge-web/src/pages/org_settings.rsmodified+4 -2
@@ -92,6 +92,7 @@ async fn settings_body(
92 <form id="org-settings-form" method="post" action=(save_action.as_str())>92 <form id="org-settings-form" method="post" action=(save_action.as_str())>
93 <input type="hidden" name="csrf" value=(csrf.as_str())>93 <input type="hidden" name="csrf" value=(csrf.as_str())>
94 </form>94 </form>
95+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Details", "Ayrıntılar"))</h2>
95 <label class="row-line row-field">96 <label class="row-line row-field">
96 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="3" width="14" height="18" rx="1"/><path d="M9 7h2M13 7h2M9 11h2M13 11h2M10 21v-4h4v4"/></svg>97 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="3" width="14" height="18" rx="1"/><path d="M9 7h2M13 7h2M9 11h2M13 11h2M10 21v-4h4v4"/></svg>
97 <span class="row-main">98 <span class="row-main">
@@ -110,6 +111,7 @@ async fn settings_body(
110 <textarea form="org-settings-form" name="description" rows="2" maxlength="2000">(description.as_str())</textarea>111 <textarea form="org-settings-form" name="description" rows="2" maxlength="2000">(description.as_str())</textarea>
111 </span>112 </span>
112 </label>113 </label>
114+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Members", "Üyeler"))</h2>
113 <label class="row-line row-field">115 <label class="row-line row-field">
114 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z"/></svg>116 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z"/></svg>
115 <span class="row-main">117 <span class="row-main">
@@ -138,13 +140,13 @@ async fn settings_body(
138 </div>140 </div>
139 </section>141 </section>
140 <section class="card rows-pane">142 <section class="card rows-pane">
141- <div class="row-line">143+ <div class="row-line row-field">
142 <img class="avatar profile-settings-avatar-img" src=(avatar_src.as_str()) alt=(t(lang, Key::AvatarAlt)) width="40" height="40">144 <img class="avatar profile-settings-avatar-img" src=(avatar_src.as_str()) alt=(t(lang, Key::AvatarAlt)) width="40" height="40">
143 <div class="row-main">145 <div class="row-main">
144 <h2 class="row-title">(t(lang, Key::Avatar))</h2>146 <h2 class="row-title">(t(lang, Key::Avatar))</h2>
145 <p class="row-status">(t(lang, Key::AvatarHint))</p>147 <p class="row-status">(t(lang, Key::AvatarHint))</p>
146 </div>148 </div>
147- <div class="row-actions">149+ <div class="row-actions row-control">
148 <form method="post" action=(avatar_action.as_str()) enctype="multipart/form-data" class="row-form profile-settings-avatar-upload">150 <form method="post" action=(avatar_action.as_str()) enctype="multipart/form-data" class="row-form profile-settings-avatar-upload">
149 <input type="hidden" name="csrf" value=(csrf.as_str())>151 <input type="hidden" name="csrf" value=(csrf.as_str())>
150 <input class="profile-settings-avatar-file" type="file" id="org-settings-avatar-file" name="avatar" aria-label=(t(lang, Key::Image)) accept="image/png,image/jpeg,image/webp,image/gif" required=(true)>152 <input class="profile-settings-avatar-file" type="file" id="org-settings-avatar-file" name="avatar" aria-label=(t(lang, Key::Image)) accept="image/png,image/jpeg,image/webp,image/gif" required=(true)>
crates/forge-web/src/pages/repo_webhooks.rsmodified+2 -0
@@ -533,6 +533,7 @@ async fn hook_form(
533 alert(message: message.as_str())533 alert(message: message.as_str())
534 }534 }
535 <input type="hidden" name="csrf" value=(csrf.as_str())>535 <input type="hidden" name="csrf" value=(csrf.as_str())>
536+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Endpoint", "Uç nokta"))</h2>
536 <label class="row-line row-field">537 <label class="row-line row-field">
537 <span class="row-main">538 <span class="row-main">
538 <span class="row-title">(g::t(lang, K::PayloadUrl))</span>539 <span class="row-title">(g::t(lang, K::PayloadUrl))</span>
@@ -551,6 +552,7 @@ async fn hook_form(
551 <input type="password" name="secret" autocomplete="new-password" maxlength="256">552 <input type="password" name="secret" autocomplete="new-password" maxlength="256">
552 </span>553 </span>
553 </label>554 </label>
555+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Delivery", "Teslimat"))</h2>
554 <div class="row-line row-field event-choices" role="group" aria-label=(g::t(lang, K::Events))>556 <div class="row-line row-field event-choices" role="group" aria-label=(g::t(lang, K::Events))>
555 <span class="row-main">557 <span class="row-main">
556 <span class="row-title">(g::t(lang, K::Events))</span>558 <span class="row-title">(g::t(lang, K::Events))</span>
crates/forge-web/src/pages/settings_appearance.rsmodified+16 -13
@@ -449,6 +449,7 @@ async fn appearance_body(page: AppearancePage) -> Result<impl View> {
449 </section>449 </section>
450 <form id="appearance-form" method="post" action="/settings/appearance" class="card rows-pane appearance" data-appearance="true">450 <form id="appearance-form" method="post" action="/settings/appearance" class="card rows-pane appearance" data-appearance="true">
451 <input type="hidden" name="csrf" value=(csrf.as_str())>451 <input type="hidden" name="csrf" value=(csrf.as_str())>
452+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Theme and colours", "Tema ve renkler"))</h2>
452 <label class="row-line row-field">453 <label class="row-line row-field">
453 <span class="row-main">454 <span class="row-main">
454 <span class="row-title">(g::t(lang, K::ThemeLabel))</span>455 <span class="row-title">(g::t(lang, K::ThemeLabel))</span>
@@ -462,6 +463,20 @@ async fn appearance_body(page: AppearancePage) -> Result<impl View> {
462 </select>463 </select>
463 </span>464 </span>
464 </label>465 </label>
466+ <fieldset class="row-field colour-group" data-colour-group="true" data-tab=(tab)>
467+ <legend class="row-title">(colours)</legend>
468+ <div class="segmented snippet-segmented colour-tabs" role="group">
469+ for choice in tabs.into_iter() {
470+ <label class="segment">
471+ <input type="radio" name="colour_tab" value=(choice.value) checked=(choice.selected) data-colour-tab=(choice.value)>
472+ <span>(choice.label)</span>
473+ </label>
474+ }
475+ </div>
476+ colour_panel(group: light)
477+ colour_panel(group: dark)
478+ </fieldset>
479+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Layout and language", "Düzen ve dil"))</h2>
465 <label class="row-line row-field">480 <label class="row-line row-field">
466 <span class="row-main">481 <span class="row-main">
467 <span class="row-title">(g::t(lang, K::LanguageLabel))</span>482 <span class="row-title">(g::t(lang, K::LanguageLabel))</span>
@@ -490,6 +505,7 @@ async fn appearance_body(page: AppearancePage) -> Result<impl View> {
490 </div>505 </div>
491 </span>506 </span>
492 </div>507 </div>
508+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Sound alerts", "Sesli uyarılar"))</h2>
493 <label class="row-line row-field sound-toggle">509 <label class="row-line row-field sound-toggle">
494 <span class="row-main">510 <span class="row-main">
495 <span class="row-title">(g::t(lang, K::SoundLabel))</span>511 <span class="row-title">(g::t(lang, K::SoundLabel))</span>
@@ -522,19 +538,6 @@ async fn appearance_body(page: AppearancePage) -> Result<impl View> {
522 </span>538 </span>
523 </div>539 </div>
524 <p class="row-foot muted small">(g::t(lang, K::SoundOwnRuns)) " · " (g::t(lang, K::SoundFootOwn))</p>540 <p class="row-foot muted small">(g::t(lang, K::SoundOwnRuns)) " · " (g::t(lang, K::SoundFootOwn))</p>
525- <fieldset class="row-field colour-group" data-colour-group="true" data-tab=(tab)>
526- <legend class="row-title">(colours)</legend>
527- <div class="segmented snippet-segmented colour-tabs" role="group">
528- for choice in tabs.into_iter() {
529- <label class="segment">
530- <input type="radio" name="colour_tab" value=(choice.value) checked=(choice.selected) data-colour-tab=(choice.value)>
531- <span>(choice.label)</span>
532- </label>
533- }
534- </div>
535- colour_panel(group: light)
536- colour_panel(group: dark)
537- </fieldset>
538 </form>541 </form>
539 </div>542 </div>
540 })543 })
crates/forge-web/src/pages/settings_notifications.rsmodified+9 -8
@@ -79,6 +79,7 @@ async fn notifications_body(page: NotificationsPage) -> Result<impl View> {
79 </section>79 </section>
80 }80 }
81 <section class="card rows-pane">81 <section class="card rows-pane">
82+ <h2 class="rows-section">(crate::pages::passkeys::s(lang, "Email", "E-posta"))</h2>
82 <form id="notify-form" method="post" action="/settings/notifications" class="notify-form">83 <form id="notify-form" method="post" action="/settings/notifications" class="notify-form">
83 <input type="hidden" name="csrf" value=(csrf.as_str())>84 <input type="hidden" name="csrf" value=(csrf.as_str())>
84 </form>85 </form>
@@ -87,17 +88,17 @@ async fn notifications_body(page: NotificationsPage) -> Result<impl View> {
87 <span class="row-main">88 <span class="row-main">
88 <span class="row-title">(t(lang, Key::EmailNotifyLabel))</span>89 <span class="row-title">(t(lang, Key::EmailNotifyLabel))</span>
89 <span class="row-status">(t(lang, Key::EmailNotifyHelp))</span>90 <span class="row-status">(t(lang, Key::EmailNotifyHelp))</span>
91+ if let Some(message) = server_note {
92+ <span class="row-status warn" role="note">(message)</span>
93+ }
94+ if let Some(message) = unverified_note {
95+ <span class="row-status" role="note">(message)</span>
96+ }
90 </span>97 </span>
91 <span class="row-control">98 <span class="row-control">
92 <input type="checkbox" form="notify-form" name="email_notifications" value="1" checked=(on) disabled=(blocked) data-autosubmit="true">99 <input type="checkbox" form="notify-form" name="email_notifications" value="1" checked=(on) disabled=(blocked) data-autosubmit="true">
93 </span>100 </span>
94 </label>101 </label>
95- if let Some(message) = server_note {
96- <p class="notice" role="note">(message)</p>
97- }
98- if let Some(message) = unverified_note {
99- <p class="notice" role="note">(message)</p>
100- }
101 <noscript>102 <noscript>
102 <div class="row-foot">103 <div class="row-foot">
103 <button type="submit" form="notify-form" class="primary" disabled=(blocked)>(t(lang, Key::Save))</button>104 <button type="submit" form="notify-form" class="primary" disabled=(blocked)>(t(lang, Key::Save))</button>
@@ -123,7 +124,7 @@ async fn notifications_body(page: NotificationsPage) -> Result<impl View> {
123 <p class="notice" role="note" data-push-state="ios" hidden=(true)>(push_text::t(lang, push_text::K::DeviceIosHint))</p>124 <p class="notice" role="note" data-push-state="ios" hidden=(true)>(push_text::t(lang, push_text::K::DeviceIosHint))</p>
124 <p class="notice" role="note" data-push-state="denied" hidden=(true)>(push_text::t(lang, push_text::K::DeviceDenied))</p>125 <p class="notice" role="note" data-push-state="denied" hidden=(true)>(push_text::t(lang, push_text::K::DeviceDenied))</p>
125 <p class="notice" role="alert" data-push-state="error" hidden=(true)>(push_text::t(lang, push_text::K::DeviceError))</p>126 <p class="notice" role="alert" data-push-state="error" hidden=(true)>(push_text::t(lang, push_text::K::DeviceError))</p>
126- <form method="post" action="/settings/notifications/push/test" class="row-line">127+ <form method="post" action="/settings/notifications/push/test" class="row-line row-form-line">
127 csrf_field(token: csrf.as_str())128 csrf_field(token: csrf.as_str())
128 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M22 2L11 13"/><path d="M22 2l-7 20-4-9-9-4z"/></svg>129 <svg class="row-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M22 2L11 13"/><path d="M22 2l-7 20-4-9-9-4z"/></svg>
129 <div class="row-main">130 <div class="row-main">
@@ -133,7 +134,7 @@ async fn notifications_body(page: NotificationsPage) -> Result<impl View> {
133 }134 }
134 </div>135 </div>
135 <div class="row-actions">136 <div class="row-actions">
136- <button type="submit" data-push-test="true" disabled=(!can_test)>(push_text::t(lang, push_text::K::SendTest))</button>137+ <button type="submit" data-push-test="true" disabled=(!can_test)>(crate::pages::passkeys::s(lang, "Send", "Gönder"))</button>
137 </div>138 </div>
138 </form>139 </form>
139 </section>140 </section>
crates/forge-web/src/pages/settings_profile.rsmodified+2 -2
@@ -148,7 +148,7 @@ async fn profile_body(page: ProfilePage) -> Result<impl View> {
148 </section>148 </section>
149 }149 }
150 <section class="card rows-pane">150 <section class="card rows-pane">
151- <div class="row-line profile-settings-avatar">151+ <div class="row-line row-field profile-settings-avatar">
152 <img class="avatar profile-settings-avatar-img" src=(avatar_src.as_str()) alt=(t(lang, Key::AvatarAlt)) width="40" height="40">152 <img class="avatar profile-settings-avatar-img" src=(avatar_src.as_str()) alt=(t(lang, Key::AvatarAlt)) width="40" height="40">
153 <div class="row-main">153 <div class="row-main">
154 <h2 class="row-title">(t(lang, Key::Avatar))</h2>154 <h2 class="row-title">(t(lang, Key::Avatar))</h2>
@@ -157,7 +157,7 @@ async fn profile_body(page: ProfilePage) -> Result<impl View> {
157 alert(message: message.as_str())157 alert(message: message.as_str())
158 }158 }
159 </div>159 </div>
160- <div class="row-actions">160+ <div class="row-actions row-control">
161 <form method="post" action="/settings/profile/avatar" enctype="multipart/form-data" class="row-form profile-settings-avatar-upload">161 <form method="post" action="/settings/profile/avatar" enctype="multipart/form-data" class="row-form profile-settings-avatar-upload">
162 <input type="hidden" name="csrf" value=(csrf.as_str())>162 <input type="hidden" name="csrf" value=(csrf.as_str())>
163 <input class="profile-settings-avatar-file" type="file" id="profile-settings-avatar-file" name="avatar" aria-label=(t(lang, Key::Image)) accept="image/png,image/jpeg,image/webp,image/gif" required=(true)>163 <input class="profile-settings-avatar-file" type="file" id="profile-settings-avatar-file" name="avatar" aria-label=(t(lang, Key::Image)) accept="image/png,image/jpeg,image/webp,image/gif" required=(true)>
crates/forge-web/src/views/mod.rsmodified+6 -2
@@ -392,6 +392,7 @@ async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result<impl View>
392 let admin_label = ad::t(lang, AK::AdminArea);392 let admin_label = ad::t(lang, AK::AdminArea);
393 let logout_label = t(lang, Key::LogOut);393 let logout_label = t(lang, Key::LogOut);
394 let bell_title = i18n::t(lang, Key::Notifications);394 let bell_title = i18n::t(lang, Key::Notifications);
395+ let explore_label = t(lang, Key::Explore);
395 let open_label = mi::t(lang, MK::OpenNotifications);396 let open_label = mi::t(lang, MK::OpenNotifications);
396 let clear_label = mi::t(lang, MK::ClearNotifications);397 let clear_label = mi::t(lang, MK::ClearNotifications);
397 let clear_title = mi::t(lang, MK::MarkAllRead);398 let clear_title = mi::t(lang, MK::MarkAllRead);
@@ -442,6 +443,7 @@ async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result<impl View>
442 </form>443 </form>
443 </div>444 </div>
444 </details>445 </details>
446+ <a class="corner-bell corner-explore" href="/explore" title=(explore_label) aria-label=(explore_label)><svg class="ico" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="m15.5 8.5-2 5-5 2 2-5z"/></svg></a>
445 <a class="corner-bell" href="/notifications" title=(bell_label) aria-label=(bell_label) aria-expanded="false"><svg class="ico" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/></svg>447 <a class="corner-bell" href="/notifications" title=(bell_label) aria-label=(bell_label) aria-expanded="false"><svg class="ico" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/></svg>
446 if corner.unread > 0 {448 if corner.unread > 0 {
447 <span class="bell-count">(corner.unread.to_string())</span>449 <span class="bell-count">(corner.unread.to_string())</span>
@@ -725,7 +727,10 @@ pub async fn shell(
725 data-placeholder=(br::t(lang, br::K::PalettePlaceholder)) data-repos=(br::t(lang, br::K::PaletteRepos))727 data-placeholder=(br::t(lang, br::K::PalettePlaceholder)) data-repos=(br::t(lang, br::K::PaletteRepos))
726 data-orgs=(o::t(lang, OK::Organizations)) data-pages=(br::t(lang, br::K::PalettePages))728 data-orgs=(o::t(lang, OK::Organizations)) data-pages=(br::t(lang, br::K::PalettePages))
727 data-empty=(br::t(lang, br::K::PaletteNoMatches)) data-loading=(br::t(lang, br::K::PaletteLoading))729 data-empty=(br::t(lang, br::K::PaletteNoMatches)) data-loading=(br::t(lang, br::K::PaletteLoading))
728- data-failed=(br::t(lang, br::K::PaletteFailed)) data-hint=(br::t(lang, br::K::FinderHint))730+ data-failed=(br::t(lang, br::K::PaletteFailed))
731+ data-key-move=(crate::pages::passkeys::s(lang, "move", "gezin"))
732+ data-key-open=(crate::pages::passkeys::s(lang, "open", "aç"))
733+ data-key-close=(crate::pages::passkeys::s(lang, "close", "kapat"))
729 data-search-label=(search_for_label) data-files=(br::t(lang, br::K::PaletteFiles))734 data-search-label=(search_for_label) data-files=(br::t(lang, br::K::PaletteFiles))
730 data-actions=(br::t(lang, br::K::PaletteActions)) data-done=(br::t(lang, br::K::PaletteDone))735 data-actions=(br::t(lang, br::K::PaletteActions)) data-done=(br::t(lang, br::K::PaletteDone))
731 data-action-failed=(br::t(lang, br::K::PaletteActionFailed))>736 data-action-failed=(br::t(lang, br::K::PaletteActionFailed))>
@@ -735,7 +740,6 @@ pub async fn shell(
735 }740 }
736 </nav>741 </nav>
737 if signed_in {742 if signed_in {
738- <a class="topbar-link topbar-explore" href="/explore">(t(lang, Key::Explore))</a>
739 <a class="icon-btn top-search-link" href="/explore" aria-label=(search_label) title=(search_label)>743 <a class="icon-btn top-search-link" href="/explore" aria-label=(search_label) title=(search_label)>
740 <svg class="ico" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>744 <svg class="ico" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
741 </a>745 </a>
style/_canvas_lists.scssmodified+4 -4
@@ -273,10 +273,10 @@
273 display: flex;273 display: flex;
274 flex-wrap: nowrap;274 flex-wrap: nowrap;
275 align-items: center;275 align-items: center;
276- gap: 12px;276+ gap: 16px;
277- height: 36px;277+ height: 52px;
278 min-width: 0;278 min-width: 0;
279- padding: 0 14px;279+ padding: 0 16px;
280 overflow: hidden;280 overflow: hidden;
281 border-bottom: 1px solid var(--border);281 border-bottom: 1px solid var(--border);
282 282
@@ -286,7 +286,7 @@
286 min-width: 0;286 min-width: 0;
287 overflow: hidden;287 overflow: hidden;
288 font-family: var(--mono);288 font-family: var(--mono);
289- font-size: 13px;289+ font-size: 14px;
290 font-weight: 500;290 font-weight: 500;
291 text-overflow: ellipsis;291 text-overflow: ellipsis;
292 white-space: nowrap;292 white-space: nowrap;
style/_ci_estimate.scssmodified+86 -0
@@ -38,3 +38,89 @@ progress.ci-est-run {
38 height: 4px;38 height: 4px;
39 margin-top: 8px;39 margin-top: 8px;
40 }40 }
41+
42+// A step's progress: a 2 px bar along the foot of its row. A finished step is full in its state's colour;
43+// a running one fills to its share of the expected time (the page script moves it). A running step with
44+// no estimate has no value, so it shows a sliding segment rather than a made-up share.
45+progress.ci-est.ci-tl-stepprog {
46+ position: absolute;
47+ left: 0;
48+ right: 0;
49+ bottom: 0;
50+ width: 100%;
51+ height: 2px;
52+ flex: none;
53+ margin: 0;
54+ border: 0;
55+ border-radius: 0;
56+ background: transparent;
57+ color: var(--accent);
58+
59+ &::-webkit-progress-bar {
60+ background: transparent;
61+ border-radius: 0;
62+ }
63+
64+ &::-webkit-progress-value {
65+ border-radius: 0;
66+ background: var(--border-strong);
67+ }
68+
69+ &::-moz-progress-bar {
70+ border-radius: 0;
71+ background: var(--border-strong);
72+ }
73+
74+ &.ci-sp-fail {
75+ &::-webkit-progress-value,
76+ &::-moz-progress-bar {
77+ background: var(--bad);
78+ }
79+ }
80+
81+ &.ci-sp-off {
82+ &::-webkit-progress-value,
83+ &::-moz-progress-bar {
84+ background: var(--border);
85+ }
86+ }
87+
88+ &.ci-sp-run {
89+ &::-webkit-progress-value,
90+ &::-moz-progress-bar {
91+ background: var(--accent);
92+ }
93+ }
94+
95+ // No value attribute: the element's own background carries a 30% segment that slides across.
96+ &:not([value]) {
97+ background: linear-gradient(var(--accent), var(--accent)) no-repeat, transparent;
98+ background-size: 30% 100%, auto;
99+ background-position: -43% 0, 0 0;
100+ animation: ci-step-slide 1.4s linear infinite;
101+
102+ &::-webkit-progress-bar,
103+ &::-webkit-progress-value,
104+ &::-moz-progress-bar {
105+ background: transparent;
106+ animation: none;
107+ }
108+ }
109+}
110+
111+@keyframes ci-step-slide {
112+ from {
113+ background-position: -43% 0, 0 0;
114+ }
115+
116+ to {
117+ background-position: 100% 0, 0 0;
118+ }
119+}
120+
121+@media (prefers-reduced-motion: reduce) {
122+ progress.ci-est.ci-tl-stepprog:not([value]) {
123+ animation: none;
124+ background-position: 0 0, 0 0;
125+ }
126+}
style/_lang_admin.scssmodified+2 -2
@@ -41,8 +41,8 @@ $page-column: ".shell-site > .shell-body > main, .shell-site > .shell-body > mai
41 41
42 // A form in a pane is a column of its own: 720px at most, left aligned. The mail form keeps its42 // A form in a pane is a column of its own: 720px at most, left aligned. The mail form keeps its
43 // three-field row.43 // three-field row.
44-.shell-site main .card > form:not(.inline-form):not(.srv-form):not([action="/admin/mail"]):not(:has(> .row-line)),44+.shell-site main .card:not(.rows-pane) > form:not(.inline-form):not(.srv-form):not([action="/admin/mail"]):not(:has(> .row-line)),
45-.shell-site main .card > form.stack:not(.srv-form):not([action="/admin/mail"]):not(:has(> .row-line)) {45+.shell-site main .card:not(.rows-pane) > form.stack:not(.srv-form):not([action="/admin/mail"]):not(:has(> .row-line)) {
46 max-width: 720px;46 max-width: 720px;
47 }47 }
48 48
style/_palette.scssmodified+129 -33
@@ -1,22 +1,23 @@
1-// Command palette (Ctrl+K): a dialog over the page with a search row, one scrolling list grouped by1+// Command palette (Ctrl+K): a panel over the page with a search row, one scrolling list grouped by
2-// kind, and a footer note. It follows the branch switcher's command palette look.2+// kind, a line for action results and empty states, and a footer of key chips. The panel and its
3+// rows follow the card, the timeline's labels and the path bar's key chips.
3 4
4 // The path bar's edit button (_shell.scss .pathbar-edit) opens it. The dialog is in the top layer,5 // The path bar's edit button (_shell.scss .pathbar-edit) opens it. The dialog is in the top layer,
5 // so it sits over the page and the path bar without any positioning of its own.6 // so it sits over the page and the path bar without any positioning of its own.
6 7
7 dialog.palette {8 dialog.palette {
8- width: min(560px, calc(100vw - 32px));9+ width: min(640px, calc(100vw - 32px));
9- max-height: min(70vh, 520px);10+ max-height: min(70vh, 560px);
10 margin: 12vh auto 0;11 margin: 12vh auto 0;
11 padding: 0;12 padding: 0;
12 color: var(--text);13 color: var(--text);
13 background: var(--surface);14 background: var(--surface);
14 border: 1px solid var(--border-strong);15 border: 1px solid var(--border-strong);
15 border-radius: var(--radius-lg);16 border-radius: var(--radius-lg);
16- box-shadow: var(--shadow);17+ box-shadow: var(--pop-shadow);
17 18
18 &::backdrop {19 &::backdrop {
19- background: rgba(20, 24, 22, 0.45);20+ background: color-mix(in srgb, var(--bg) 55%, transparent);
20 }21 }
21 22
22 &[open] {23 &[open] {
@@ -46,7 +47,8 @@ dialog.palette {
46 display: flex;47 display: flex;
47 align-items: center;48 align-items: center;
48 gap: 10px;49 gap: 10px;
49- padding: 0 12px;50+ height: 48px;
51+ padding: 0 16px;
50 color: var(--muted);52 color: var(--muted);
51 border-bottom: 1px solid var(--border);53 border-bottom: 1px solid var(--border);
52 54
@@ -58,7 +60,7 @@ dialog.palette {
58 .palette-input {60 .palette-input {
59 flex: 1 1 auto;61 flex: 1 1 auto;
60 min-width: 0;62 min-width: 0;
61- height: 46px;63+ height: 48px;
62 padding: 0;64 padding: 0;
63 font: inherit;65 font: inherit;
64 font-size: 15px;66 font-size: 15px;
@@ -81,57 +83,104 @@ dialog.palette {
81 flex: 1 1 auto;83 flex: 1 1 auto;
82 min-height: 0;84 min-height: 0;
83 margin: 0;85 margin: 0;
84- padding: 6px;86+ padding: 0 6px 6px;
85 overflow-y: auto;87 overflow-y: auto;
86 list-style: none;88 list-style: none;
87- font-size: 0.875rem;89+ font-size: 14px;
88 90
89 li {91 li {
90 margin: 0;92 margin: 0;
91 }93 }
92 94
93- // Group headings: small caps like the branch switcher's, with a dashed rule between groups.95+ // Group headings: the mono label of the timeline, held at the top while its rows scroll past.
94 .palette-head {96 .palette-head {
95- padding: 6px 8px 4px;97+ position: sticky;
98+ top: 0;
99+ z-index: 1;
100+ height: 28px;
101+ padding: 0 10px;
102+ font-family: var(--mono);
96 font-size: 11px;103 font-size: 11px;
97- font-weight: 600;104+ font-weight: 500;
98- letter-spacing: 0.06em;105+ line-height: 28px;
106+ letter-spacing: 0.12em;
99 text-transform: uppercase;107 text-transform: uppercase;
100 color: var(--muted);108 color: var(--muted);
109+ background: var(--surface);
101 }110 }
102 111
103- .palette-head:not(:first-child) {112+ // Rows: one line, 36px, an icon, the label, and the reason at the right.
104- margin-top: 6px;
105- padding-top: 10px;
106- border-top: 1px dashed var(--border);
107- }
108-
109- // Options: the selected row (keys or pointer) gets the soft accent fill.
110 li[role="option"] {113 li[role="option"] {
111- padding: 7px 10px;114+ display: flex;
115+ align-items: center;
116+ gap: 10px;
117+ height: 36px;
118+ padding: 0 10px;
112 color: var(--text);119 color: var(--text);
113 border-radius: var(--radius-md);120 border-radius: var(--radius-md);
114 cursor: pointer;121 cursor: pointer;
115- overflow-wrap: anywhere;122+ min-width: 0;
116 }123 }
117 124
125+ // The selected row (keys or pointer): a surface step with a thin accent edge on the left.
118 li[aria-selected="true"] {126 li[aria-selected="true"] {
119- background: var(--accent-soft);127+ background: var(--surface-2);
128+ box-shadow: inset 2px 0 var(--accent);
120 }129 }
130+
131+ li[role="option"]:hover {
132+ background: var(--surface-2);
133+ }
134+}
135+
136+.palette-ico {
137+ flex: none;
138+ width: 16px;
139+ height: 16px;
140+ fill: none;
141+ stroke: var(--muted);
142+ stroke-width: 1.8;
143+ stroke-linecap: round;
144+ stroke-linejoin: round;
121 }145 }
122 146
123-.palette-list li[role="option"]:has(.palette-why) {147+// The label: a path muted, its last segment in the text colour, each ellipsised when they overflow.
148+.palette-label {
149+ flex: 1 1 auto;
124 display: flex;150 display: flex;
125- align-items: baseline;151+ min-width: 0;
126- justify-content: space-between;152+ white-space: nowrap;
127- gap: 16px;153+}
154+
155+.palette-path,
156+.palette-name {
157+ min-width: 0;
158+ overflow: hidden;
159+ text-overflow: ellipsis;
160+ white-space: nowrap;
161+}
162+
163+.palette-path {
164+ flex: 0 1 auto;
165+ color: var(--muted);
166+}
167+
168+.palette-name {
169+ flex: 0 1 auto;
170+ color: var(--text);
171+}
172+
173+.palette-tail {
174+ font-weight: 500;
128 }175 }
129 176
130 .palette-why {177 .palette-why {
131- flex: 0 1 55%;178+ flex: 0 1 auto;
179+ max-width: 50%;
180+ min-width: 0;
132 overflow: hidden;181 overflow: hidden;
133 color: var(--muted);182 color: var(--muted);
134- font-size: 0.75rem;183+ font-size: 12px;
135 text-align: right;184 text-align: right;
136 text-overflow: ellipsis;185 text-overflow: ellipsis;
137 white-space: nowrap;186 white-space: nowrap;
@@ -144,12 +193,17 @@ dialog.palette {
144 border-radius: var(--radius-sm);193 border-radius: var(--radius-sm);
145 }194 }
146 195
196+// A line above the key chips: a sent action's result, or the state of the list. Hidden otherwise.
147 .palette-note {197 .palette-note {
148 flex: none;198 flex: none;
149 margin: 0;199 margin: 0;
150- padding: 8px 12px;200+ padding: 8px 16px;
151 border-top: 1px solid var(--border);201 border-top: 1px solid var(--border);
152 202
203+ &[hidden] {
204+ display: none;
205+ }
206+
153 // A sent action: done in the ok colour, a refusal in the failure colour.207 // A sent action: done in the ok colour, a refusal in the failure colour.
154 &.is-ok {208 &.is-ok {
155 color: var(--ok);209 color: var(--ok);
@@ -160,7 +214,40 @@ dialog.palette {
160 }214 }
161 }215 }
162 216
163-// Phones: the palette spans the screen width and sits at the top, with larger rows to tap.217+// The footer's key chips, with the same key look as the path bar's Ctrl K.
218+.palette-keys {
219+ flex: none;
220+ display: flex;
221+ align-items: center;
222+ gap: 16px;
223+ height: 36px;
224+ padding: 0 16px;
225+ border-top: 1px solid var(--border);
226+ font-size: 12px;
227+ color: var(--muted);
228+
229+ > span {
230+ display: inline-flex;
231+ align-items: center;
232+ gap: 6px;
233+ white-space: nowrap;
234+ }
235+
236+ kbd {
237+ flex: none;
238+ padding: 0 5px;
239+ font-family: var(--mono);
240+ font-size: 11px;
241+ line-height: 18px;
242+ color: var(--text-2);
243+ background: var(--surface-2);
244+ border: 1px solid var(--border-strong);
245+ border-radius: var(--radius-sm);
246+ }
247+}
248+
249+// Phones: the palette spans the screen width and sits at the top, with larger rows to tap. The key
250+// chips go: a phone has no keys.
164 @media (max-width: 600px) {251 @media (max-width: 600px) {
165 dialog.palette {252 dialog.palette {
166 width: calc(100vw - 16px);253 width: calc(100vw - 16px);
@@ -173,7 +260,16 @@ dialog.palette {
173 font-size: 16px;260 font-size: 16px;
174 }261 }
175 262
263+ .palette-search {
264+ height: 52px;
265+ }
266+
176 .palette-list li[role="option"] {267 .palette-list li[role="option"] {
177- padding: 12px 10px;268+ height: 44px;
269+ padding: 0 12px;
270+ }
271+
272+ .palette-keys {
273+ display: none;
178 }274 }
179 }275 }
style/_shell.scssmodified+0 -14
@@ -490,20 +490,6 @@
490 }490 }
491 }491 }
492 492
493-// Signed in, Explore sits right after the path bar, centred on the bar's line. It shows from 700px:
494-// below that there is no room for it, and signed-in phones reach Explore through no icon.
495-.topbar .topbar-explore {
496- display: none;
497- align-self: center;
498- white-space: nowrap;
499-}
500-
501-@media (min-width: 640px) {
502- .topbar .topbar-explore {
503- display: inline-block;
504- }
505-}
506-
507 // The avatar menu: the avatar is the summary; the menu list keeps its links from main.scss.493 // The avatar menu: the avatar is the summary; the menu list keeps its links from main.scss.
508 .topbar .menu {494 .topbar .menu {
509 flex: none;495 flex: none;
style/_timeline_ci.scssmodified+72 -2
@@ -287,10 +287,71 @@
287 }287 }
288 }288 }
289 289
290-// A step under the selected job: a 30 px line with a 6 px mark, its name and its duration at the right.290+// A job's steps: a dropdown under its row. The row keeps room for the toggle at its right end, and while
291+// the dropdown is open the row's bar gives way to the step lines (the bar is the summary when shut).
292+.ci-tl-hassteps {
293+ position: relative;
294+
295+ > .ci-tl-job {
296+ padding-right: 40px;
297+ }
298+
299+ &:has(> details[open]) .ci-tl-stepbar {
300+ display: none;
301+ }
302+}
303+
304+.ci-tl-steps {
305+ margin: 0;
306+}
307+
308+.ci-tl-steplist {
309+ margin: 0;
310+ padding: 0;
311+ list-style: none;
312+}
313+
314+// The toggle sits over the job row's right end, a 28 px target (36 px on a phone). Its chevron turns
315+// when the dropdown is open; the browser's marker is gone.
316+.ci-tl-steptoggle {
317+ position: absolute;
318+ top: 0;
319+ right: 6px;
320+ z-index: 1;
321+ display: flex;
322+ align-items: center;
323+ justify-content: center;
324+ width: 28px;
325+ height: 36px;
326+ list-style: none;
327+ cursor: pointer;
328+
329+ &::-webkit-details-marker {
330+ display: none;
331+ }
332+
333+ &::marker {
334+ content: "";
335+ }
336+
337+ .ci-chev {
338+ margin: 0;
339+ }
340+
341+ &:hover .ci-chev {
342+ border-color: var(--text);
343+ }
344+}
345+
346+.ci-tl-steps[open] > .ci-tl-steptoggle .ci-chev {
347+ transform: rotate(45deg);
348+}
349+
350+// A step under its job: a 30 px line with a 6 px mark, its name and its duration at the right.
291 // Indented past the job's dot, one level more for a matrix combination. The selected step has an351 // Indented past the job's dot, one level more for a matrix combination. The selected step has an
292-// accent edge on the left, and a failed step's name reads in --text.352+// accent edge on the left, and a failed step's name reads in --text. Its progress bar is along the foot.
293 .ci-tl-step {353 .ci-tl-step {
354+ position: relative;
294 display: flex;355 display: flex;
295 align-items: center;356 align-items: center;
296 gap: 8px;357 gap: 8px;
@@ -641,6 +702,15 @@
641 overflow: visible;702 overflow: visible;
642 }703 }
643 704
705+ // A thumb-sized toggle, and the job's duration keeps clear of it.
706+ .ci-tl-steptoggle {
707+ width: 36px;
708+ }
709+
710+ .ci-tl-hassteps > .ci-tl-job {
711+ padding-right: 46px;
712+ }
713+
644 // These panels share out a fixed height on a wide window; here there is none to share.714 // These panels share out a fixed height on a wide window; here there is none to share.
645 .ci-tl-panel {715 .ci-tl-panel {
646 flex: none;716 flex: none;
style/main.scssmodified+190 -6
@@ -5736,6 +5736,7 @@ html.js form.runner-load[data-dirty-form][data-dirty] .runner-save {
5736 flex-wrap: wrap;5736 flex-wrap: wrap;
5737 align-items: center;5737 align-items: center;
5738 gap: 8px;5738 gap: 8px;
5739+ white-space: nowrap;
5739 }5740 }
5740 5741
5741 .ci-scale {5742 .ci-scale {
@@ -7338,15 +7339,18 @@ button.ci-job-last {
7338 letter-spacing: 0;7339 letter-spacing: 0;
7339 }7340 }
7340 7341
7341-// A setting on one row: its label and hint at the left, its control at the right.7342+// A setting on one row: its label, its control right beside it, then its hint. The control never sits
7343+// at the far end of a wide row, where the eye has to follow the line across to find it. The columns
7344+// are the same on every row, so controls form one straight edge down the pane.
7342 .row-field {7345 .row-field {
7343 align-items: center;7346 align-items: center;
7344 7347
7345 > .row-control {7348 > .row-control {
7346 display: flex;7349 display: flex;
7347- flex: 0 1 22rem;7350+ flex: 1 1 14rem;
7348 align-items: center;7351 align-items: center;
7349- justify-content: flex-end;7352+ justify-content: flex-start;
7353+ flex-wrap: wrap;
7350 gap: 8px;7354 gap: 8px;
7351 min-width: 0;7355 min-width: 0;
7352 7356
@@ -7358,6 +7362,120 @@ button.ci-job-last {
7358 }7362 }
7359 }7363 }
7360 7364
7365+@media (min-width: 761px) {
7366+ .row-line.row-field:not(.event-choices, .colour-line) {
7367+ --field-label: 260px;
7368+ display: grid;
7369+ grid-template-columns: var(--field-label) minmax(0, 1fr);
7370+ column-gap: 24px;
7371+ row-gap: 2px;
7372+ justify-items: start;
7373+
7374+ > .row-main {
7375+ display: contents;
7376+ }
7377+
7378+ .row-title,
7379+ .row-main > * {
7380+ grid-column: 1;
7381+ }
7382+
7383+ > .row-control {
7384+ grid-column: 2;
7385+ grid-row: 1 / span 4;
7386+ width: 100%;
7387+ max-width: 440px;
7388+ }
7389+ }
7390+
7391+ // A picture or icon before the label keeps the controls on the same edge as every other row.
7392+ .row-line.row-field:not(.event-choices, .colour-line):has(> .row-icon, > .avatar) {
7393+ grid-template-columns: var(--field-mark) calc(var(--field-label) - var(--field-mark) - 12px) minmax(0, 1fr);
7394+ --field-mark: 20px;
7395+ column-gap: 12px;
7396+
7397+ > .row-icon,
7398+ > .avatar {
7399+ grid-column: 1;
7400+ grid-row: 1 / span 5;
7401+ }
7402+
7403+ .row-title,
7404+ .row-main > * {
7405+ grid-column: 2;
7406+ }
7407+
7408+ > .row-control {
7409+ grid-column: 3;
7410+ margin-left: 12px;
7411+ }
7412+ }
7413+
7414+ .row-line.row-field:not(.event-choices, .colour-line):has(> .avatar) {
7415+ --field-mark: 40px;
7416+ }
7417+
7418+ // A tall field keeps its label at the top, level with the field's first line.
7419+ .row-line.row-field:not(.event-choices, .colour-line):has(textarea) {
7420+ align-items: start;
7421+
7422+ .row-title {
7423+ padding-top: 6px;
7424+ }
7425+
7426+ .row-main > :not(.row-title) {
7427+ padding-top: 6px;
7428+ }
7429+ }
7430+
7431+ .row-foot:is(.row-field ~ *) {
7432+ padding-left: calc(20px + 260px + 24px);
7433+ }
7434+}
7435+
7436+// With room, the hint moves to the right of the control and the row keeps one line of text.
7437+@media (min-width: 1200px) {
7438+ .row-line.row-field:not(.event-choices, .colour-line) {
7439+ grid-template-columns: var(--field-label) minmax(0, 440px) minmax(0, 1fr);
7440+ row-gap: 0;
7441+
7442+ grid-template-rows: 1fr auto auto auto 1fr;
7443+
7444+ .row-title {
7445+ grid-row: 1 / span 5;
7446+ }
7447+
7448+ > .row-control {
7449+ grid-row: 1 / span 5;
7450+ }
7451+
7452+ // The hint lines sit in the middle tracks, so one line or three stay centred on the control.
7453+ .row-main > :not(.row-title) {
7454+ grid-column: 3;
7455+ }
7456+
7457+ .row-main > :nth-child(2) {
7458+ grid-row: 2;
7459+ }
7460+
7461+ .row-main > :nth-child(3) {
7462+ grid-row: 3;
7463+ }
7464+
7465+ .row-main > :nth-child(4) {
7466+ grid-row: 4;
7467+ }
7468+ }
7469+
7470+ .row-line.row-field:not(.event-choices, .colour-line):has(> .row-icon, > .avatar) {
7471+ grid-template-columns: var(--field-mark) calc(var(--field-label) - var(--field-mark) - 12px) minmax(0, 440px) minmax(0, 1fr);
7472+
7473+ .row-main > :not(.row-title) {
7474+ grid-column: 4;
7475+ }
7476+ }
7477+}
7478+
7361 .row-foot {7479 .row-foot {
7362 display: flex;7480 display: flex;
7363 align-items: center;7481 align-items: center;
@@ -7426,12 +7544,30 @@ form.rows-pane {
7426 min-width: 0;7544 min-width: 0;
7427 }7545 }
7428 7546
7429-.rows-pane > .colour-group {7547+.rows-pane > .colour-group,
7548+.rows-pane form > .colour-group {
7430 padding: 16px 20px;7549 padding: 16px 20px;
7431 border-width: 1px 0 0;7550 border-width: 1px 0 0;
7432 border-radius: 0;7551 border-radius: 0;
7433 }7552 }
7434 7553
7554+.colour-tabs {
7555+ width: fit-content;
7556+}
7557+
7558+// Background and accent side by side, so the colours do not push the rest of the page off the screen.
7559+@media (min-width: 1400px) {
7560+ .colour-panel {
7561+ display: grid;
7562+ grid-template-columns: repeat(2, minmax(0, 1fr));
7563+ gap: 0 32px;
7564+ }
7565+
7566+ .colour-panel > .colour-line {
7567+ padding-inline: 0;
7568+ }
7569+}
7570+
7435 // The rule editor's switches are rows inside its own panes.7571 // The rule editor's switches are rows inside its own panes.
7436 .switch-list > .row-line {7572 .switch-list > .row-line {
7437 padding: 10px 0;7573 padding: 10px 0;
@@ -7441,9 +7577,57 @@ form.rows-pane {
7441 }7577 }
7442 }7578 }
7443 7579
7444-.rows-section {7580+// A category inside a pane: its name on a quiet strip, with the hairline of a row under it.
7581+.rows-pane .rows-section,
7582+.rows-pane form .rows-section {
7583+ margin: 0;
7584+ padding: 18px 20px 8px;
7585+ border-bottom: 1px solid var(--border);
7586+ font-family: var(--mono);
7587+ font-size: 11px;
7588+ font-weight: 600;
7589+ line-height: 1.4;
7590+ letter-spacing: 0.06em;
7591+ text-transform: uppercase;
7592+ color: var(--muted);
7593+}
7594+
7595+.rows-pane > .rows-section:first-child,
7596+.rows-pane form > .rows-section:first-of-type {
7597+ padding-top: 12px;
7598+}
7599+
7600+.rows-pane > .rows-section + *,
7601+.rows-pane form > .rows-section + * {
7602+ border-top: 0;
7603+}
7604+
7605+.rows-pane form > .rows-section:not(:first-of-type),
7606+.rows-pane form > .row-line + .rows-section {
7607+ border-top: 1px solid var(--border);
7608+}
7609+
7610+// A pane's form only wraps its rows, so the 720px form rule must not draw a short hairline over them.
7611+.rows-pane > form:not(.inline-form) {
7612+ width: 100%;
7613+}
7614+
7615+// A message in a pane reads as a line of the pane, inside its padding.
7616+.card.rows-pane > p.notice {
7445 margin: 0;7617 margin: 0;
7446- padding: 12px 20px 8px;7618+ padding: 12px 20px 12px 56px;
7619+ font-size: 0.8125rem;
7620+ background: none;
7621+ border-width: 1px 0 0;
7622+ border-radius: 0;
7623+}
7624+
7625+// A form that is itself a row, such as a device's test button.
7626+.rows-pane form.row-form-line {
7627+ display: flex;
7628+ flex-direction: row;
7629+ flex-wrap: wrap;
7630+ align-items: center;
7447 }7631 }
7448 7632
7449 @media (max-width: 600px) {7633 @media (max-width: 600px) {