@popcorn245/cornfield 0.36.0 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/explorer/explorer.css +6 -1
- package/explorer/forge-panel.js +9 -5
- package/explorer/index.html +5 -5
- package/explorer/runs-view.js +8 -0
- package/package.json +1 -1
package/explorer/explorer.css
CHANGED
|
@@ -621,7 +621,9 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
621
621
|
.hx-sheet-handle span { width: 40px; height: 5px; border-radius: var(--corn-radius-pill); background: var(--corn-surface-3); }
|
|
622
622
|
.hx-sheet-handle:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-width) * -1); border-radius: var(--corn-radius); }
|
|
623
623
|
.hx-backdrop { display: none; }
|
|
624
|
-
|
|
624
|
+
/* With the node panel expanded the backdrop stays as the tap that closes it, but draws nothing: the map above the sheet is the free band the
|
|
625
|
+
selected node was panned into (camera.js panIntoView), and a scrim or blur over it hides that node (issue #180) */
|
|
626
|
+
.hx-stage[data-sheet-open="drawer"] .hx-backdrop:not([hidden]) { display: block; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
|
|
625
627
|
|
|
626
628
|
/* The proposal bar */
|
|
627
629
|
.hx-proposal-bar { max-height: 50dvh; overflow-y: auto; padding: 0 var(--corn-space-4) var(--corn-space-3); }
|
|
@@ -757,6 +759,8 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
757
759
|
.hx-forge-tab:focus-visible, .hx-forge-chip:focus-visible, .hx-forge-back:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-width) * -1); }
|
|
758
760
|
.hx-forge-count { color: var(--corn-text-3); font-size: var(--corn-text-xs); font-weight: 500; }
|
|
759
761
|
.hx-forge-count[hidden] { display: none; }
|
|
762
|
+
/* A tab's count holds its width before it is read, so the tabs do not move when the counts arrive (issue #192): it is empty, not hidden; Deploys has none and keeps `hidden` */
|
|
763
|
+
.hx-forge-tab .hx-forge-count { display: inline-block; min-width: 2ch; }
|
|
760
764
|
/* The status line and the Filter chip; the focus is put on the title (a heading, tabindex -1) when the panel opens, so it shows no ring */
|
|
761
765
|
.hx-forge-body > * { flex-shrink: 0; } /* a tall detail scrolls the body; it must not squash the tabs */
|
|
762
766
|
.hx-forge .hx-drawer-title:focus-visible, .hx-forge-notes-title:focus-visible { outline: none; }
|
|
@@ -1134,6 +1138,7 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1134
1138
|
.hx-forge-skeleton { display: flex; flex-direction: column; gap: var(--corn-space-2); min-height: 64px; padding: var(--corn-space-3); border: var(--corn-border) solid var(--corn-line-soft); border-radius: var(--corn-radius); list-style: none; }
|
|
1135
1139
|
.hx-forge-skeleton > span { display: block; height: 10px; border-radius: var(--corn-radius-sm); background: var(--corn-surface-3); }
|
|
1136
1140
|
.hx-forge-skeleton > span:last-child { width: 55%; }
|
|
1141
|
+
.hx-forge-skeleton-line > span { display: inline-block; width: 55%; height: 10px; vertical-align: middle; border-radius: var(--corn-radius-sm); background: var(--corn-surface-3); } /* one line of the runner line or the totals, while they load */
|
|
1137
1142
|
.hx-forge-empty { line-height: 1.5; }
|
|
1138
1143
|
|
|
1139
1144
|
/* The panel's title row and tabs stay in place while a list scrolls; the body's padding is taken up by the top so nothing shows above it */
|
package/explorer/forge-panel.js
CHANGED
|
@@ -78,7 +78,7 @@ import { WORK_URL, groupWork, filterGroups, groupWords, workStatus, markWords }
|
|
|
78
78
|
import {
|
|
79
79
|
RUNS_URL, runsUrl, stopUrl, runOnThread, threadRunWords, runOnPull, pullRunWords, canRetry, retryRefs, retryWords, limitsFromFields, defaultLimits, LIMIT_KEYS, briefUrl, answerUrl, answerBody, answerWordsFor, KINDS, aboutWords, statusWords, statusWhy, runMeta, canStop, runsStatus, runnerState, runnerWords, triggerNotice, totalsLines, handLines, startBody, startWords, stopWords, confirmStartWords, litOfRun, changeWords,
|
|
80
80
|
} from './runs-model.js';
|
|
81
|
-
import { runsHtml, totalsHtml, loadingRowsHtml, runPillHtml } from './runs-view.js';
|
|
81
|
+
import { runsHtml, totalsHtml, loadingRowsHtml, loadingLinesHtml, runPillHtml } from './runs-view.js';
|
|
82
82
|
import { setRunsOnMap, clearRunsOnMap } from './runs-map.js';
|
|
83
83
|
import {
|
|
84
84
|
STATES, defaultFilters, listUrl, pullUrl, serverState, filterItems, facetsOf, stateWords, metaWords, checkWords, checksWords, litFor, errorWords,
|
|
@@ -1231,7 +1231,7 @@ function paintCounts() {
|
|
|
1231
1231
|
const n = counts[btn.dataset.forgeKind];
|
|
1232
1232
|
const el = btn.querySelector('.hx-forge-count');
|
|
1233
1233
|
if (!el) continue;
|
|
1234
|
-
el.hidden = !
|
|
1234
|
+
el.hidden = !(btn.dataset.forgeKind in counts); // a tab with no count at all (Deploys) shows none; the others hold their width while empty
|
|
1235
1235
|
el.textContent = n ? String(n) : '';
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
@@ -1312,7 +1312,9 @@ function draw(panel) {
|
|
|
1312
1312
|
const empty = (words) => `<li class="hx-forge-empty hx-faint" data-corn="empty">${escHtml(words)}</li>`;
|
|
1313
1313
|
rows.setAttribute('aria-busy', String(!!ui.loading && !list));
|
|
1314
1314
|
// A list that is being read holds its height with rows of the right size, so nothing jumps when the data comes
|
|
1315
|
-
|
|
1315
|
+
// (On Runs the list sits under the runs, whose height is not known yet: rows held there would jump when the runs arrive, so they wait. They
|
|
1316
|
+
// are drawn with the work's answer all the same, which loadWork paints only once the runs are read too, failed or not.)
|
|
1317
|
+
if (!list) rows.innerHTML = ui.loading && !(work && !(ui.runs && ui.runs.data)) ? loadingRowsHtml(4) : '';
|
|
1316
1318
|
else if (specs) {
|
|
1317
1319
|
const open = state.proposal ? { slug: state.proposalSlug, source: state.proposalSource } : null;
|
|
1318
1320
|
rows.innerHTML = list.items.length ? list.items.map((e) => specRowHtml(e, { current: open })).join('') : empty(emptyWords('specs', forgeName()));
|
|
@@ -1349,6 +1351,8 @@ function paintRuns() {
|
|
|
1349
1351
|
if (!failed && ui.runNote && ui.runNote.ok) note.dataset.cornState = 'success'; else delete note.dataset.cornState;
|
|
1350
1352
|
setNotice(note, words, !!failed);
|
|
1351
1353
|
paintRunner('forge-runs-runner', data);
|
|
1354
|
+
const waiting = !data && !failed && !!ui.loading; // the runner line and the totals hold their place while the runs load (not beside a failure)
|
|
1355
|
+
if (waiting) { const r = $('forge-runs-runner'); r.hidden = false; r.innerHTML = loadingLinesHtml(1); }
|
|
1352
1356
|
const trig = $('forge-runs-trigger');
|
|
1353
1357
|
if (trig) {
|
|
1354
1358
|
const skipped = data ? triggerNotice(data) : '';
|
|
@@ -1358,8 +1362,8 @@ function paintRuns() {
|
|
|
1358
1362
|
const totals = $('forge-runs-totals');
|
|
1359
1363
|
if (totals) {
|
|
1360
1364
|
const lines = data ? totalsLines(data.totals) : [];
|
|
1361
|
-
totals.hidden = !lines.length;
|
|
1362
|
-
totals.innerHTML = totalsHtml(viewContext(), lines);
|
|
1365
|
+
totals.hidden = !lines.length && !waiting;
|
|
1366
|
+
totals.innerHTML = waiting ? loadingLinesHtml(3) : totalsHtml(viewContext(), lines);
|
|
1363
1367
|
}
|
|
1364
1368
|
const hand = $('forge-runs-hand');
|
|
1365
1369
|
if (hand) {
|
package/explorer/index.html
CHANGED
|
@@ -245,11 +245,11 @@
|
|
|
245
245
|
<button type="button" class="hx-close" data-action="close-forge" aria-label="Close" data-corn-kind="icon">✕</button>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hx-forge-tabs" role="group" aria-label="Show" data-corn="tabs">
|
|
248
|
-
<button type="button" class="hx-forge-tab" data-forge-kind="specs" aria-pressed="true" title="The proposals: what a change would add, change and remove" data-corn="tab"><span data-corn-string="tabSpecs">Specs</span><span class="hx-forge-count" data-corn="count"
|
|
249
|
-
<button type="button" class="hx-forge-tab" data-forge-kind="pulls" aria-pressed="false" title="Pull requests" data-corn="tab"><span data-corn-string="tabPulls">PRs</span><span class="hx-forge-count" data-corn="count"
|
|
250
|
-
<button type="button" class="hx-forge-tab" data-forge-kind="issues" aria-pressed="false" data-corn="tab"><span data-corn-string="tabIssues">Issues</span><span class="hx-forge-count" data-corn="count"
|
|
251
|
-
<button type="button" class="hx-forge-tab" data-forge-kind="threads" aria-pressed="false" title="Ideas and spec conversations, with the nodes they mention" data-corn="tab"><span data-corn-string="tabThreads">Threads</span><span class="hx-forge-count" data-corn="count"
|
|
252
|
-
<button type="button" class="hx-forge-tab" data-forge-kind="work" aria-pressed="false" title="Agent runs, and the work grouped by issue and proposal with agent-made work marked" data-corn="tab"><span data-corn-string="tabRuns">Runs</span><span class="hx-forge-count" data-corn="count"
|
|
248
|
+
<button type="button" class="hx-forge-tab" data-forge-kind="specs" aria-pressed="true" title="The proposals: what a change would add, change and remove" data-corn="tab"><span data-corn-string="tabSpecs">Specs</span><span class="hx-forge-count" data-corn="count"></span></button>
|
|
249
|
+
<button type="button" class="hx-forge-tab" data-forge-kind="pulls" aria-pressed="false" title="Pull requests" data-corn="tab"><span data-corn-string="tabPulls">PRs</span><span class="hx-forge-count" data-corn="count"></span></button>
|
|
250
|
+
<button type="button" class="hx-forge-tab" data-forge-kind="issues" aria-pressed="false" data-corn="tab"><span data-corn-string="tabIssues">Issues</span><span class="hx-forge-count" data-corn="count"></span></button>
|
|
251
|
+
<button type="button" class="hx-forge-tab" data-forge-kind="threads" aria-pressed="false" title="Ideas and spec conversations, with the nodes they mention" data-corn="tab"><span data-corn-string="tabThreads">Threads</span><span class="hx-forge-count" data-corn="count"></span></button>
|
|
252
|
+
<button type="button" class="hx-forge-tab" data-forge-kind="work" aria-pressed="false" title="Agent runs, and the work grouped by issue and proposal with agent-made work marked" data-corn="tab"><span data-corn-string="tabRuns">Runs</span><span class="hx-forge-count" data-corn="count"></span></button>
|
|
253
253
|
<button type="button" class="hx-forge-tab" data-forge-kind="deploys" aria-pressed="false" data-corn="tab"><span data-corn-string="tabDeploys">Deploys</span><span class="hx-forge-count" data-corn="count" hidden></span></button>
|
|
254
254
|
</div>
|
|
255
255
|
</div>
|
package/explorer/runs-view.js
CHANGED
|
@@ -129,6 +129,14 @@ export function loadingRowsHtml(n = 3) {
|
|
|
129
129
|
return Array.from({ length: n }, () => '<li class="hx-forge-skeleton" data-corn="skeleton" aria-hidden="true"><span></span><span></span></li>').join('');
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Placeholder lines for the runner line and the totals above the runs while they load (issue #192): each is one `hx-forge-meta` line high, as the
|
|
134
|
+
* line it stands for, so the list under them does not move when the data arrives.
|
|
135
|
+
*/
|
|
136
|
+
export function loadingLinesHtml(n = 1) {
|
|
137
|
+
return Array.from({ length: n }, () => '<p class="hx-forge-meta hx-forge-skeleton-line" data-corn="skeleton" aria-hidden="true"><span></span></p>').join('');
|
|
138
|
+
}
|
|
139
|
+
|
|
132
140
|
/** One run */
|
|
133
141
|
export function runHtml(ctx, run, all) {
|
|
134
142
|
const lit = ctx.selected === run.runId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcorn245/cornfield",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"description": "A self-hostable dev dashboard with the topology map at its centre: proposals on the map, scenarios, outages and what-if edits, for any repo.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "popcorn245 (https://github.com/popcorn245)",
|