From 5ef39762745b7a33191bc8f01eeed726ac9a705f Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:23:02 -0400 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix(dashboard):=20share=20tr?= =?UTF-8?q?acker=20row=20pill=20assembly;=20fix=20shrink-priority=20commen?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/fixed-15451-tracker-row-pill-helper.md | 1 + src/pkg/dashboard/static-src/css/tracker.css | 4 ++-- src/pkg/dashboard/static-src/js/tracker-row.js | 9 ++++++--- src/pkg/dashboard/static/index.html | 13 ++++++++----- 4 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 changelog.d/fixed-15451-tracker-row-pill-helper.md diff --git a/changelog.d/fixed-15451-tracker-row-pill-helper.md b/changelog.d/fixed-15451-tracker-row-pill-helper.md new file mode 100644 index 0000000000..ae3329211f --- /dev/null +++ b/changelog.d/fixed-15451-tracker-row-pill-helper.md @@ -0,0 +1 @@ +- fix(dashboard): share the PR link → lineage → base-pill assembly between tracker row renderers; correct the tracker.css shrink-priority comment (#15447, #15451) diff --git a/src/pkg/dashboard/static-src/css/tracker.css b/src/pkg/dashboard/static-src/css/tracker.css index 4b91742e1e..b31d921426 100644 --- a/src/pkg/dashboard/static-src/css/tracker.css +++ b/src/pkg/dashboard/static-src/css/tracker.css @@ -108,8 +108,8 @@ .ham-head-cols .ham-seg.ham-head-lead { flex: 0 0 calc((100% - 4em - 6 * var(--sp-1)) / 2 + 2 * var(--sp-1)); padding: 0 var(--sp-6) 0 0; } .ham-head-cols .ham-seg.ham-head-lead.ham-head-wide { flex: 1 1 0; } /* The PR cell is one line: connector, author icon + #N + title, lineage - chip and base pill sit side by side; the title gives way first (then - the lineage chip), the pills and the connector never shrink + chip and base pill sit side by side; the lineage chip gives way first + (flex-shrink 2), then the title (1), the pills and the connector never shrink (hivecommons/hive "consolidate from 3 lines of text to 1"). */ .ham-head-cols .ham-seg.ham-head-pr { flex: 1 1 0; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: var(--sp-2); min-width: 0; overflow: hidden; } .ham-head-cols .ham-seg.ham-head-pr > .ham-linked-ico, .ham-head-cols .ham-seg.ham-head-pr > .ham-badge { flex: 0 0 auto; } diff --git a/src/pkg/dashboard/static-src/js/tracker-row.js b/src/pkg/dashboard/static-src/js/tracker-row.js index c47e38ab6c..097e1660e3 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row.js +++ b/src/pkg/dashboard/static-src/js/tracker-row.js @@ -987,6 +987,10 @@ ctx.nowMs = typeof nowMs === 'number' ? nowMs : Date.now(); return stageTrackerLeadActionHtml(item, ctx); } + // PR link, then the lineage chip (null = none), then the base pill. + function stageTrackerPRPillsHtml(ref, lineage, baseRef) { + return ref + (lineage == null ? '' : ' ' + lineage) + (baseRef ? ` ${esc(baseRef)}` : ''); + } function stageTrackerSubRowHtml(lp, issue, stages, nowMs, ctx) { const pr = stageTrackerLinkedPRItem(issue, lp); const superseded = typeof stageTrackerLinkedSupersededText === 'function' ? stageTrackerLinkedSupersededText(lp, issue) : ''; @@ -998,8 +1002,7 @@ const lineage = superseded ? '' : ((typeof stageTrackerLineageChipHtml === 'function' ? stageTrackerLineageChipHtml(pr, nowMs) : '') || (typeof stageTrackerAdoptedFromChipHtml === 'function' ? stageTrackerAdoptedFromChipHtml(pr, nowMs) : '')); const chip = ctx && ctx.repoChips ? stageTrackerRepoChipHtml(pr.repo, ctx) : ''; if (chip) ref = `${chip}${ref}`; - if (lineage) ref += ' ' + lineage; - if (lp.base_ref) ref += ` ${esc(lp.base_ref)}`; + ref = stageTrackerPRPillsHtml(ref, lineage || null, lp.base_ref); ref = STAGE_TRACKER_LINKED_GLYPH + ref; if (superseded) { // The adopted original: one dimmed line, no chevron track, no row @@ -1222,7 +1225,7 @@ // One covering PR: a single entry whose strip the PR's stage drives. const lp = linked[0]; const who = (lp.author_kind || 'hive') + (lp.author ? ' · @' + lp.author : ''); - prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)) + (lp.lineage && typeof stageTrackerLineageChipHtml === 'function' ? ' ' + stageTrackerLineageChipHtml(lp, nowMs) : '') + (lp.base_ref ? ` ${esc(lp.base_ref)}` : '')]; + prRefs = [STAGE_TRACKER_LINKED_GLYPH + stageTrackerPRPillsHtml(stageTrackerPRRef(lp.number, lp.url, lp.author_kind || '', lp.author, lp.title, (lp.title ? lp.title + '\n' : '') + 'Author: ' + who + ' · ' + stageTrackerLinkedTip(item, lp.number, ctx)), lp.lineage && typeof stageTrackerLineageChipHtml === 'function' ? stageTrackerLineageChipHtml(lp, nowMs) : null, lp.base_ref)]; shown = Object.assign({}, item, { via_pr: true, stage: lp.stage || 40, stage_since: lp.stage_since || item.stage_since, modifiers: lp.modifiers || item.modifiers, deferred_modifiers: lp.deferred_modifiers || item.deferred_modifiers || [], caption: lp.caption || item.caption, reason: lp.reason || item.reason, human_approver: lp.human_approver || '', manual_merge: !!lp.manual_merge, human_merge_reason: lp.human_merge_reason || '', human_merge_reason_text: lp.human_merge_reason_text || '', sentinel_alert: !!lp.sentinel_alert, sentinel_reason: lp.sentinel_reason || '', head: lp.head || '', decision_needed: lp.decision_needed || null, hold: lp.hold || null, adoption: lp.adoption || null, stage_actor: lp.stage_actor || item.stage_actor || null, claimant: lp.claimant || null, presence: lp.presence || null, rework: lp.rework || null, merge_gate: lp.merge_gate || null, merge_train: lp.merge_train || null, decided: lp.decided || item.decided || null }); } else if (linked.length) { diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 0aa2513327..33f6857a12 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -1431,8 +1431,8 @@ .ham-head-cols .ham-seg.ham-head-lead { flex: 0 0 calc((100% - 4em - 6 * var(--sp-1)) / 2 + 2 * var(--sp-1)); padding: 0 var(--sp-6) 0 0; } .ham-head-cols .ham-seg.ham-head-lead.ham-head-wide { flex: 1 1 0; } /* The PR cell is one line: connector, author icon + #N + title, lineage - chip and base pill sit side by side; the title gives way first (then - the lineage chip), the pills and the connector never shrink + chip and base pill sit side by side; the lineage chip gives way first + (flex-shrink 2), then the title (1), the pills and the connector never shrink (hivecommons/hive "consolidate from 3 lines of text to 1"). */ .ham-head-cols .ham-seg.ham-head-pr { flex: 1 1 0; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: var(--sp-2); min-width: 0; overflow: hidden; } .ham-head-cols .ham-seg.ham-head-pr > .ham-linked-ico, .ham-head-cols .ham-seg.ham-head-pr > .ham-badge { flex: 0 0 auto; } @@ -16503,6 +16503,10 @@