From c6433ed60a5bf38fd0042495a3d266f34f9942ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 1 Nov 2026 19:47:00 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20a=20setting's=20control?= =?UTF-8?q?=20now=20sits=20right=20beside=20its=20label=20on=20one=20strai?= =?UTF-8?q?ght=20edge,=20with=20its=20hint=20after=20it,=20instead=20of=20?= =?UTF-8?q?at=20the=20far=20end=20of=20the=20row;=20long=20settings=20page?= =?UTF-8?q?s=20are=20split=20into=20categories,=20Appearance=20fits=20one?= =?UTF-8?q?=20screen,=20and=20Notifications=20no=20longer=20has=20lines=20?= =?UTF-8?q?outside=20its=20rows;=20=E2=9C=A8=20feat:=20every=20job=20in=20?= =?UTF-8?q?the=20run=20page's=20Jobs=20column=20opens=20a=20dropdown=20of?= =?UTF-8?q?=20its=20steps,=20each=20with=20its=20own=20progress;=20search?= =?UTF-8?q?=20matches=20the=20rest=20of=20the=20app:=20a=20640px=20panel?= =?UTF-8?q?=20with=20icons,=20category=20headings=20that=20stay=20in=20vie?= =?UTF-8?q?w,=20key=20chips=20and=20no=20duplicate=20rows;=20=F0=9F=92=84?= =?UTF-8?q?=20style:=20Explore=20moves=20from=20the=20top=20right=20to=20t?= =?UTF-8?q?he=20profile=20corner,=20and=20repo=20lists=20get=20more=20room?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/forge-web/assets/nav.js | 127 ++++++++++-- crates/forge-web/src/pages/admin_backups.rs | 2 + crates/forge-web/src/pages/admin_mail.rs | 1 + .../forge-web/src/pages/admin_replication.rs | 2 + crates/forge-web/src/pages/ci_runs.rs | 131 ++++++++---- crates/forge-web/src/pages/org_settings.rs | 6 +- crates/forge-web/src/pages/repo_webhooks.rs | 2 + .../src/pages/settings_appearance.rs | 29 +-- .../src/pages/settings_notifications.rs | 17 +- .../forge-web/src/pages/settings_profile.rs | 4 +- crates/forge-web/src/views/mod.rs | 8 +- style/_canvas_lists.scss | 8 +- style/_ci_estimate.scss | 86 ++++++++ style/_lang_admin.scss | 4 +- style/_palette.scss | 162 ++++++++++++--- style/_shell.scss | 14 -- style/_timeline_ci.scss | 74 ++++++- style/main.scss | 196 +++++++++++++++++- 18 files changed, 737 insertions(+), 136 deletions(-) diff --git a/crates/forge-web/assets/nav.js b/crates/forge-web/assets/nav.js index 913db3a..c829c74 100644 --- a/crates/forge-web/assets/nav.js +++ b/crates/forge-web/assets/nav.js @@ -283,6 +283,26 @@ syncJobAll(); } + // A job's steps dropdown (details[data-steps-job]) the reader opened or shut is marked data-touched; + // a live swap or a soft navigation keeps that state for the same job. Untouched ones take the server's + // default: open for the selected job. + function captureSteps() { + var out = {}; + Array.prototype.forEach.call(document.querySelectorAll('details[data-steps-job][data-touched]'), function (d) { + out[d.getAttribute('data-steps-job')] = d.open; + }); + return out; + } + + function restoreSteps(kept) { + Array.prototype.forEach.call(document.querySelectorAll('details[data-steps-job]'), function (d) { + var id = d.getAttribute('data-steps-job'); + if (!Object.prototype.hasOwnProperty.call(kept, id)) { return; } + d.open = kept[id]; + d.setAttribute('data-touched', 'true'); + }); + } + document.addEventListener('click', function (e) { var el = e.target && e.target.closest ? e.target : null; if (!el) { return; } @@ -293,6 +313,9 @@ syncJobAll(); return; } + // The steps toggle is a summary: the browser opens or shuts it, and only the mark is set here. + var steps = el.closest('.ci-tl-steptoggle'); + if (steps && steps.parentNode) { steps.parentNode.setAttribute('data-touched', 'true'); return; } var btn = el.closest('[data-job-toggle]'); if (!btn) { return; } var li = btn.closest('[data-job-row]'); @@ -338,7 +361,9 @@ // A fit pane keeps its scroll when the page stays put (a live change, a post, a filter), by its place in the page. var paneTops = how === 'live' || how === 'post' || how === 'query' ? paneScrolls() : null; var bars = how === 'live' ? barSegments() : null; + var steps = captureSteps(); adopt(doc, keepFields, dd, how === 'live' ? captureJobs() : null); + restoreSteps(steps); placeRun(listTop); if (bars) { growBars(bars); } if (paneTops) { setPaneScrolls(paneTops); } @@ -4008,7 +4033,9 @@ return { label: opener.getAttribute('aria-label') || '', placeholder: word('placeholder'), - hint: word('hint'), + move: word('key-move'), + open: word('key-open'), + close: word('key-close'), empty: word('empty'), loading: word('loading'), failed: word('failed'), @@ -4413,6 +4440,56 @@ opts[pal.sel].scrollIntoView({ block: 'nearest' }); } + // The stroke paths of each row's icon, by kind. A page that searches settings text uses the setting's. + var PALETTE_ICON = { + 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'], + org: ['M3 21h18', 'M5 21V9l7-5 7 5v12', 'M10 21v-5h4v5'], + page: ['M7 3h7l5 5v13H7z', 'M14 3v5h5', 'M9.5 13h5', 'M9.5 17h5'], + setting: ['M4 7h9', 'M17 7h3', 'M4 17h3', 'M11 17h9', 'M13 5v4', 'M7 15v4'], + file: ['M9 8l-4 4 4 4', 'M15 8l4 4-4 4', 'M13 6l-2 12'], + action: ['M13 3L5 14h6l-1 7 8-11h-6z'], + search: ['M11 4a7 7 0 1 1 0 14 7 7 0 0 1 0-14z', 'M20 20l-3.5-3.5'] + }; + + function paletteIcon(item) { + var key = item.kind === 'page' && item.scan ? 'setting' : item.kind; + var ns = 'http://www.w3.org/2000/svg'; + var svg = document.createElementNS(ns, 'svg'); + svg.setAttribute('class', 'palette-ico'); + svg.setAttribute('viewBox', '0 0 24 24'); + svg.setAttribute('aria-hidden', 'true'); + (PALETTE_ICON[key] || PALETTE_ICON.page).forEach(function (d) { + var p = document.createElementNS(ns, 'path'); + p.setAttribute('d', d); + svg.appendChild(p); + }); + return svg; + } + + // A label's text, split after its last "/" so the path is muted and the last segment reads as the + // name. The two spans together hold the same text as the label. + function paletteLabel(label) { + var box = document.createElement('span'); + box.className = 'palette-label'; + var at = label.lastIndexOf('/'); + if (at < 0 || at === label.length - 1) { + var whole = document.createElement('span'); + whole.className = 'palette-name'; + whole.textContent = label; + box.appendChild(whole); + return box; + } + var path = document.createElement('span'); + path.className = 'palette-path'; + path.textContent = label.slice(0, at + 1); + var name = document.createElement('span'); + name.className = 'palette-name palette-tail'; + name.textContent = label.slice(at + 1); + box.appendChild(path); + box.appendChild(name); + return box; + } + // Filters and draws the list. Groups keep the order of their best match, so a page named exactly // like the query leads; with no query, the order is tabs, repos, orgs, then pages. function renderPalette() { @@ -4443,6 +4520,14 @@ scored = scored.filter(function (h) { return !h.item.near; }); } scored.sort(function (a, b) { return b.score - a.score || a.idx - b.idx; }); + // Two routes to one place read as the same row twice; the better match stays. + var seen = {}; + scored = scored.filter(function (h) { + var key = h.item.kind + '\n' + h.item.label; + if (seen[key]) { return false; } + seen[key] = true; + return true; + }); scored = scored.slice(0, PALETTE_MAX); var kinds = [], groups = {}; scored.forEach(function (h) { @@ -4476,7 +4561,8 @@ li.setAttribute('role', 'option'); li.setAttribute('aria-selected', 'false'); li.setAttribute('data-n', String(n)); - li.textContent = item.label; + li.appendChild(paletteIcon(item)); + li.appendChild(paletteLabel(item.label)); if (item.why) { var why = document.createElement('span'); why.className = 'palette-why'; @@ -4486,9 +4572,8 @@ pal.list.appendChild(li); }); }); - pal.note.className = 'palette-note muted small'; if (pal.hits.length) { - pal.note.textContent = pal.str.hint; + paletteNote(''); paletteSelect(0); // With no query Enter must not run an action: the selection starts on the first destination. if ((!raw || idle) && pal.hits[0].kind === 'action') { @@ -4497,7 +4582,7 @@ } } } else { - pal.note.textContent = pal.failed ? pal.str.failed : (pal.data ? pal.str.empty : pal.str.loading); + paletteNote(pal.failed ? pal.str.failed : (pal.data ? pal.str.empty : pal.str.loading)); pal.input.removeAttribute('aria-activedescendant'); } } @@ -4537,10 +4622,11 @@ load({ target: withoutHash(url), dest: url, init: GET_INIT, how: 'nav', keep: false, post: false, form: null }); } - // Shows a line in the palette's footer, in the colour of its state. + // Shows a line above the key chips, in the colour of its state. An empty text hides the line. function paletteNote(text, state) { - pal.note.textContent = text; + pal.note.textContent = text || ''; pal.note.className = 'palette-note muted small' + (state ? ' ' + state : ''); + pal.note.hidden = !text; } // Sends a state-changing control's form as the control itself would: its csrf field and other @@ -4613,6 +4699,22 @@ pal.input = dlg.querySelector('.palette-input'); pal.list = dlg.querySelector('.palette-list'); pal.note = dlg.querySelector('.palette-note'); + pal.note.hidden = true; + // The footer's key chips: the words beside them are set on each open, in the viewer's language. + var keys = document.createElement('div'); + keys.className = 'palette-keys'; + pal.keyWords = []; + [['↑↓'], ['↵'], ['Esc']].forEach(function (key) { + var chip = document.createElement('span'); + var kbd = document.createElement('kbd'); + kbd.textContent = key[0]; + var word = document.createElement('span'); + chip.appendChild(kbd); + chip.appendChild(word); + keys.appendChild(chip); + pal.keyWords.push(word); + }); + dlg.querySelector('.palette-box').appendChild(keys); pal.input.addEventListener('input', renderPalette); pal.input.addEventListener('keydown', function (e) { @@ -4665,8 +4767,9 @@ dlg.setAttribute('aria-label', pal.str.label); pal.input.placeholder = pal.str.placeholder; pal.input.setAttribute('aria-label', pal.str.placeholder); - // Over the path bar when there is one: the dialog's top and left edges sit at the bar's, and it is - // at least 360px wide (never wider than the viewport). + [pal.str.move, pal.str.open, pal.str.close].forEach(function (word, i) { pal.keyWords[i].textContent = word; }); + // Over the path bar when there is one: the dialog's top edge sits under the bar and its left edge + // at the bar's, kept inside the window. var bar = document.querySelector('.pathbar'); if (bar) { anchorPalette(dlg, bar.getBoundingClientRect()); } else { unanchorPalette(dlg); } if (typeof dlg.showModal !== 'function') { return; } @@ -4685,19 +4788,19 @@ } function anchorPalette(dlg, rect) { - var width = Math.min(Math.max(360, rect.width), window.innerWidth - 16); + // The width is the stylesheet's (at most 640px, inside the window), so the bar's width never sets it. + // Only the left edge is clamped, to the width the stylesheet gives the dialog at this window size. + var width = Math.min(640, window.innerWidth - (window.innerWidth <= 600 ? 16 : 32)); var left = Math.max(8, Math.min(rect.left, window.innerWidth - width - 8)); dlg.classList.add('anchored'); dlg.style.top = Math.round(rect.bottom + 4) + 'px'; dlg.style.left = Math.round(left) + 'px'; - dlg.style.width = Math.round(width) + 'px'; } function unanchorPalette(dlg) { dlg.classList.remove('anchored'); dlg.style.top = ''; dlg.style.left = ''; - dlg.style.width = ''; } // Ctrl+K and Cmd+K toggle the palette even while a text field has focus, since that is when a diff --git a/crates/forge-web/src/pages/admin_backups.rs b/crates/forge-web/src/pages/admin_backups.rs index 2392963..252fcb8 100644 --- a/crates/forge-web/src/pages/admin_backups.rs +++ b/crates/forge-web/src/pages/admin_backups.rs @@ -154,6 +154,7 @@ async fn backups_view( }
if settings.enabled { +

(crate::pages::passkeys::s(lang, "Configuration", "Yapılandırma"))

@@ -198,6 +199,7 @@ async fn backups_view(
} +

(crate::pages::passkeys::s(lang, "Run now", "Şimdi çalıştır"))

diff --git a/crates/forge-web/src/pages/admin_mail.rs b/crates/forge-web/src/pages/admin_mail.rs index 9a02bab..10fa029 100644 --- a/crates/forge-web/src/pages/admin_mail.rs +++ b/crates/forge-web/src/pages/admin_mail.rs @@ -285,6 +285,7 @@ async fn mail_view( +

(crate::pages::passkeys::s(lang, "Sending", "Gönderim"))

+

(crate::pages::passkeys::s(lang, "Sound alerts", "Sesli uyarılar"))

}
+

(crate::pages::passkeys::s(lang, "Email", "E-posta"))

@@ -87,17 +88,17 @@ async fn notifications_body(page: NotificationsPage) -> Result { (t(lang, Key::EmailNotifyLabel)) (t(lang, Key::EmailNotifyHelp)) + if let Some(message) = server_note { + (message) + } + if let Some(message) = unverified_note { + (message) + } - if let Some(message) = server_note { -

(message)

- } - if let Some(message) = unverified_note { -

(message)

- }
diff --git a/crates/forge-web/src/pages/settings_profile.rs b/crates/forge-web/src/pages/settings_profile.rs index b4b0381..989ec11 100644 --- a/crates/forge-web/src/pages/settings_profile.rs +++ b/crates/forge-web/src/pages/settings_profile.rs @@ -148,7 +148,7 @@ async fn profile_body(page: ProfilePage) -> Result { }
-
+
(t(lang,

(t(lang, Key::Avatar))

@@ -157,7 +157,7 @@ async fn profile_body(page: ProfilePage) -> Result { alert(message: message.as_str()) }
-
+
diff --git a/crates/forge-web/src/views/mod.rs b/crates/forge-web/src/views/mod.rs index 946f982..44bc280 100644 --- a/crates/forge-web/src/views/mod.rs +++ b/crates/forge-web/src/views/mod.rs @@ -392,6 +392,7 @@ async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result let admin_label = ad::t(lang, AK::AdminArea); let logout_label = t(lang, Key::LogOut); let bell_title = i18n::t(lang, Key::Notifications); + let explore_label = t(lang, Key::Explore); let open_label = mi::t(lang, MK::OpenNotifications); let clear_label = mi::t(lang, MK::ClearNotifications); let clear_title = mi::t(lang, MK::MarkAllRead); @@ -442,6 +443,7 @@ async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result
+ (t(lang, Key::Explore)) diff --git a/style/_canvas_lists.scss b/style/_canvas_lists.scss index 8ab5a24..570e65b 100644 --- a/style/_canvas_lists.scss +++ b/style/_canvas_lists.scss @@ -273,10 +273,10 @@ display: flex; flex-wrap: nowrap; align-items: center; - gap: 12px; - height: 36px; + gap: 16px; + height: 52px; min-width: 0; - padding: 0 14px; + padding: 0 16px; overflow: hidden; border-bottom: 1px solid var(--border); @@ -286,7 +286,7 @@ min-width: 0; overflow: hidden; font-family: var(--mono); - font-size: 13px; + font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; diff --git a/style/_ci_estimate.scss b/style/_ci_estimate.scss index bc16caf..5294f5b 100644 --- a/style/_ci_estimate.scss +++ b/style/_ci_estimate.scss @@ -38,3 +38,89 @@ progress.ci-est-run { height: 4px; margin-top: 8px; } + +// A step's progress: a 2 px bar along the foot of its row. A finished step is full in its state's colour; +// a running one fills to its share of the expected time (the page script moves it). A running step with +// no estimate has no value, so it shows a sliding segment rather than a made-up share. +progress.ci-est.ci-tl-stepprog { + position: absolute; + left: 0; + right: 0; + bottom: 0; + width: 100%; + height: 2px; + flex: none; + margin: 0; + border: 0; + border-radius: 0; + background: transparent; + color: var(--accent); + + &::-webkit-progress-bar { + background: transparent; + border-radius: 0; + } + + &::-webkit-progress-value { + border-radius: 0; + background: var(--border-strong); + } + + &::-moz-progress-bar { + border-radius: 0; + background: var(--border-strong); + } + + &.ci-sp-fail { + &::-webkit-progress-value, + &::-moz-progress-bar { + background: var(--bad); + } + } + + &.ci-sp-off { + &::-webkit-progress-value, + &::-moz-progress-bar { + background: var(--border); + } + } + + &.ci-sp-run { + &::-webkit-progress-value, + &::-moz-progress-bar { + background: var(--accent); + } + } + + // No value attribute: the element's own background carries a 30% segment that slides across. + &:not([value]) { + background: linear-gradient(var(--accent), var(--accent)) no-repeat, transparent; + background-size: 30% 100%, auto; + background-position: -43% 0, 0 0; + animation: ci-step-slide 1.4s linear infinite; + + &::-webkit-progress-bar, + &::-webkit-progress-value, + &::-moz-progress-bar { + background: transparent; + animation: none; + } + } +} + +@keyframes ci-step-slide { + from { + background-position: -43% 0, 0 0; + } + + to { + background-position: 100% 0, 0 0; + } +} + +@media (prefers-reduced-motion: reduce) { + progress.ci-est.ci-tl-stepprog:not([value]) { + animation: none; + background-position: 0 0, 0 0; + } +} diff --git a/style/_lang_admin.scss b/style/_lang_admin.scss index ecb3a67..a8e13da 100644 --- a/style/_lang_admin.scss +++ b/style/_lang_admin.scss @@ -41,8 +41,8 @@ $page-column: ".shell-site > .shell-body > main, .shell-site > .shell-body > mai // A form in a pane is a column of its own: 720px at most, left aligned. The mail form keeps its // three-field row. -.shell-site main .card > form:not(.inline-form):not(.srv-form):not([action="/admin/mail"]):not(:has(> .row-line)), -.shell-site main .card > form.stack:not(.srv-form):not([action="/admin/mail"]):not(:has(> .row-line)) { +.shell-site main .card:not(.rows-pane) > form:not(.inline-form):not(.srv-form):not([action="/admin/mail"]):not(:has(> .row-line)), +.shell-site main .card:not(.rows-pane) > form.stack:not(.srv-form):not([action="/admin/mail"]):not(:has(> .row-line)) { max-width: 720px; } diff --git a/style/_palette.scss b/style/_palette.scss index 202850e..bc30a4d 100644 --- a/style/_palette.scss +++ b/style/_palette.scss @@ -1,22 +1,23 @@ -// Command palette (Ctrl+K): a dialog over the page with a search row, one scrolling list grouped by -// kind, and a footer note. It follows the branch switcher's command palette look. +// Command palette (Ctrl+K): a panel over the page with a search row, one scrolling list grouped by +// kind, a line for action results and empty states, and a footer of key chips. The panel and its +// rows follow the card, the timeline's labels and the path bar's key chips. // The path bar's edit button (_shell.scss .pathbar-edit) opens it. The dialog is in the top layer, // so it sits over the page and the path bar without any positioning of its own. dialog.palette { - width: min(560px, calc(100vw - 32px)); - max-height: min(70vh, 520px); + width: min(640px, calc(100vw - 32px)); + max-height: min(70vh, 560px); margin: 12vh auto 0; padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); - box-shadow: var(--shadow); + box-shadow: var(--pop-shadow); &::backdrop { - background: rgba(20, 24, 22, 0.45); + background: color-mix(in srgb, var(--bg) 55%, transparent); } &[open] { @@ -46,7 +47,8 @@ dialog.palette { display: flex; align-items: center; gap: 10px; - padding: 0 12px; + height: 48px; + padding: 0 16px; color: var(--muted); border-bottom: 1px solid var(--border); @@ -58,7 +60,7 @@ dialog.palette { .palette-input { flex: 1 1 auto; min-width: 0; - height: 46px; + height: 48px; padding: 0; font: inherit; font-size: 15px; @@ -81,57 +83,104 @@ dialog.palette { flex: 1 1 auto; min-height: 0; margin: 0; - padding: 6px; + padding: 0 6px 6px; overflow-y: auto; list-style: none; - font-size: 0.875rem; + font-size: 14px; li { margin: 0; } - // Group headings: small caps like the branch switcher's, with a dashed rule between groups. + // Group headings: the mono label of the timeline, held at the top while its rows scroll past. .palette-head { - padding: 6px 8px 4px; + position: sticky; + top: 0; + z-index: 1; + height: 28px; + padding: 0 10px; + font-family: var(--mono); font-size: 11px; - font-weight: 600; - letter-spacing: 0.06em; + font-weight: 500; + line-height: 28px; + letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); + background: var(--surface); } - .palette-head:not(:first-child) { - margin-top: 6px; - padding-top: 10px; - border-top: 1px dashed var(--border); - } - - // Options: the selected row (keys or pointer) gets the soft accent fill. + // Rows: one line, 36px, an icon, the label, and the reason at the right. li[role="option"] { - padding: 7px 10px; + display: flex; + align-items: center; + gap: 10px; + height: 36px; + padding: 0 10px; color: var(--text); border-radius: var(--radius-md); cursor: pointer; - overflow-wrap: anywhere; + min-width: 0; } + // The selected row (keys or pointer): a surface step with a thin accent edge on the left. li[aria-selected="true"] { - background: var(--accent-soft); + background: var(--surface-2); + box-shadow: inset 2px 0 var(--accent); } + + li[role="option"]:hover { + background: var(--surface-2); + } +} + +.palette-ico { + flex: none; + width: 16px; + height: 16px; + fill: none; + stroke: var(--muted); + stroke-width: 1.8; + stroke-linecap: round; + stroke-linejoin: round; } -.palette-list li[role="option"]:has(.palette-why) { +// The label: a path muted, its last segment in the text colour, each ellipsised when they overflow. +.palette-label { + flex: 1 1 auto; display: flex; - align-items: baseline; - justify-content: space-between; - gap: 16px; + min-width: 0; + white-space: nowrap; +} + +.palette-path, +.palette-name { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.palette-path { + flex: 0 1 auto; + color: var(--muted); +} + +.palette-name { + flex: 0 1 auto; + color: var(--text); +} + +.palette-tail { + font-weight: 500; } .palette-why { - flex: 0 1 55%; + flex: 0 1 auto; + max-width: 50%; + min-width: 0; overflow: hidden; color: var(--muted); - font-size: 0.75rem; + font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; @@ -144,12 +193,17 @@ dialog.palette { border-radius: var(--radius-sm); } +// A line above the key chips: a sent action's result, or the state of the list. Hidden otherwise. .palette-note { flex: none; margin: 0; - padding: 8px 12px; + padding: 8px 16px; border-top: 1px solid var(--border); + &[hidden] { + display: none; + } + // A sent action: done in the ok colour, a refusal in the failure colour. &.is-ok { color: var(--ok); @@ -160,7 +214,40 @@ dialog.palette { } } -// Phones: the palette spans the screen width and sits at the top, with larger rows to tap. +// The footer's key chips, with the same key look as the path bar's Ctrl K. +.palette-keys { + flex: none; + display: flex; + align-items: center; + gap: 16px; + height: 36px; + padding: 0 16px; + border-top: 1px solid var(--border); + font-size: 12px; + color: var(--muted); + + > span { + display: inline-flex; + align-items: center; + gap: 6px; + white-space: nowrap; + } + + kbd { + flex: none; + padding: 0 5px; + font-family: var(--mono); + font-size: 11px; + line-height: 18px; + color: var(--text-2); + background: var(--surface-2); + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + } +} + +// Phones: the palette spans the screen width and sits at the top, with larger rows to tap. The key +// chips go: a phone has no keys. @media (max-width: 600px) { dialog.palette { width: calc(100vw - 16px); @@ -173,7 +260,16 @@ dialog.palette { font-size: 16px; } + .palette-search { + height: 52px; + } + .palette-list li[role="option"] { - padding: 12px 10px; + height: 44px; + padding: 0 12px; + } + + .palette-keys { + display: none; } } diff --git a/style/_shell.scss b/style/_shell.scss index a7decd8..03979ec 100644 --- a/style/_shell.scss +++ b/style/_shell.scss @@ -490,20 +490,6 @@ } } -// Signed in, Explore sits right after the path bar, centred on the bar's line. It shows from 700px: -// below that there is no room for it, and signed-in phones reach Explore through no icon. -.topbar .topbar-explore { - display: none; - align-self: center; - white-space: nowrap; -} - -@media (min-width: 640px) { - .topbar .topbar-explore { - display: inline-block; - } -} - // The avatar menu: the avatar is the summary; the menu list keeps its links from main.scss. .topbar .menu { flex: none; diff --git a/style/_timeline_ci.scss b/style/_timeline_ci.scss index 1bc8697..13a05d5 100644 --- a/style/_timeline_ci.scss +++ b/style/_timeline_ci.scss @@ -287,10 +287,71 @@ } } -// A step under the selected job: a 30 px line with a 6 px mark, its name and its duration at the right. +// A job's steps: a dropdown under its row. The row keeps room for the toggle at its right end, and while +// the dropdown is open the row's bar gives way to the step lines (the bar is the summary when shut). +.ci-tl-hassteps { + position: relative; + + > .ci-tl-job { + padding-right: 40px; + } + + &:has(> details[open]) .ci-tl-stepbar { + display: none; + } +} + +.ci-tl-steps { + margin: 0; +} + +.ci-tl-steplist { + margin: 0; + padding: 0; + list-style: none; +} + +// The toggle sits over the job row's right end, a 28 px target (36 px on a phone). Its chevron turns +// when the dropdown is open; the browser's marker is gone. +.ci-tl-steptoggle { + position: absolute; + top: 0; + right: 6px; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + width: 28px; + height: 36px; + list-style: none; + cursor: pointer; + + &::-webkit-details-marker { + display: none; + } + + &::marker { + content: ""; + } + + .ci-chev { + margin: 0; + } + + &:hover .ci-chev { + border-color: var(--text); + } +} + +.ci-tl-steps[open] > .ci-tl-steptoggle .ci-chev { + transform: rotate(45deg); +} + +// A step under its job: a 30 px line with a 6 px mark, its name and its duration at the right. // Indented past the job's dot, one level more for a matrix combination. The selected step has an -// accent edge on the left, and a failed step's name reads in --text. +// accent edge on the left, and a failed step's name reads in --text. Its progress bar is along the foot. .ci-tl-step { + position: relative; display: flex; align-items: center; gap: 8px; @@ -641,6 +702,15 @@ overflow: visible; } + // A thumb-sized toggle, and the job's duration keeps clear of it. + .ci-tl-steptoggle { + width: 36px; + } + + .ci-tl-hassteps > .ci-tl-job { + padding-right: 46px; + } + // These panels share out a fixed height on a wide window; here there is none to share. .ci-tl-panel { flex: none; diff --git a/style/main.scss b/style/main.scss index e0fc088..e147a20 100644 --- a/style/main.scss +++ b/style/main.scss @@ -5736,6 +5736,7 @@ html.js form.runner-load[data-dirty-form][data-dirty] .runner-save { flex-wrap: wrap; align-items: center; gap: 8px; + white-space: nowrap; } .ci-scale { @@ -7338,15 +7339,18 @@ button.ci-job-last { letter-spacing: 0; } -// A setting on one row: its label and hint at the left, its control at the right. +// A setting on one row: its label, its control right beside it, then its hint. The control never sits +// at the far end of a wide row, where the eye has to follow the line across to find it. The columns +// are the same on every row, so controls form one straight edge down the pane. .row-field { align-items: center; > .row-control { display: flex; - flex: 0 1 22rem; + flex: 1 1 14rem; align-items: center; - justify-content: flex-end; + justify-content: flex-start; + flex-wrap: wrap; gap: 8px; min-width: 0; @@ -7358,6 +7362,120 @@ button.ci-job-last { } } +@media (min-width: 761px) { + .row-line.row-field:not(.event-choices, .colour-line) { + --field-label: 260px; + display: grid; + grid-template-columns: var(--field-label) minmax(0, 1fr); + column-gap: 24px; + row-gap: 2px; + justify-items: start; + + > .row-main { + display: contents; + } + + .row-title, + .row-main > * { + grid-column: 1; + } + + > .row-control { + grid-column: 2; + grid-row: 1 / span 4; + width: 100%; + max-width: 440px; + } + } + + // A picture or icon before the label keeps the controls on the same edge as every other row. + .row-line.row-field:not(.event-choices, .colour-line):has(> .row-icon, > .avatar) { + grid-template-columns: var(--field-mark) calc(var(--field-label) - var(--field-mark) - 12px) minmax(0, 1fr); + --field-mark: 20px; + column-gap: 12px; + + > .row-icon, + > .avatar { + grid-column: 1; + grid-row: 1 / span 5; + } + + .row-title, + .row-main > * { + grid-column: 2; + } + + > .row-control { + grid-column: 3; + margin-left: 12px; + } + } + + .row-line.row-field:not(.event-choices, .colour-line):has(> .avatar) { + --field-mark: 40px; + } + + // A tall field keeps its label at the top, level with the field's first line. + .row-line.row-field:not(.event-choices, .colour-line):has(textarea) { + align-items: start; + + .row-title { + padding-top: 6px; + } + + .row-main > :not(.row-title) { + padding-top: 6px; + } + } + + .row-foot:is(.row-field ~ *) { + padding-left: calc(20px + 260px + 24px); + } +} + +// With room, the hint moves to the right of the control and the row keeps one line of text. +@media (min-width: 1200px) { + .row-line.row-field:not(.event-choices, .colour-line) { + grid-template-columns: var(--field-label) minmax(0, 440px) minmax(0, 1fr); + row-gap: 0; + + grid-template-rows: 1fr auto auto auto 1fr; + + .row-title { + grid-row: 1 / span 5; + } + + > .row-control { + grid-row: 1 / span 5; + } + + // The hint lines sit in the middle tracks, so one line or three stay centred on the control. + .row-main > :not(.row-title) { + grid-column: 3; + } + + .row-main > :nth-child(2) { + grid-row: 2; + } + + .row-main > :nth-child(3) { + grid-row: 3; + } + + .row-main > :nth-child(4) { + grid-row: 4; + } + } + + .row-line.row-field:not(.event-choices, .colour-line):has(> .row-icon, > .avatar) { + grid-template-columns: var(--field-mark) calc(var(--field-label) - var(--field-mark) - 12px) minmax(0, 440px) minmax(0, 1fr); + + .row-main > :not(.row-title) { + grid-column: 4; + } + } +} + .row-foot { display: flex; align-items: center; @@ -7426,12 +7544,30 @@ form.rows-pane { min-width: 0; } -.rows-pane > .colour-group { +.rows-pane > .colour-group, +.rows-pane form > .colour-group { padding: 16px 20px; border-width: 1px 0 0; border-radius: 0; } +.colour-tabs { + width: fit-content; +} + +// Background and accent side by side, so the colours do not push the rest of the page off the screen. +@media (min-width: 1400px) { + .colour-panel { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 0 32px; + } + + .colour-panel > .colour-line { + padding-inline: 0; + } +} + // The rule editor's switches are rows inside its own panes. .switch-list > .row-line { padding: 10px 0; @@ -7441,9 +7577,57 @@ form.rows-pane { } } -.rows-section { +// A category inside a pane: its name on a quiet strip, with the hairline of a row under it. +.rows-pane .rows-section, +.rows-pane form .rows-section { + margin: 0; + padding: 18px 20px 8px; + border-bottom: 1px solid var(--border); + font-family: var(--mono); + font-size: 11px; + font-weight: 600; + line-height: 1.4; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--muted); +} + +.rows-pane > .rows-section:first-child, +.rows-pane form > .rows-section:first-of-type { + padding-top: 12px; +} + +.rows-pane > .rows-section + *, +.rows-pane form > .rows-section + * { + border-top: 0; +} + +.rows-pane form > .rows-section:not(:first-of-type), +.rows-pane form > .row-line + .rows-section { + border-top: 1px solid var(--border); +} + +// A pane's form only wraps its rows, so the 720px form rule must not draw a short hairline over them. +.rows-pane > form:not(.inline-form) { + width: 100%; +} + +// A message in a pane reads as a line of the pane, inside its padding. +.card.rows-pane > p.notice { margin: 0; - padding: 12px 20px 8px; + padding: 12px 20px 12px 56px; + font-size: 0.8125rem; + background: none; + border-width: 1px 0 0; + border-radius: 0; +} + +// A form that is itself a row, such as a device's test button. +.rows-pane form.row-form-line { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; } @media (max-width: 600px) {