cornfield 0.38.0 → 0.39.0
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/cli/cornfield.js +4 -1
- package/core/proposal.js +22 -0
- package/core/strings.js +14 -0
- package/explorer/check.js +14 -10
- package/explorer/explorer.css +158 -30
- package/explorer/index.html +18 -9
- package/explorer/main.js +2 -0
- package/explorer/proposal.js +20 -86
- package/explorer/review-column.js +430 -0
- package/explorer/review.js +7 -7
- package/explorer/scenario-list-model.js +301 -0
- package/explorer/scenario-ui.js +139 -136
- package/explorer/sheets.js +5 -2
- package/package.json +1 -1
package/cli/cornfield.js
CHANGED
|
@@ -26,7 +26,7 @@ import { loadConfig, loadDerivers } from '../core/config.js';
|
|
|
26
26
|
import { deriveTopology } from '../core/derive.js';
|
|
27
27
|
import { planSync, placeholderCounts } from '../core/sync.js';
|
|
28
28
|
import { validateRepo, readTopology } from '../core/validate.js';
|
|
29
|
-
import { proposalProblems, proposalStatus, summarize } from '../core/proposal.js';
|
|
29
|
+
import { proposalProblems, proposalStatus, summarize, personaWarnings } from '../core/proposal.js';
|
|
30
30
|
|
|
31
31
|
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
32
32
|
const PKG = JSON.parse(fs.readFileSync(path.join(HERE, '..', 'package.json'), 'utf8'));
|
|
@@ -181,6 +181,9 @@ async function proposal(flags, file) {
|
|
|
181
181
|
const { items, summary } = proposalStatus(topology, p);
|
|
182
182
|
console.log(`\n Against ${config.topology}: ${summary.landed} landed · ${summary.pending} pending · ${summary.diverged} diverged${summary.live ? ` · ${summary.live} live` : ''}${building ? ' (the build has begun)' : ''}`);
|
|
183
183
|
for (const i of items) console.log(` ${i.status.padEnd(8)} ${i.op.padEnd(6)} ${i.kind.padEnd(4)} ${i.key}`);
|
|
184
|
+
const warnings = personaWarnings(topology, p);
|
|
185
|
+
if (warnings.length) console.log('');
|
|
186
|
+
for (const w of warnings) console.log(w);
|
|
184
187
|
console.log('\nThe proposal is valid.\n');
|
|
185
188
|
return 0;
|
|
186
189
|
}
|
package/core/proposal.js
CHANGED
|
@@ -735,6 +735,28 @@ export function summarize(proposal) {
|
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
737
|
|
|
738
|
+
/**
|
|
739
|
+
* What a reviewer is not told by the checks: scenarios that name no persona (spec 0006 D3). A scenario names
|
|
740
|
+
* one when it, or any of its steps, has an `actor`. Warnings only: the proposal is still valid, and an outage
|
|
741
|
+
* or a pipeline scenario honestly has no actor. `topology` is the map the proposal is checked against.
|
|
742
|
+
* @param {{ nodes?: { id: string, type?: string }[] } | null} topology
|
|
743
|
+
* @param {object} proposal
|
|
744
|
+
* @returns {string[]} one line each, ready to print
|
|
745
|
+
*/
|
|
746
|
+
export function personaWarnings(topology, proposal) {
|
|
747
|
+
const scenarios = asList(proposal?.scenarios);
|
|
748
|
+
const isPersona = (n) => n && n.type === 'persona';
|
|
749
|
+
const hasPersonas = asList(topology?.nodes).some(isPersona) || asList(proposal?.nodes?.add).some(isPersona);
|
|
750
|
+
if (scenarios.length === 0) return [];
|
|
751
|
+
if (!hasPersonas) return ['Warning: the map has no personas (topology.personas.json); every scenario is listed under Anyone.'];
|
|
752
|
+
const out = [];
|
|
753
|
+
scenarios.forEach((s, i) => {
|
|
754
|
+
if (s?.actor || asList(s?.steps).some((st) => st?.actor)) return;
|
|
755
|
+
out.push(`Warning: scenarios[${i}] "${s?.id ?? ''}" names no persona; it is listed under Anyone.`);
|
|
756
|
+
});
|
|
757
|
+
return out;
|
|
758
|
+
}
|
|
759
|
+
|
|
738
760
|
/**
|
|
739
761
|
* What-if edits, as the viewer and the what-if agent write them. Every edit is `{ op, …fields }`; an
|
|
740
762
|
* `at` (a timestamp) may ride along and is ignored here. Indexes are 0-based positions in the
|
package/core/strings.js
CHANGED
|
@@ -33,6 +33,20 @@ export const STRINGS = Object.freeze({
|
|
|
33
33
|
reviewNoteLabel: 'Note for the drafting agent',
|
|
34
34
|
reviewNotePlaceholder: 'What should change?',
|
|
35
35
|
openSpecsList: 'Open the Specs list',
|
|
36
|
+
// The review column and the scenario player
|
|
37
|
+
changes: 'Changes',
|
|
38
|
+
personasAndScenarios: 'Personas and scenarios',
|
|
39
|
+
scenarios: 'Scenarios',
|
|
40
|
+
anyone: 'Anyone',
|
|
41
|
+
notInAnyScenario: 'Not in any scenario',
|
|
42
|
+
steps: 'Steps',
|
|
43
|
+
previousStep: 'Previous',
|
|
44
|
+
nextStep: 'Next',
|
|
45
|
+
pause: 'Pause',
|
|
46
|
+
play: 'Play',
|
|
47
|
+
playAgain: 'Play again',
|
|
48
|
+
nextScenario: 'Next scenario',
|
|
49
|
+
notChecked: 'Not checked',
|
|
36
50
|
// The Work panel: its tabs run in the order of the loop
|
|
37
51
|
tabSpecs: 'Specs',
|
|
38
52
|
tabPulls: 'PRs',
|
package/explorer/check.js
CHANGED
|
@@ -33,7 +33,9 @@ let version = 0;
|
|
|
33
33
|
|
|
34
34
|
/** Hands the tool its checker (main.js, from the plugin); none means every checked step reads "Not checked" */
|
|
35
35
|
export function initChecks(opts = {}) {
|
|
36
|
-
|
|
36
|
+
const next = opts.checker || null;
|
|
37
|
+
if (next !== checker) closeChecks(); // answers asked of another checker are not this one's
|
|
38
|
+
checker = next;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/** Changes whenever a verdict may have: scenario-ui.js puts it in the player's signature, so an answer redraws the step */
|
|
@@ -47,12 +49,17 @@ const namesActor = (scenario) => !!scenario && (!!scenario.actor || (Array.isArr
|
|
|
47
49
|
* @param {() => void} onChange called when an answer arrives or the As menu moved (scenario-ui.js syncs and redraws)
|
|
48
50
|
*/
|
|
49
51
|
export function openChecks(scenario, onChange = () => {}) {
|
|
52
|
+
// the scenario that is already being checked (opened in the list, now played): its answers stay, only who is told changes
|
|
53
|
+
if (current && current.scenario && scenario && current.scenario.id === scenario.id) { current.onChange = onChange; replan(scenario); return; }
|
|
50
54
|
closeChecks();
|
|
51
55
|
current = { scenario: null, as: null, nodes: null, plan: null, answer: { status: 'idle' }, controller: null, onChange };
|
|
52
56
|
if (namesActor(scenario) && state.activeLayers.persona !== true) toggleLayer('persona');
|
|
53
57
|
replan(scenario);
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
/** The id of the scenario being checked (a player's or the list's), or null */
|
|
61
|
+
export const checkedScenarioId = () => (current && current.scenario ? current.scenario.id : null);
|
|
62
|
+
|
|
56
63
|
/** The scenario closed: nothing more is asked or shown */
|
|
57
64
|
export function closeChecks() {
|
|
58
65
|
if (current && current.controller) current.controller.abort();
|
|
@@ -125,21 +132,18 @@ export function scenarioVerdicts() {
|
|
|
125
132
|
|
|
126
133
|
/** The pill in the head, the line under the text, and the As row under the controls: only on the bar of a scenario that names an actor, so any other bar is as it was */
|
|
127
134
|
function mountControls(bar) {
|
|
128
|
-
|
|
129
|
-
const title = bar.querySelector('.hx-player-title');
|
|
135
|
+
// the pill ends the step's line; the reason is a line of its own under the bar's row, with the As row (the player is one bar: spec 0006 D6)
|
|
130
136
|
const pill = document.createElement('span');
|
|
131
137
|
pill.className = 'hx-player-verdict';
|
|
132
138
|
pill.dataset.corn = 'state-pill';
|
|
133
139
|
pill.hidden = true;
|
|
134
|
-
|
|
140
|
+
const text = bar.querySelector('.hx-player-text');
|
|
141
|
+
if (text) text.append(' ', pill); else bar.prepend(pill);
|
|
135
142
|
|
|
136
143
|
const line = document.createElement('p');
|
|
137
144
|
line.className = 'hx-player-check';
|
|
138
145
|
line.dataset.corn = 'scenario-check';
|
|
139
|
-
line.setAttribute('aria-live', 'polite');
|
|
140
146
|
line.hidden = true;
|
|
141
|
-
const text = bar.querySelector('.hx-player-text');
|
|
142
|
-
if (text) text.after(line); else bar.appendChild(line);
|
|
143
147
|
|
|
144
148
|
const row = document.createElement('div');
|
|
145
149
|
row.className = 'hx-player-as';
|
|
@@ -147,8 +151,8 @@ function mountControls(bar) {
|
|
|
147
151
|
<label class="hx-player-as-label">As <select data-corn="control" class="hx-player-speed hx-player-as-menu" data-check="as" aria-label="Act every step as"></select></label>
|
|
148
152
|
<button data-corn-kind="secondary" type="button" class="hx-btn" data-check="recheck">Check again</button>
|
|
149
153
|
<span class="hx-player-as-sum hx-faint"></span>`;
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
154
|
+
const track = bar.querySelector('.hx-player-track');
|
|
155
|
+
if (track) { track.before(line); track.before(row); } else { bar.appendChild(line); bar.appendChild(row); }
|
|
152
156
|
|
|
153
157
|
row.querySelector('[data-check=as]').addEventListener('change', (e) => chooseActor(e.target.value));
|
|
154
158
|
row.querySelector('[data-check=recheck]').addEventListener('click', recheck);
|
|
@@ -209,7 +213,7 @@ export function paintChecks(bar, snap) {
|
|
|
209
213
|
const line = bar.querySelector('.hx-player-check');
|
|
210
214
|
const row = bar.querySelector('.hx-player-as');
|
|
211
215
|
if (!pill || !line || !row) return;
|
|
212
|
-
const words = verdictWords(snap.verdict);
|
|
216
|
+
const words = snap.done ? null : verdictWords(snap.verdict); // at the end there is no step to say a verdict of
|
|
213
217
|
pill.hidden = !words;
|
|
214
218
|
line.hidden = !words;
|
|
215
219
|
if (words) {
|
package/explorer/explorer.css
CHANGED
|
@@ -404,7 +404,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
404
404
|
.hx-proposal-bar.is-error { border-color: color-mix(in srgb, var(--corn-removed) 50%, transparent); }
|
|
405
405
|
.hx-proposal-message { color: var(--corn-text-2); }
|
|
406
406
|
.hx-proposal-bar.is-error .hx-proposal-message { color: var(--corn-bad); }
|
|
407
|
-
.hx-proposal-
|
|
407
|
+
.hx-proposal-count:focus-visible, .hx-proposal-mode:focus-visible, .hx-seg-btn:focus-visible, .hx-change-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
408
408
|
.hx-proposal-summary { margin-top: var(--corn-space-2); color: var(--corn-text-2); line-height: 1.45; }
|
|
409
409
|
|
|
410
410
|
/* Before / Diff / After */
|
|
@@ -418,10 +418,10 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
418
418
|
.hx-proposal-errors ul { margin: var(--corn-space-2) 0 var(--corn-space-1); padding-left: var(--corn-space-5); line-height: 1.5; }
|
|
419
419
|
.hx-proposal-errors p { margin-top: var(--corn-space-1); font-size: var(--corn-text-xs); }
|
|
420
420
|
|
|
421
|
-
.hx-proposal-changes { display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); max-height: 40dvh; margin-top: var(--corn-space-2); overflow-y: auto; }
|
|
422
421
|
.hx-change-row { display: flex; align-items: center; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-1) var(--corn-space-2); border: 0; border-radius: var(--corn-radius-sm); background: none; text-align: left; font-size: var(--corn-text-xs); }
|
|
423
422
|
.hx-change-row:hover { background: var(--corn-line-soft); }
|
|
424
423
|
.hx-change-what { width: 56px; flex: none; color: var(--corn-text-3); }
|
|
424
|
+
.hx-change-row .hx-name { min-width: 0; overflow-wrap: anywhere; } /* a long label wraps in its row: the list never scrolls sideways */
|
|
425
425
|
|
|
426
426
|
/* The marks' colours, shared with the picture: the diff tokens, whose light values are theme-model.js `lightColor` of the dark ones */
|
|
427
427
|
.hx-mark-dot { display: inline-block; width: 12px; height: 12px; flex: none; margin-right: var(--corn-space-2); border-radius: 50%; border: var(--corn-border-strong) solid var(--corn-changed); vertical-align: -2px; }
|
|
@@ -453,27 +453,34 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
/* ---- scenario player (scenario-ui.js): the bar while a scenario plays, and the scenario list --------- */
|
|
456
|
-
.hx-player { position: absolute; left:
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
456
|
+
.hx-player { position: absolute; left: calc(var(--hx-col-w, 0px) + 24px); right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2) var(--corn-space-4); padding: var(--corn-space-3) var(--corn-space-4); border-radius: var(--corn-radius-lg); z-index: 25; overflow: hidden; }
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
460
|
.hx-player .hx-close { width: 28px; height: 28px; font-size: var(--corn-text-sm); }
|
|
461
|
-
|
|
461
|
+
|
|
462
462
|
.hx-player-speed { flex: none; height: 28px; padding: 0 var(--corn-space-2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); cursor: pointer; }
|
|
463
463
|
.hx-player-speed:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
464
|
-
.hx-player-text { margin: 0; min-
|
|
464
|
+
.hx-player-text { margin: 0; flex: 1 1 18em; min-width: 0; font-size: var(--corn-text-base); line-height: 1.4; color: var(--corn-text); user-select: text; overflow-wrap: anywhere; }
|
|
465
|
+
.hx-player-who { color: var(--corn-text-2); font-weight: 600; }
|
|
466
|
+
.hx-player-text .hx-player-verdict { margin-left: var(--corn-space-2); }
|
|
465
467
|
.hx-player-count { color: var(--corn-accent-text); font-weight: 600; white-space: nowrap; }
|
|
466
|
-
.hx-player-controls { display: flex; gap: var(--corn-space-3); }
|
|
467
|
-
.hx-player-
|
|
468
|
+
.hx-player-controls { display: flex; flex: none; gap: var(--corn-space-3); }
|
|
469
|
+
.hx-player-side { display: flex; flex: none; align-items: center; gap: var(--corn-space-3); margin-left: auto; }
|
|
470
|
+
.hx-player-controls .hx-btn { justify-content: center; white-space: nowrap; }
|
|
471
|
+
.hx-player-controls .hx-btn[hidden] { display: none; }
|
|
472
|
+
/* The glyphs are drawn, not said: the names are the words (an empty alternative after the slash keeps a screen reader from reading them) */
|
|
473
|
+
.hx-player-prev::before { content: "◀" / ""; margin-right: var(--corn-space-2); }
|
|
474
|
+
.hx-player-next::after { content: "▶" / ""; margin-left: var(--corn-space-2); }
|
|
475
|
+
/* the pause mark is drawn (two bars), not a character: not every font has one */
|
|
476
|
+
.hx-player-toggle[data-state="playing"]::before { content: "" / ""; display: inline-block; box-sizing: border-box; width: 1em; height: 1em; margin-right: var(--corn-space-2); border-left: calc(var(--corn-border-strong) * 1.5) solid currentColor; border-right: calc(var(--corn-border-strong) * 1.5) solid currentColor; }
|
|
477
|
+
.hx-player-toggle[data-state="paused"]::before { content: "▶" / ""; margin-right: var(--corn-space-2); }
|
|
478
|
+
.hx-player-toggle[data-state="done"]::before { content: "↻" / ""; margin-right: var(--corn-space-2); }
|
|
468
479
|
.hx-player-controls .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
469
480
|
.hx-player-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--corn-line-soft); }
|
|
470
481
|
.hx-player-fill { display: block; height: 100%; width: 0; background: var(--corn-accent-text); }
|
|
471
482
|
|
|
472
|
-
.hx-scenarios { position: absolute; top: 12px; left: 12px; max-width: min(320px, calc(100% - 24px)); padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius); font-size: var(--corn-text-sm); color: var(--corn-text-2); z-index: 12; }
|
|
473
|
-
.hx-scenarios-item { display: block; width: 100%; margin-top: var(--corn-space-2); padding: var(--corn-space-2) var(--corn-space-3); border: var(--corn-border) solid var(--corn-line-soft); border-radius: var(--corn-radius-sm); background: transparent; color: var(--corn-text); font-size: var(--corn-text-sm); text-align: left; cursor: pointer; }
|
|
474
|
-
.hx-scenarios-item:hover { background: color-mix(in srgb, var(--corn-accent-hover) 25%, transparent); }
|
|
475
483
|
/* With a proposal open the list is a row of its bar (scenario-ui.js mounts it there), so it opens in the bar's flow and the bar grows to hold it */
|
|
476
|
-
.hx-proposal-bar .hx-scenarios { position: static; max-width: none; max-height: 40dvh; margin-top: var(--corn-space-2); padding: var(--corn-space-2) var(--corn-space-3); overflow-y: auto; border-radius: var(--corn-radius-sm); border-color: var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
|
|
477
484
|
|
|
478
485
|
/* ---- what-if editing (whatif.js): the controls under the proposal bar, the drag that draws an edge ---- */
|
|
479
486
|
.hx-whatif { margin-top: var(--corn-space-3); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid color-mix(in srgb, var(--corn-edit) 30%, transparent); }
|
|
@@ -539,14 +546,16 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
539
546
|
.hx-proposal-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-3) var(--corn-space-4); }
|
|
540
547
|
.hx-proposal-name { flex: 0 1 auto; min-width: 0; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--corn-text-base); font-weight: 650; color: var(--corn-text); }
|
|
541
548
|
.hx-proposal-counts { display: contents; }
|
|
542
|
-
.hx-proposal-chip { display: inline-flex; align-items: center;
|
|
543
|
-
.hx-proposal-
|
|
549
|
+
.hx-proposal-chip { display: inline-flex; align-items: center; flex-wrap: wrap; color: var(--corn-text-2); font-size: var(--corn-text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
550
|
+
.hx-proposal-count { display: inline-flex; align-items: center; padding: var(--corn-space-1) var(--corn-space-2); border: 0; border-radius: var(--corn-radius-sm); background: none; color: inherit; font: inherit; white-space: inherit; cursor: pointer; }
|
|
551
|
+
.hx-proposal-count:hover { color: var(--corn-text); text-decoration: underline; }
|
|
552
|
+
.hx-proposal-peek { display: none; margin: 0; }
|
|
544
553
|
.hx-proposal-chip .hx-mark-dot { margin: 0 var(--corn-space-2) 0 0; }
|
|
554
|
+
h2.hx-proposal-name { margin: 0; }
|
|
545
555
|
.hx-proposal-sep { margin: 0 var(--corn-space-2); color: var(--corn-text-3); }
|
|
546
556
|
.hx-proposal-mode { display: none; }
|
|
547
557
|
.hx-proposal-tools, .hx-proposal-actions { display: flex; align-items: center; gap: var(--corn-space-3); }
|
|
548
558
|
.hx-proposal-tools .hx-btn { height: 30px; font-size: var(--corn-text-sm); font-weight: 500; }
|
|
549
|
-
#proposal-play[aria-expanded="true"] { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
550
559
|
#proposal-edit.hx-btn--active { background: var(--corn-edit-text); border-color: var(--corn-edit); color: var(--corn-ground); }
|
|
551
560
|
.hx-proposal-actions { margin-left: auto; }
|
|
552
561
|
.hx-proposal-actions .hx-btn { height: 32px; justify-content: center; padding: 0 var(--corn-space-5); font-size: var(--corn-text-sm); font-weight: 500; }
|
|
@@ -564,7 +573,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
564
573
|
.hx-proposal-head { display: grid; grid-template-columns: 1fr auto; gap: var(--corn-space-2) var(--corn-space-3); }
|
|
565
574
|
.hx-proposal-name { grid-column: 1 / -1; order: 1; max-width: none; }
|
|
566
575
|
.hx-proposal-counts { display: flex; grid-column: 1 / -1; order: 2; align-items: center; flex-wrap: wrap; column-gap: var(--corn-space-2); }
|
|
567
|
-
.hx-proposal-
|
|
576
|
+
.hx-proposal-count, .hx-proposal-mode { min-height: 44px; }
|
|
568
577
|
.hx-proposal-mode { display: inline-flex; align-items: center; gap: var(--corn-space-2); padding: 0 var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); font-size: var(--corn-text-sm); font-weight: 600; }
|
|
569
578
|
/* A chevron drawn from an image and the text colour: a thick --corn-border-strong cannot turn it into a heart (the borders it used to be drawn with) */
|
|
570
579
|
.hx-proposal-mode::after { content: ""; width: 10px; height: 10px; background: currentColor; -webkit-mask: var(--hx-chevron) no-repeat center / contain; mask: var(--hx-chevron) no-repeat center / contain; }
|
|
@@ -580,7 +589,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
580
589
|
.hx-proposal-more .hx-btn--icon { order: 6; width: 44px; height: 44px; }
|
|
581
590
|
.hx-proposal-more-menu { position: static; grid-column: 1 / -1; order: 7; box-shadow: none; }
|
|
582
591
|
.hx-proposal-more-menu .hx-btn { height: auto; min-height: 44px; font-size: var(--corn-text-md); }
|
|
583
|
-
.hx-
|
|
592
|
+
.hx-review .hx-btn, .hx-whatif .hx-btn { min-height: 44px; }
|
|
584
593
|
}
|
|
585
594
|
|
|
586
595
|
/* A proposal's mockups (mockups.js): the buttons in a node's panel and the window one opens in. A mockup is untrusted content, shown in an <img> or a sandboxed <iframe>. */
|
|
@@ -631,13 +640,18 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
631
640
|
.hx-proposal-bar[data-sheet-state="peek"] #proposal-body > :not(.hx-proposal-head),
|
|
632
641
|
.hx-proposal-bar[data-sheet-state="peek"] .hx-proposal-head > :is(.hx-proposal-tools, .hx-proposal-more, .hx-proposal-more-menu) { display: none; }
|
|
633
642
|
.hx-proposal-bar[data-sheet-state="peek"] .hx-review > :not([data-review-hint]):not([data-review-msg]) { display: none; } /* the peek keeps the reason Approve is off, and a refusal */
|
|
634
|
-
.hx-proposal-bar[data-sheet-state="expanded"] .hx-
|
|
643
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-whatif-panel { max-height: none; overflow: visible; }
|
|
635
644
|
|
|
636
|
-
/* The scenario player:
|
|
637
|
-
.hx-player { max-height: 50dvh; overflow: hidden; gap: var(--corn-space-
|
|
645
|
+
/* The scenario player: one row (Previous, Pause, Next, the counter and Close) in the peek; the text, the speed and the checks when it is open */
|
|
646
|
+
.hx-player { position: relative; left: auto; right: auto; bottom: auto; flex-wrap: wrap; max-height: 50dvh; overflow: hidden; gap: 0 var(--corn-space-3); padding: 0 var(--corn-space-4) var(--corn-space-3); --sheet-pb: var(--corn-space-3); }
|
|
647
|
+
.hx-player > .hx-sheet-handle { flex: 0 0 100%; }
|
|
638
648
|
.hx-player[data-sheet-state="expanded"] { overflow-y: auto; }
|
|
639
|
-
.hx-player[data-sheet-state="peek"] > :not(.hx-sheet-handle):not(.hx-player-
|
|
640
|
-
.hx-player[data-sheet-state="peek"] .hx-player-text {
|
|
649
|
+
.hx-player[data-sheet-state="peek"] > :not(.hx-sheet-handle):not(.hx-player-controls):not(.hx-player-text):not(.hx-player-side):not(.hx-player-track):not(.hx-player-says) { display: none; } /* Previous, Pause and Next stay in the peek, with the counter and Close */
|
|
650
|
+
.hx-player[data-sheet-state="peek"] .hx-player-text { flex: 1 1 0; display: flex; align-items: center; gap: var(--corn-space-2); min-height: 44px; overflow: hidden; font-size: var(--corn-text-md); white-space: nowrap; }
|
|
651
|
+
.hx-player[data-sheet-state="peek"] .hx-player-step, .hx-player[data-sheet-state="peek"] .hx-player-who, .hx-player[data-sheet-state="peek"] .hx-player-sep { display: none; }
|
|
652
|
+
.hx-player[data-sheet-state="peek"] .hx-player-side .hx-player-speed { display: none; }
|
|
653
|
+
.hx-player[data-sheet-state="expanded"] .hx-player-text { flex: 1 0 100%; order: 3; }
|
|
654
|
+
.hx-player[data-sheet-state="expanded"] .hx-player-title { position: static; width: auto; height: auto; clip: auto; clip-path: none; overflow: visible; order: 0; flex: 0 0 100%; font-size: var(--corn-text-sm); font-weight: 600; color: var(--corn-text-2); }
|
|
641
655
|
|
|
642
656
|
/* The node panel: its title and type until expanded */
|
|
643
657
|
.hx-drawer { max-height: 60dvh; }
|
|
@@ -1022,7 +1036,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
1022
1036
|
.hx-header-left[data-brand-short] .hx-title { display: none; }
|
|
1023
1037
|
.hx-header-left[data-overflow] { -webkit-mask: linear-gradient(to right, var(--corn-text) calc(100% - var(--corn-space-6)), transparent); mask: linear-gradient(to right, var(--corn-text) calc(100% - var(--corn-space-6)), transparent); }
|
|
1024
1038
|
/* A scroll container never cuts a focus ring: a row that is tabbed to stops short of the edge by the ring's width and offset */
|
|
1025
|
-
.hx-forge-body, .hx-drawer-body, .hx-
|
|
1039
|
+
.hx-forge-body, .hx-drawer-body, .hx-rc-scroll, .hx-proposal-bar, .hx-confirm, .hx-whatif-edges .hx-whatif-list { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
|
|
1026
1040
|
/* The Work tabs scroll sideways: a tab brought into view stops short of the edge by the strip's own padding */
|
|
1027
1041
|
.hx-forge-tabs { scroll-padding-inline: var(--corn-space-4); }
|
|
1028
1042
|
/* Numbers shown as data take the number face (a brand sets --corn-font-num; digits in a pixel face misread) */
|
|
@@ -1052,15 +1066,19 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1052
1066
|
|
|
1053
1067
|
@media (max-width: 767px) {
|
|
1054
1068
|
.hx-proposal-source { grid-column: 1 / -1; order: 1; justify-self: start; }
|
|
1055
|
-
.hx-player-controls .hx-btn { min-height: 44px; padding: 0 var(--corn-space-
|
|
1069
|
+
.hx-player-controls .hx-btn { min-height: 44px; min-width: 44px; padding: 0 var(--corn-space-3); white-space: nowrap; }
|
|
1070
|
+
/* On a phone the controls are glyphs, the names are said: ◀ ⏸ ▶ in a 44px row */
|
|
1071
|
+
.hx-player-prev .hx-player-label, .hx-player-next .hx-player-label, .hx-player-toggle .hx-player-label { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
1072
|
+
.hx-player-prev::before, .hx-player-next::after, .hx-player-toggle::before { margin: 0; }
|
|
1073
|
+
.hx-player-next-scenario { font-size: var(--corn-text-sm); }
|
|
1056
1074
|
.hx-proposal-ways .hx-btn, a.hx-proposal-source { min-height: 44px; } /* targets a thumb can hit */
|
|
1057
1075
|
.hx-proposal-source { padding: 0; border: 0; border-radius: 0; background: none; } /* a line of the sheet, not a pill 44px tall */
|
|
1058
1076
|
a.hx-proposal-source { text-decoration: underline; text-underline-offset: 3px; }
|
|
1059
1077
|
.hx-player-controls { gap: var(--corn-space-2); }
|
|
1060
1078
|
/* While a scenario plays the proposal sheet folds to its title and counts: the player needs the room */
|
|
1061
|
-
.hx-dock:has(> .hx-player) .hx-proposal-bar[data-sheet-state="peek"] .hx-
|
|
1079
|
+
.hx-dock:has(> .hx-player) .hx-proposal-bar[data-sheet-state="peek"] .hx-rc-foot { display: none; }
|
|
1062
1080
|
/* The note open: the field, Cancel and the send button are all there is, so all of them stay above the keyboard */
|
|
1063
|
-
.hx-proposal-bar:has(.hx-review-form:not([hidden])) :is(.hx-proposal-name, .hx-proposal-source, .hx-proposal-counts, .hx-proposal-tools, .hx-proposal-more, .hx-review-status, .hx-review-line) { display: none; }
|
|
1081
|
+
.hx-proposal-bar:has(.hx-review-form:not([hidden])) :is(.hx-proposal-name, .hx-proposal-source, .hx-proposal-counts, .hx-proposal-tools, .hx-proposal-more, .hx-review-status, .hx-review-line, .hx-rc-scroll, .hx-rc-tabs, .hx-proposal-peek) { display: none; } /* the review column's lists too: the sheet holds the note and its buttons */
|
|
1064
1082
|
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-proposal-actions { order: 4; grid-template-columns: 1fr; }
|
|
1065
1083
|
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-proposal-actions .hx-btn--approve { display: none; }
|
|
1066
1084
|
/* Reflow: nothing is wider than the sheet, and long words and counts wrap instead of being cut */
|
|
@@ -1091,10 +1109,10 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1091
1109
|
.hx-change-row { min-height: 28px; }
|
|
1092
1110
|
.hx-run .hx-link { display: inline-flex; align-items: center; min-height: 24px; } /* a run card's links sit on lines 14px apart: 24px at a desk (WCAG 2.5.8) */
|
|
1093
1111
|
@media (max-width: 767px), (pointer: coarse) {
|
|
1094
|
-
.hx-change-row, .hx-toggle-row, .hx-textbtn, .hx-player-speed, .hx-player .hx-close,
|
|
1112
|
+
.hx-change-row, .hx-sc-row, .hx-step, .hx-rc-tab, .hx-toggle-row, .hx-textbtn, .hx-player-speed, .hx-player .hx-close,
|
|
1095
1113
|
.hx-confirm .hx-btn, .hx-confirm .hx-forge-input, .hx-confirm .hx-forge-select, .hx-mobile-search .hx-input { min-height: 44px; }
|
|
1096
1114
|
.hx-textbtn, .hx-player-speed, .hx-player .hx-close, .hx-confirm .hx-btn { min-width: 44px; }
|
|
1097
|
-
.hx-proposal-chip { flex-wrap: wrap; white-space: normal; text-align: left; } /* the counts say what they count, so they are longer: they wrap rather than clip */
|
|
1115
|
+
.hx-proposal-chip { flex-wrap: wrap; white-space: normal; text-align: left; } .hx-proposal-count { white-space: normal; text-align: left; } /* the counts say what they count, so they are longer: they wrap rather than clip */
|
|
1098
1116
|
.hx-sheet-handle { height: 44px; } /* the grip is drawn the same; the button itself is 44px (a hit area stretched past it is clipped by the sheet above, and covers its title below) */
|
|
1099
1117
|
.hx-run .hx-link, .hx-forge-check .hx-link { display: inline-flex; align-items: center; min-height: 44px; }
|
|
1100
1118
|
}
|
|
@@ -1156,6 +1174,116 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1156
1174
|
.hx-offline[hidden] { display: none; }
|
|
1157
1175
|
.hx-offline[data-corn-state="success"] { border-color: var(--corn-ok); }
|
|
1158
1176
|
|
|
1177
|
+
/* ==== the review column (spec 0006, review-column.js): the changes, and the personas with the scenarios that apply to them ==============
|
|
1178
|
+
From 768px it is docked on the left of the map under the proposal bar (the free map is what it leaves: sheets.js visibleMapRect);
|
|
1179
|
+
on a phone it is the expanded proposal sheet's body, a two-part switch at its top, its foot (the decision) always in view. */
|
|
1180
|
+
.hx-review-column { position: absolute; left: 12px; bottom: 12px; top: var(--hx-column-top, 150px); width: 400px; z-index: 14; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--corn-radius-lg); font-size: var(--corn-text-sm); user-select: text; }
|
|
1181
|
+
.hx-review-column[hidden] { display: none; }
|
|
1182
|
+
@media (max-width: 1023px) { .hx-review-column { width: 320px; } }
|
|
1183
|
+
/* The Work panel: from 1280px the column moves over to make room for it; narrower, the panel lies over the column while it is open (moving it would leave the map a sliver) */
|
|
1184
|
+
@media (min-width: 1280px) { .hx-stage:has(.forge-open) .hx-review-column { left: calc(var(--hx-forge-w) + 12px); } }
|
|
1185
|
+
/* The node panel (480px) and the 320px column do not both fit under 1024px: the column gives up its width, so the panel covers none of it */
|
|
1186
|
+
@media (min-width: 768px) and (max-width: 1023px) { .hx-stage:has(.drawer-open) .hx-review-column { width: min(320px, calc(100% - 504px)); } }
|
|
1187
|
+
.hx-rc-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-2); overflow: hidden; padding: var(--corn-space-3) var(--corn-space-4); }
|
|
1188
|
+
.hx-proposal-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin: 0; flex: none; }
|
|
1189
|
+
.hx-rc-lists { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-4); }
|
|
1190
|
+
/* Both lists are on screen at once: the changes take what they need up to 40%, the scenarios the rest, each scrolling on its own */
|
|
1191
|
+
.hx-rc-section { display: flex; flex-direction: column; min-height: 0; }
|
|
1192
|
+
/* review-column.js measures the scenarios and sets --hx-changes-max: 40% while the scenarios need the rest, more when they are few */
|
|
1193
|
+
#rc-changes { flex: 0 1 auto; max-height: var(--hx-changes-max, 40%); }
|
|
1194
|
+
#rc-scenarios { flex: 1 1 0; min-height: min(12em, var(--hx-scenarios-need, 12em)); }
|
|
1195
|
+
.hx-change-list, .hx-rc-sbody { min-height: 0; overflow-y: auto; scroll-padding-block: var(--corn-space-2); }
|
|
1196
|
+
.hx-rc-h { flex: none; }
|
|
1197
|
+
.hx-rc-tabs { display: flex; gap: var(--corn-space-2); }
|
|
1198
|
+
.hx-rc-tabs[hidden] { display: none; }
|
|
1199
|
+
.hx-rc-tab { flex: 1; min-height: 32px; padding: 0 var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-3); font: inherit; font-weight: 600; cursor: pointer; }
|
|
1200
|
+
.hx-rc-tab[aria-selected="true"] { background: var(--corn-accent); border-color: var(--corn-accent); color: var(--corn-text-on-accent); }
|
|
1201
|
+
.hx-rc-tab:focus-visible, .hx-sc-row:focus-visible, .hx-step:focus-visible, .hx-rc-h:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
1202
|
+
.hx-rc-section[hidden] { display: none; }
|
|
1203
|
+
.hx-rc-h { margin: 0 0 var(--corn-space-2); font-size: var(--corn-text-sm); font-weight: 650; color: var(--corn-text); }
|
|
1204
|
+
.hx-rc-h [data-corn="count"] { color: var(--corn-text-3); font-variant-numeric: tabular-nums; }
|
|
1205
|
+
.hx-rc-empty, .hx-rc-note, .hx-rc-coverage { margin: var(--corn-space-2) 0 0; line-height: 1.45; }
|
|
1206
|
+
.hx-rc-coverage { color: var(--corn-text-2); }
|
|
1207
|
+
.hx-change-list, .hx-sc-list, .hx-steps { margin: 0; padding: 0; list-style: none; }
|
|
1208
|
+
.hx-change-list { display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1209
|
+
.hx-persona { margin-top: var(--corn-space-4); }
|
|
1210
|
+
.hx-persona:first-of-type { margin-top: 0; }
|
|
1211
|
+
.hx-persona-name { margin: 0 0 var(--corn-space-1); font-size: var(--corn-text-xs); font-weight: 650; letter-spacing: 0.02em; color: var(--corn-text-3); overflow-wrap: anywhere; }
|
|
1212
|
+
.hx-sc-list { display: flex; flex-direction: column; gap: var(--corn-space-1); }
|
|
1213
|
+
.hx-sc-row { display: flex; align-items: flex-start; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-2) var(--corn-space-2); border: var(--corn-border) solid var(--corn-line-soft); border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font: inherit; text-align: left; cursor: pointer; }
|
|
1214
|
+
.hx-sc-row:hover { background: color-mix(in srgb, var(--corn-accent-hover) 18%, transparent); }
|
|
1215
|
+
.hx-sc-caret { flex: none; width: 1em; color: var(--corn-text-3); }
|
|
1216
|
+
.hx-sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1217
|
+
.hx-sc-title { font-weight: 600; overflow-wrap: anywhere; }
|
|
1218
|
+
.hx-sc-meta { font-size: var(--corn-text-xs); color: var(--corn-text-3); }
|
|
1219
|
+
.hx-sc-seen { flex: none; font-size: var(--corn-text-xs); color: var(--corn-added-text); white-space: nowrap; }
|
|
1220
|
+
.hx-steps { margin: var(--corn-space-1) 0 var(--corn-space-2) var(--corn-space-4); display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1221
|
+
.hx-steps[hidden] { display: none; }
|
|
1222
|
+
.hx-step { display: flex; align-items: flex-start; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-2) var(--corn-space-2); border: 0; border-left: var(--corn-border-strong) solid transparent; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font: inherit; font-size: var(--corn-text-xs); text-align: left; cursor: pointer; }
|
|
1223
|
+
.hx-step:hover { background: var(--corn-line-soft); }
|
|
1224
|
+
.hx-step[aria-current="step"] { border-left-color: var(--corn-accent-text); background: color-mix(in srgb, var(--corn-accent-hover) 22%, transparent); }
|
|
1225
|
+
.hx-step-n { flex: none; min-width: 1.4em; color: var(--corn-accent-text); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
1226
|
+
.hx-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1227
|
+
.hx-step-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--corn-space-3); }
|
|
1228
|
+
.hx-step-who { color: var(--corn-text-2); font-weight: 600; }
|
|
1229
|
+
.hx-step-where { font-weight: 600; overflow-wrap: anywhere; }
|
|
1230
|
+
.hx-step-mark { display: inline-flex; align-items: center; gap: var(--corn-space-1); color: var(--corn-text-3); }
|
|
1231
|
+
.hx-step-mark .hx-mark-dot { margin: 0; }
|
|
1232
|
+
.hx-step-text { color: var(--corn-text-2); line-height: 1.4; overflow-wrap: anywhere; }
|
|
1233
|
+
.hx-step-off { color: var(--corn-text-3); font-style: italic; }
|
|
1234
|
+
.hx-step-verdict { align-self: flex-start; white-space: normal; text-align: right; max-width: 40%; overflow-wrap: anywhere; }
|
|
1235
|
+
.hx-rc-foot { flex: none; display: flex; flex-direction: column; gap: var(--corn-space-2); padding: var(--corn-space-3) var(--corn-space-4); border-top: var(--corn-border) solid var(--corn-line); }
|
|
1236
|
+
.hx-rc-foot .hx-review { flex: none; order: 0; }
|
|
1237
|
+
.hx-rc-foot .hx-proposal-actions { margin-left: auto; }
|
|
1238
|
+
@media (max-width: 767px) {
|
|
1239
|
+
/* The expanded proposal sheet: the column is its body, with no box of its own */
|
|
1240
|
+
.hx-review-column { position: static; width: auto; max-height: none; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
|
|
1241
|
+
.hx-rc-scroll, .hx-rc-lists, .hx-rc-section, .hx-change-list, .hx-rc-sbody { display: block; overflow: visible; max-height: none; min-height: 0; }
|
|
1242
|
+
.hx-rc-scroll { padding: var(--corn-space-2) 0; }
|
|
1243
|
+
.hx-rc-section[hidden] { display: none; }
|
|
1244
|
+
/* the sheet scrolls, not a section: each section is as tall as its list (the desktop's 40% cap and 12em floor would let the rows run under the decision) */
|
|
1245
|
+
#rc-changes, #rc-scenarios { flex: none; max-height: none; min-height: 0; }
|
|
1246
|
+
.hx-rc-lists { display: flex; flex-direction: column; }
|
|
1247
|
+
.hx-change-list { display: flex; }
|
|
1248
|
+
.hx-rc-foot { padding: var(--corn-space-3) 0 0; } /* after both lists, in the sheet's own flow: nothing overlaps the rows above it */
|
|
1249
|
+
.hx-rc-foot .hx-proposal-actions { margin-left: 0; width: 100%; }
|
|
1250
|
+
.hx-step { min-height: 44px; }
|
|
1251
|
+
.hx-sc-row, .hx-rc-tab { min-height: 44px; }
|
|
1252
|
+
.hx-step-verdict { max-width: 45%; }
|
|
1253
|
+
/* The peek: the title, the one line of counts, and the decision; the lists wait for the sheet to open */
|
|
1254
|
+
.hx-proposal-bar[data-sheet-state="peek"] #proposal-body > .hx-review-column { display: flex; }
|
|
1255
|
+
.hx-proposal-bar[data-sheet-state="peek"] .hx-review-column > :not(.hx-rc-foot) { display: none; }
|
|
1256
|
+
.hx-proposal-bar[data-sheet-state="peek"] .hx-proposal-chip { display: none; }
|
|
1257
|
+
/* Opened, the sheet's switch carries the counts, so the head is one short row: Before / Diff / After, Edit and ⋯ */
|
|
1258
|
+
.hx-proposal-bar[data-sheet-state="expanded"] { max-height: 62dvh; }
|
|
1259
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-chip, .hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-summary { display: none; }
|
|
1260
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-counts { grid-column: 1; order: 3; }
|
|
1261
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-tools { grid-column: 2; order: 4; }
|
|
1262
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-head { grid-template-columns: minmax(0, 1fr) auto auto; }
|
|
1263
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-more .hx-btn--icon { grid-column: 3; order: 4; }
|
|
1264
|
+
.hx-proposal-summary { display: none; }
|
|
1265
|
+
.hx-proposal-bar[data-sheet-state="peek"] .hx-proposal-peek { display: block; color: var(--corn-text-2); }
|
|
1266
|
+
}
|
|
1267
|
+
/* ==== end of the review column ================================================================================================== */
|
|
1268
|
+
|
|
1269
|
+
/* ==== the scenario player, one bar under the map (spec 0006 D6) ================================================================
|
|
1270
|
+
From 768px it sits at the foot of the map area, to the right of the review column; the stage tells it how wide the column is. */
|
|
1271
|
+
@media (min-width: 768px) {
|
|
1272
|
+
.hx-stage:has(.hx-review-column:not([hidden])) { --hx-col-w: 400px; }
|
|
1273
|
+
.hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: max(400px, var(--hx-forge-w)); }
|
|
1274
|
+
.hx-stage:has(.drawer-open) .hx-player { right: 504px; }
|
|
1275
|
+
}
|
|
1276
|
+
@media (min-width: 1280px) {
|
|
1277
|
+
.hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: calc(400px + var(--hx-forge-w)); }
|
|
1278
|
+
}
|
|
1279
|
+
@media (min-width: 768px) and (max-width: 1023px) {
|
|
1280
|
+
.hx-stage:has(.hx-review-column:not([hidden])) { --hx-col-w: 320px; }
|
|
1281
|
+
.hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: max(320px, var(--hx-forge-w)); }
|
|
1282
|
+
}
|
|
1283
|
+
.hx-player-as, .hx-player-check { flex: 1 0 100%; }
|
|
1284
|
+
.hx-player-speed[data-corn="control"] { color: var(--corn-text); }
|
|
1285
|
+
/* ==== end of the player bar ===================================================================================================== */
|
|
1286
|
+
|
|
1159
1287
|
/* ==========================================================================
|
|
1160
1288
|
What is waiting on you (spec 0010): the one number's badge, the Specs groups, each row's review state, the search, the Runs headings
|
|
1161
1289
|
========================================================================== */
|
package/explorer/index.html
CHANGED
|
@@ -200,10 +200,11 @@
|
|
|
200
200
|
<div id="proposal-ways" class="hx-proposal-ways" role="group" aria-label="Ways on" data-corn="proposal-ways" hidden></div>
|
|
201
201
|
<div id="proposal-body">
|
|
202
202
|
<div class="hx-proposal-head" data-corn="proposal-head" role="group" aria-label="Proposal actions">
|
|
203
|
-
<
|
|
203
|
+
<h2 id="proposal-title" class="hx-proposal-name" data-corn="proposal-title"></h2>
|
|
204
204
|
<a id="proposal-source" class="hx-proposal-source" data-corn="proposal-source" hidden></a>
|
|
205
205
|
<div class="hx-proposal-counts">
|
|
206
|
-
<
|
|
206
|
+
<div id="proposal-chip" class="hx-proposal-chip" data-corn="proposal-counts"></div>
|
|
207
|
+
<p id="proposal-peek" class="hx-proposal-peek"></p>
|
|
207
208
|
<button type="button" id="proposal-mode" class="hx-proposal-mode" data-corn="proposal-mode" data-action="toggle-proposal-mode" data-peek-ok aria-expanded="false" aria-controls="proposal-seg" title="Before, Diff or After"></button>
|
|
208
209
|
</div>
|
|
209
210
|
<div id="proposal-seg" class="hx-seg" data-corn="compare" role="group" aria-label="Compare">
|
|
@@ -212,13 +213,8 @@
|
|
|
212
213
|
<button data-corn="compare-option" type="button" class="hx-seg-btn" data-action="proposal-view" data-view="after" aria-pressed="false" data-corn-string="after">After</button>
|
|
213
214
|
</div>
|
|
214
215
|
<div class="hx-proposal-tools">
|
|
215
|
-
<button data-corn-kind="secondary" type="button" id="proposal-play" class="hx-btn" aria-expanded="false" aria-controls="proposal-scenarios" title="Play one of this proposal's scenarios on the map" hidden>Play</button>
|
|
216
216
|
<button data-corn-kind="secondary" type="button" id="proposal-edit" class="hx-btn" aria-expanded="false" aria-controls="whatif" title="Try a change: add a node or an edge, reword a scenario">Edit</button>
|
|
217
217
|
</div>
|
|
218
|
-
<div class="hx-proposal-actions">
|
|
219
|
-
<button data-corn-kind="secondary" type="button" class="hx-btn" data-review="notes" data-peek-ok title="Send it back to the drafting agent with a note and your edits" data-corn-string="sendBack">Send back</button>
|
|
220
|
-
<button type="button" class="hx-btn hx-btn--approve" data-review="approved" data-peek-ok title="Sign this proposal off" data-corn-kind="approve" data-corn-string="approve">Approve</button>
|
|
221
|
-
</div>
|
|
222
218
|
<div class="hx-proposal-more">
|
|
223
219
|
<button type="button" id="proposal-more" class="hx-btn hx-btn--icon" data-action="toggle-proposal-more" aria-haspopup="menu" aria-expanded="false" aria-controls="proposal-more-menu" aria-label="More" data-corn-kind="icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><circle cx="3" cy="8" r="1.5"/><circle cx="8" cy="8" r="1.5"/><circle cx="13" cy="8" r="1.5"/></svg></button>
|
|
224
220
|
<div id="proposal-more-menu" class="hx-proposal-more-menu glass" data-corn="proposal-menu" role="menu" aria-label="More" hidden>
|
|
@@ -226,16 +222,29 @@
|
|
|
226
222
|
</div>
|
|
227
223
|
</div>
|
|
228
224
|
</div>
|
|
229
|
-
<p id="proposal-summary" class="hx-proposal-summary" hidden></p>
|
|
230
225
|
<details id="proposal-errors" class="hx-proposal-errors" data-corn="proposal-errors" hidden>
|
|
231
226
|
<summary data-corn="summary" id="proposal-errors-count"></summary>
|
|
232
227
|
<ul id="proposal-errors-list"></ul>
|
|
233
228
|
<p class="hx-faint">The map shows what it can.</p>
|
|
234
229
|
</details>
|
|
235
|
-
<div id="proposal-changes" class="hx-proposal-changes" data-corn="proposal-changes" hidden></div>
|
|
236
230
|
</div>
|
|
237
231
|
</section>
|
|
238
232
|
|
|
233
|
+
<!-- The review column (review-column.js, spec 0006): what the proposal changes, and the personas and the scenarios that apply to them. Docked left of the map from 768px, the expanded proposal sheet's body on a phone -->
|
|
234
|
+
<aside id="review-column" class="hx-review-column glass" aria-label="Review" data-corn="review-column" hidden>
|
|
235
|
+
<div class="hx-rc-scroll">
|
|
236
|
+
<p id="proposal-summary" class="hx-proposal-summary" hidden></p>
|
|
237
|
+
<div id="review-lists" class="hx-rc-lists"></div>
|
|
238
|
+
</div>
|
|
239
|
+
<!-- The decision, the column's foot: Send back and Approve (review.js). Spec 0007 puts its line about what Approve does above them here. -->
|
|
240
|
+
<div id="review-decision" class="hx-rc-foot" data-corn="decision" role="group" aria-label="Decision">
|
|
241
|
+
<div class="hx-proposal-actions">
|
|
242
|
+
<button data-corn-kind="secondary" type="button" class="hx-btn" data-review="notes" data-peek-ok title="Send it back to the drafting agent with a note and your edits" data-corn-string="sendBack">Send back</button>
|
|
243
|
+
<button type="button" class="hx-btn hx-btn--approve" data-review="approved" data-peek-ok title="Sign this proposal off" data-corn-kind="approve" data-corn-string="approve">Approve</button>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</aside>
|
|
247
|
+
|
|
239
248
|
<!-- The Work panel (forge-panel.js): Specs, PRs, Issues, Threads, Runs and Deploys, in the order of the loop. A slide-over from the left on desktop, a bottom sheet on a phone; hidden and inert until the config names a forge. `forge-panel` on the inner box is the old name of the hook, kept for one release (docs/theming.md) -->
|
|
240
249
|
<p id="offline-banner" class="hx-offline" data-corn="notice" hidden></p>
|
|
241
250
|
<aside id="forge-panel" class="hx-forge glass" aria-label="Work" inert hidden data-corn="work-panel">
|
package/explorer/main.js
CHANGED
|
@@ -32,6 +32,7 @@ import { closeLegendMenu, toggleAllLayers, toggleLayer, toggleLegendMenu } from
|
|
|
32
32
|
import { closeDrawer, copySpec, selectNode, startRun } from './panels.js';
|
|
33
33
|
import { initScenarioUi, maybeStartDemo, playOutage } from './scenario-ui.js';
|
|
34
34
|
import { initSheets } from './sheets.js';
|
|
35
|
+
import { initReviewColumn } from './review-column.js';
|
|
35
36
|
import { loadTopology, setView, syncViewUi } from './view.js';
|
|
36
37
|
import { bindCanvasInput } from './input.js';
|
|
37
38
|
import { initProposals } from './proposal.js';
|
|
@@ -211,6 +212,7 @@ initKeyboard(); // the map, the panel, the search and the Layers menu by keyboar
|
|
|
211
212
|
initAccountMenu(); // the one menu at the right of the header (account-menu.js)
|
|
212
213
|
initSheets();
|
|
213
214
|
initScenarioUi();
|
|
215
|
+
initReviewColumn(); // the review column: the changes, and the personas with their scenarios (review-column.js)
|
|
214
216
|
window.addEventListener('resize', resize);
|
|
215
217
|
$('node-search').addEventListener('input', (e) => handleSearch(e.target.value));
|
|
216
218
|
$('mobile-node-search').addEventListener('input', (e) => handleSearch(e.target.value));
|