Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/integration-governance.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const MAX_COMMITS = 1000;
const MAX_AUTHOR_BATCH = 50;
// This literal is inside the enrolled .github closure. A caller-supplied
// preparedBy.sourceSHA must never choose a new executable verifier tree.
const TRUSTED_SCRIPTS_TREE = '6067449abe5556e11068e2901a222a45c03fe1d2';
const TRUSTED_SCRIPTS_TREE = '066d4e1e6d183026098cafe5a312633e517b2031';
const SOURCE = 'https://github.com/kubernetes-sigs/kubebuilder-release-tools/tree/012269a88fa4c034a0acf1ba84c26b195c0dbab4';
const sha = value => crypto.createHash('sha256').update(value).digest('hex');
const git = (args, cwd = process.cwd()) =>
Expand Down
1 change: 1 addition & 0 deletions changelog.d/changed-activity-phone-card-rows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Dashboard: on phones each Activity monitor row is a ~90px card — ☐/⋯ in the top-right corner, a clamped head (repo chip, #ref, two-line title, PR line, chips), the progress pill, one line of caption, no "no linked issue" placeholder — the pill sheet carries the full title and note, and the phone ergonomics probe counts the padded hit areas the pill and inline chips grow to 44px with; the 1280 layout is unchanged (hivecommons/hive#17161).
2 changes: 2 additions & 0 deletions src/docs/dashboard-sections/activity-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ Reduced-motion preferences disable animation; needs-human remains steadily red.

**On a phone** (≤640px, or a touch screen up to 820px) the eight chevrons do not fit a row, so each row shows a single **progress pill** in their place — `Step 7/8 · Merge queue · 2h`: the lit chevron's position counted as drawn (CI and Review are two steps; a nested PR row counts only its own PR columns), its word and the time on step. The pill takes the strip's colour: amber for a steady or working stage, green once merged, the amber→red needs-human tint when a person must move. The sticky column header is hidden with the strip. Tapping the pill opens the full chevron strip, the `since` age, the current-stage caption and the lit chevron's hover text in a full-screen sheet (✕, Esc or *Close*); the strip scrolls sideways inside the sheet if it has to. When a row moves between refreshes the pill flashes once instead of the chevron-to-chevron movement animation. At 1280 and in phone landscape wider than 820px the strip is drawn exactly as before ([#17160](https://github.com/hivecommons/hive/issues/17160)).

Phone rows are laid out as **cards** of about 90px: ☐ and ⋯ sit in the card's top-right corner instead of the left gutter; the head wraps its parts — kind icon, repo chip, `#ref` and a title clamped to two lines, then the covering PR on one line when an issue row names one (a PR-only row's PR text hangs beside its icon and chip), then any chips or lead action on a line of their own, which shortens the title to one line; the pill follows, stopping short of the tools column; the current-stage caption keeps its lead clause on one line. The muted *no linked issue* placeholder is not drawn. The pill sheet carries the full title, the full needs-human note and the full caption, so nothing a card clips is lost. The density acceptance fixture at 390×844 must keep the median row at or under 96px with at least six rows per screen ([#17161](https://github.com/hivecommons/hive/issues/17161)).

### Payload freshness and stage-engine reference

The view is fed by `GET /api/stage-tracker`. Without a stage or journal entry an item is in the Open column; a not-yet-placed item can read **New** as described [below](#new-row-000-new-the-pre-stage-state). Scanner buckets can place unlabeled claimed→020, in-progress→030 and covered→040 work.
Expand Down
28 changes: 27 additions & 1 deletion src/pkg/dashboard/stage_tracker_activity.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,36 @@ test('known and original chevrons keep full long text inside a shared one-line c
assert.match(css, /^\s*\.ham-pill \{ display: none; \}/m);
assert.match(css, /@media \(max-width: 640px\), \(\(pointer: coarse\) and \(max-width: 820px\)\) \{\s*\.ham-cols \{ display: none; \}\s*\.ham-row > \.ham-strip-row > \.ham-strip, \.ham-sub > \.ham-strip-row > \.ham-strip,/);
assert.match(css, /\.ham-pill \{ display: inline-flex;[^}]*min-height: var\(--control-compact-min-h\);[^}]*font-size: var\(--fs-sm\);/);
assert.match(css, /\.ham-pill::before \{ content: ""; position: absolute; inset: calc\(\(var\(--control-compact-min-h\) - var\(--tap-target\)\) \/ 2\) 0; \}/);
assert.match(css, /\.ham-pill::before \{ content: ""; position: absolute; inset: calc\(\(var\(--control-compact-min-h\) - var\(--tap-target\)\) \/ 2 - var\(--sp-1\)\) 0; \}/);
assert.match(css, /\.ham-pill\[data-motion="needs-human"\] \{ background: color-mix\(in srgb, var\(--amber\) 45%, var\(--red\)\);/);
});

test('phone card per row: clamped head boxes, badge line, one-line caption, full title in the sheet (#17161)', () => {
const css = fs.readFileSync(path.join(__dirname, 'static-src/css/tracker.css'), 'utf8');
const start = css.indexOf('Phone card per row (hivecommons/hive#17161)');
const open = css.indexOf('@media', start);
const card = css.slice(open, css.indexOf('\n }\n', open) + 7);
// Scoped to the phone tier only; the desktop lane grid is untouched.
assert.match(card, /^\s*@media \(max-width: 640px\), \(\(pointer: coarse\) and \(max-width: 820px\)\) \{/m);
// The head drops the tap target's min-height (#17163) and wraps the issue slot, PR reference and badges as flex items.
assert.match(card, /#activity-monitor-section \.ham-row > \.ham-row-head\.ham-row-head, #activity-monitor-section \.ham-sub > \.ham-row-head\.ham-row-head \{ display: flex; flex-wrap: wrap;[^}]*min-height: 0;/);
assert.match(card, /\.ham-head-cols, \.ham-head-cols > \.ham-strip, \.ham-head-cols \.ham-seg\.ham-head-lead, \.ham-head-cols \.ham-seg\.ham-head-pr, \.ham-head-cols \.ham-pr-line \{ display: contents; \}/);
assert.match(card, /\.ham-row-head \.ham-head-main, #activity-monitor-section \.ham-row-head \.ham-pr-ref \{ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;/);
assert.match(card, /\.ham-row-head:has\(\.ham-head-main > \.ham-title:not\(\.ham-no-issue-t\)\) \.ham-pr-ref \{ -webkit-line-clamp: 1; flex-basis: 100%; \}/);
assert.match(card, /\.ham-row-head:has\(\.ham-badges:not\(:empty\)\) :is\(\.ham-head-main, \.ham-pr-ref\) \{ -webkit-line-clamp: 1; \}/);
assert.match(card, /\.ham-row-head \.ham-no-issue-t, \.ham-row-head \.ham-linked-ico \{ display: none; \}/);
assert.match(card, /\.ham-row > \.ham-current-stage, \.ham-sub > \.ham-current-stage \{ margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; \}/);
// Inline chips keep the line height; their hit areas pad out to --tap-target. The pill stops short of the tools column.
assert.match(card, /\.ham-row-head \.ham-repo-chip::after, \.ham-row-head \.ham-lead-act::before \{ content: ""; position: absolute; inset: calc\(-1 \* var\(--sp-6\)\) 0; \}/);
assert.match(card, /\.ham-row > \.ham-strip-row > \.ham-pill, \.ham-sub > \.ham-strip-row > \.ham-pill \{ max-width: calc\(100% - 2 \* var\(--tap-target\) - var\(--sp-2\) - var\(--sp-3\)\); \}/);
assert.doesNotMatch(card.slice(card.indexOf('{')), /#[0-9a-fA-F]{3,8}\b|\d+px/, 'card tier uses tokens only');
// The sheet exposes what the card clamps: the full title and the needs-human note.
const sheet = fn(strip, 'stageTrackerPillSheet');
assert.match(sheet, /\.ham-title:not\(\.ham-no-issue-t\), :scope > \.ham-row-head \.ham-pr-title/);
assert.match(sheet, /<p class="ham-pill-sheet-title">\$\{esc\(fullTitle\)\}<\/p>/);
assert.match(sheet, /<p class="ham-pill-sheet-note">\$\{esc\(note\.textContent\.trim\(\)\)\}<\/p>/);
});

test('phone progress pill names the step, stage and age and opens the strip sheet (#17160)', () => {
const layout = fs.readFileSync(path.join(root, 'tracker-row-layout.js'), 'utf8');
const pillHtml = new Function('esc', 'stageTrackerSegments', 'stageTrackerShortAgo', globals + `
Expand Down
44 changes: 43 additions & 1 deletion src/pkg/dashboard/static-src/css/tracker.css
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@
.ham-pill { display: inline-flex; position: relative; align-items: center; gap: var(--sp-2); max-width: 100%; min-height: var(--control-compact-min-h); padding: var(--sp-1) var(--sp-3); border: 0; border-radius: var(--r-pill); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 1.2; text-align: left; cursor: pointer; background: var(--amber); color: var(--surface-0); -webkit-tap-highlight-color: transparent; }
/* The box stays at the compact control height so a nested-PR row fits a 667px phone; the hit
area is padded out to the tap target. */
.ham-pill::before { content: ""; position: absolute; inset: calc((var(--control-compact-min-h) - var(--tap-target)) / 2) 0; }
.ham-pill::before { content: ""; position: absolute; inset: calc((var(--control-compact-min-h) - var(--tap-target)) / 2 - var(--sp-1)) 0; }
.ham-pill > span { min-width: 0; white-space: nowrap; }
.ham-pill .ham-pill-step { flex: 0 0 auto; opacity: .85; font-variant-numeric: tabular-nums; }
.ham-pill .ham-pill-label { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
Expand All @@ -971,9 +971,51 @@
.ham-pill-sheet .ham-strip-row { display: flex; align-items: center; gap: var(--sp-2); min-width: 32em; overflow: visible; }
.ham-pill-sheet .ham-strip-row > .ham-strip, .ham-pill-sheet .ham-strip-row > .ham-since { display: flex; }
.ham-pill-sheet .ham-strip-row > .ham-strip { display: grid; }
.ham-pill-sheet .ham-pill-sheet-title { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); color: var(--text); overflow-wrap: anywhere; }
.ham-pill-sheet .ham-pill-sheet-note { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); color: var(--amber); }
.ham-pill-sheet .ham-pill-sheet-caption { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); color: var(--text); }
.ham-pill-sheet .ham-pill-sheet-tip { margin: var(--sp-2) 0 0; font-size: var(--fs-sm); color: var(--text-muted); white-space: pre-line; }
@media (prefers-reduced-motion: reduce) { .ham-pill.ham-pill-moved { animation: none; } }
/* Phone card per row (hivecommons/hive#17161). Same markup as 1280; the
phone tier re-flows it. ☐ and ⋯ already sit tap-sized in the card's
top right (#17163); the head drops the tap target's height so they
overhang the card's top padding and the pill starts where they end.
The head is a wrapping flex line: the issue slot (kind icon · repo
chip · #ref · title) and the PR reference are each a box clamped to
two lines — on a PR-only row the slot is just icon + chip and the PR
text hangs beside it; on an issue row that also names its PR the PR
gets one line below — while badges and the lead action wrap onto a
line of their own, never clipped by the clamp. "no linked issue" is
dropped and the caption keeps its lead clause on one line. The pill
sheet carries the full title and the needs-human note. */
@media (max-width: 640px), ((pointer: coarse) and (max-width: 820px)) {
#activity-monitor-section .ham-row > .ham-row-head.ham-row-head, #activity-monitor-section .ham-sub > .ham-row-head.ham-row-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--sp-2); row-gap: var(--sp-1); min-height: 0; line-height: var(--lh-control); }
.ham-head-cols, .ham-head-cols > .ham-strip, .ham-head-cols .ham-seg.ham-head-lead, .ham-head-cols .ham-seg.ham-head-pr, .ham-head-cols .ham-pr-line { display: contents; }
#activity-monitor-section .ham-row-head .ham-head-main, #activity-monitor-section .ham-row-head .ham-pr-ref { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; flex: 1 1 auto; min-width: 0; max-width: 100%; gap: 0; }
#activity-monitor-section .ham-row-head .ham-head-main:has(> .ham-no-issue-t) { flex: 0 0 auto; }
#activity-monitor-section .ham-row-head .ham-pr-ref { flex-basis: 10em; font-size: inherit; }
#activity-monitor-section .ham-row-head:has(.ham-head-main > .ham-title:not(.ham-no-issue-t)) .ham-pr-ref { -webkit-line-clamp: 1; flex-basis: 100%; }
/* A row carrying a lead action or badge gives the title's second line
to that badge line so the card keeps its height. */
#activity-monitor-section .ham-row-head:has(.ham-badges:not(:empty)) :is(.ham-head-main, .ham-pr-ref) { -webkit-line-clamp: 1; }
.ham-row-head .ham-kind-ico, .ham-row-head .ham-active-ico { display: inline-block; vertical-align: calc(-1 * var(--sp-1)); }
/* Chips and the lead action render inline so no line box grows past
the head's line height; borders paint on the inline box and the
::before / ::after hit areas pad the tap target back out. */
#activity-monitor-section .ham-row-head :is(.ham-repo-chip, .ham-base-pill, .ham-badge, .ham-lead-act) { position: relative; display: inline; min-height: 0; min-width: 0; height: auto; padding-block: 0; line-height: inherit; vertical-align: baseline; white-space: nowrap; }
.ham-row-head .ham-repo-chip::after, .ham-row-head .ham-lead-act::before { content: ""; position: absolute; inset: calc(-1 * var(--sp-6)) 0; }
.ham-row-head .ham-ref, .ham-row-head .ham-title, .ham-row-head .ham-pr-ref > *, .ham-row-head .ham-lineage, .ham-row-head .ham-adopted-from { display: inline; white-space: normal; overflow: visible; max-width: none; }
.ham-row-head .ham-ref, .ham-row-head .ham-pr-num, .ham-row-head .ham-repo-chip { margin-right: var(--sp-2); }
.ham-row-head .ham-title { color: var(--text); }
.ham-row-head .ham-no-issue-t, .ham-row-head .ham-linked-ico { display: none; }
.ham-row-head .ham-badges { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2); flex: 0 1 auto; max-width: 100%; }
.ham-row-head .ham-badges:empty { display: none; }
.ham-row-head .ham-badges > .ham-badge { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
/* The pill starts on the tools' bottom edge, so it stops short of
their column; its label ellipsises and the sheet has the rest. */
.ham-row > .ham-strip-row > .ham-pill, .ham-sub > .ham-strip-row > .ham-pill { max-width: calc(100% - 2 * var(--tap-target) - var(--sp-2) - var(--sp-3)); }
.ham-row > .ham-current-stage, .ham-sub > .ham-current-stage { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Movement animation: when an item's lit chevron changes column between
two refreshes, the chosen effect (settings gear → Movement animation)
plays once on that row. Overlays live in .ham-anim-layer, an absolute
Expand Down
6 changes: 5 additions & 1 deletion src/pkg/dashboard/static-src/js/tracker-row-strip.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,9 +665,13 @@
const head = row.querySelector(':scope > .ham-row-head .ham-ref, :scope > .ham-row-head .ham-pr-ref .ham-pr-num');
const active = stripRow && stripRow.querySelector('.ham-seg.active');
const title = (head ? head.textContent.trim() + ' · ' : '') + (pill ? pill.querySelector('.ham-pill-label').textContent : 'Pipeline progress');
// The phone card clamps the head to two lines and the needs-human note
// to one (hivecommons/hive#17161); the sheet carries them in full.
const fullTitle = [...row.querySelectorAll(':scope > .ham-row-head .ham-title:not(.ham-no-issue-t), :scope > .ham-row-head .ham-pr-title')].map(n => n.textContent.trim()).filter(Boolean).join(' · ');
const note = row.querySelector(':scope > .ham-human-context .cue-event-text') || row.querySelector(':scope > .ham-human-context > span');
const overlay = document.createElement('div');
overlay.className = 'hive-dialog-overlay';
overlay.innerHTML = `<div class="hive-dialog ham-pill-sheet" role="dialog" aria-modal="true" aria-label="Pipeline progress"><div class="hive-dialog-title">${esc(title)}</div><div class="hive-dialog-body long modal-scroll"><div class="ham-pill-sheet-strip"></div>${caption ? `<p class="ham-pill-sheet-caption">${esc(caption.textContent)}</p>` : ''}${active && active.title ? `<p class="ham-pill-sheet-tip">${esc(active.title)}</p>` : ''}</div><div class="hive-dialog-buttons"><button type="button" class="hv-btn btn-primary hive-dialog-btn primary" data-initial-focus>Close</button></div></div>`;
overlay.innerHTML = `<div class="hive-dialog ham-pill-sheet" role="dialog" aria-modal="true" aria-label="Pipeline progress"><div class="hive-dialog-title">${esc(title)}</div><div class="hive-dialog-body long modal-scroll">${fullTitle ? `<p class="ham-pill-sheet-title">${esc(fullTitle)}</p>` : ''}<div class="ham-pill-sheet-strip"></div>${note ? `<p class="ham-pill-sheet-note">${esc(note.textContent.trim())}</p>` : ''}${caption ? `<p class="ham-pill-sheet-caption">${esc(caption.textContent)}</p>` : ''}${active && active.title ? `<p class="ham-pill-sheet-tip">${esc(active.title)}</p>` : ''}</div><div class="hive-dialog-buttons"><button type="button" class="hv-btn btn-primary hive-dialog-btn primary" data-initial-focus>Close</button></div></div>`;
const slot = overlay.querySelector('.ham-pill-sheet-strip');
if (stripRow) {
const copy = stripRow.cloneNode(true);
Expand Down
Loading
Loading