cornfield 0.37.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 +24 -0
- package/explorer/check.js +14 -10
- package/explorer/corn-state.js +3 -1
- package/explorer/explorer.css +221 -30
- package/explorer/forge-panel.js +173 -14
- package/explorer/index.html +24 -9
- package/explorer/main.js +2 -0
- package/explorer/panels.js +2 -1
- package/explorer/proposal-model.js +18 -13
- package/explorer/proposal.js +22 -87
- package/explorer/review-column.js +430 -0
- package/explorer/review.js +8 -7
- package/explorer/runs-view.js +7 -4
- package/explorer/scenario-list-model.js +301 -0
- package/explorer/scenario-ui.js +139 -136
- package/explorer/sheet-model.js +67 -19
- package/explorer/sheets.js +144 -15
- package/explorer/waiting-line.js +57 -0
- package/explorer/waiting-model.js +287 -0
- package/explorer/waiting-view.js +37 -0
- package/package.json +1 -1
- package/server/forge-forgejo.js +1 -1
- package/server/forge-github.js +1 -1
- package/server/forge.js +1 -1
- package/server/proposal-pulls.js +93 -2
- package/server/proposals.js +4 -2
- package/server/reviews.js +5 -4
- package/server/submit-review.js +2 -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',
|
|
@@ -40,6 +54,16 @@ export const STRINGS = Object.freeze({
|
|
|
40
54
|
tabThreads: 'Threads',
|
|
41
55
|
tabRuns: 'Runs',
|
|
42
56
|
tabDeploys: 'Deploys',
|
|
57
|
+
// What is waiting on you (spec 0010): the badge, the Specs groups, the Runs groups, the answer
|
|
58
|
+
waitingOnYou: 'waiting on you',
|
|
59
|
+
toDecide: 'To decide',
|
|
60
|
+
withAgent: 'With the agent',
|
|
61
|
+
approvedGroup: 'Approved',
|
|
62
|
+
drafts: 'Drafts',
|
|
63
|
+
needsYou: 'Needs you',
|
|
64
|
+
inMotion: 'In motion',
|
|
65
|
+
finished: 'Finished',
|
|
66
|
+
answer: 'Answer',
|
|
43
67
|
newIdea: 'New idea',
|
|
44
68
|
landIt: 'Land it',
|
|
45
69
|
// Agent runs
|
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/corn-state.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/** Every value `data-corn-state` can take */
|
|
8
|
-
export const CORN_STATES = Object.freeze(['open', 'merged', 'closed', 'draft', 'queued', 'running', 'requested', 'claimed', 'working', 'waiting', 'done', 'failed', 'stopped', 'success', 'failure', 'added', 'changed', 'removed', 'edit']);
|
|
8
|
+
export const CORN_STATES = Object.freeze(['open', 'merged', 'closed', 'draft', 'queued', 'running', 'requested', 'claimed', 'working', 'waiting', 'done', 'failed', 'stopped', 'success', 'failure', 'added', 'changed', 'removed', 'edit', 'sent-back']);
|
|
9
9
|
|
|
10
10
|
/** The four marks of a proposal's diff (the map's rings, the panel's pill and dots): a mark is not a status, so `changed` here is a change a proposal makes, never a mockup that changed */
|
|
11
11
|
export const MARK_STATES = Object.freeze(['added', 'changed', 'removed', 'edit']);
|
|
@@ -75,6 +75,8 @@ const ICONS = Object.freeze({
|
|
|
75
75
|
neutral: '<path d="M2.4 6h7.2"/>',
|
|
76
76
|
skipped: '<path d="M2.4 6h7.2"/>',
|
|
77
77
|
cancelled: '<circle cx="6" cy="6" r="4.2"/><path d="M3 9L9 3"/>',
|
|
78
|
+
// A spec sent back: an arrow that turns back (spec 0010)
|
|
79
|
+
'sent-back': '<path d="M4.6 2.2L2 4.8l2.6 2.6"/><path d="M2.2 4.8H7a2.8 2.8 0 0 1 0 5.6H4.6"/>',
|
|
78
80
|
});
|
|
79
81
|
|
|
80
82
|
/** The icon for a state word (a public `data-corn-state` value, or an internal word such as a check's `neutral`), as an inline SVG; '' when it has none */
|
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
|
}
|
|
@@ -1155,3 +1173,176 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1155
1173
|
.hx-offline { position: fixed; top: 64px; /* below the header */ left: 50%; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100% - 32px)); margin: 0; padding: var(--corn-space-2) var(--corn-space-4); border: var(--corn-border-strong) solid var(--corn-warn); border-radius: var(--corn-radius); background: var(--corn-surface-1); color: var(--corn-text); box-shadow: var(--corn-shadow); line-height: 1.5; }
|
|
1156
1174
|
.hx-offline[hidden] { display: none; }
|
|
1157
1175
|
.hx-offline[data-corn-state="success"] { border-color: var(--corn-ok); }
|
|
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
|
+
|
|
1287
|
+
/* ==========================================================================
|
|
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
|
|
1289
|
+
========================================================================== */
|
|
1290
|
+
|
|
1291
|
+
/* The badge: filled, in the waiting colour the solid waiting pill already uses, so one number looks the same on the Work button and on the tabs */
|
|
1292
|
+
.hx-waiting-badge, .hx-forge-count--waiting { border-radius: var(--corn-radius-pill); background: var(--corn-run-waiting); color: var(--corn-run-waiting-ink); font-weight: 700; }
|
|
1293
|
+
.hx-waiting-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; padding: 0 var(--corn-space-1); font-family: var(--corn-font-num); font-variant-numeric: tabular-nums; font-size: var(--corn-text-xs); line-height: 1; }
|
|
1294
|
+
.hx-waiting-badge[hidden] { display: none; }
|
|
1295
|
+
/* On a tab the badge keeps the count's own width (the tab does not move when a count becomes a badge): its fill reaches past the digits into the tab's own
|
|
1296
|
+
right padding, by a margin that gives the room back (content-box, so the padding is added to the count's 2ch and the margin takes exactly that away
|
|
1297
|
+
again), and keeps the tab's gap from its word on the left */
|
|
1298
|
+
.hx-forge-tab .hx-forge-count.hx-forge-count--waiting, .hx-forge-tab[aria-pressed="true"] .hx-forge-count.hx-forge-count--waiting { box-sizing: content-box; padding: 0 var(--corn-space-1); margin: 0 calc(var(--corn-space-1) * -2) 0 0; text-align: center; background: var(--corn-run-waiting); color: var(--corn-run-waiting-ink); }
|
|
1299
|
+
.hx-work .hx-waiting-badge { margin-right: calc(var(--corn-space-2) * -1); }
|
|
1300
|
+
|
|
1301
|
+
/* A group of the Specs list: its header says who must act and how many; Drafts past ten rows fold behind it */
|
|
1302
|
+
.hx-spec-group > .hx-forge-list { margin: 0; padding: 0; }
|
|
1303
|
+
.hx-spec-group > .hx-forge-list[hidden] { display: none; }
|
|
1304
|
+
.hx-forge-gtoggle { display: inline-flex; align-items: center; gap: var(--corn-space-2); min-height: 24px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
1305
|
+
.hx-forge-gtoggle::before { content: '\25B8'; font-size: var(--corn-text-xs); }
|
|
1306
|
+
.hx-forge-gtoggle[aria-expanded="true"]::before { content: '\25BE'; }
|
|
1307
|
+
.hx-forge-gtoggle:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
1308
|
+
/* A Runs heading is an item of the flat list, so a run's card (and a reply typed in it) is never moved into a section */
|
|
1309
|
+
.hx-run-heading { list-style: none; margin: var(--corn-space-3) 0 var(--corn-space-1); }
|
|
1310
|
+
.hx-run-heading:first-child { margin-top: 0; }
|
|
1311
|
+
/* A spec sent back is not a colour alone: a dashed edge and a turning arrow, and its words */
|
|
1312
|
+
.hx-forge-state--sent-back { color: var(--corn-run-stopped); border-style: dashed; }
|
|
1313
|
+
.hx-forge-reviewed { color: var(--corn-text-2); }
|
|
1314
|
+
.hx-forge-unread { margin: var(--corn-space-1) 0 0; color: var(--corn-bad); overflow-wrap: anywhere; }
|
|
1315
|
+
.hx-forge-specsearch { margin: 0 0 var(--corn-space-2); }
|
|
1316
|
+
.hx-forge-specsearch[hidden] { display: none; }
|
|
1317
|
+
.hx-forge-specsearch .hx-forge-field { width: 100%; }
|
|
1318
|
+
@media (max-width: 767px) {
|
|
1319
|
+
.hx-forge-gtoggle { min-height: 44px; }
|
|
1320
|
+
.hx-forge-unread .hx-btn { min-height: 44px; }
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/* The proposal bar's line when a run waits on the open proposal (spec 0010 D2): one line under the buttons, in the waiting colour's own mark (a left edge and its words), then Answer */
|
|
1324
|
+
.hx-waiting-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2) var(--corn-space-3); margin: var(--corn-space-2) 0 0; padding: var(--corn-space-1) var(--corn-space-3); border-left: calc(var(--corn-border-strong) * 2) solid var(--corn-run-waiting); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); line-height: 1.4; overflow-wrap: anywhere; }
|
|
1325
|
+
.hx-waiting-line[hidden] { display: none; }
|
|
1326
|
+
@media (max-width: 767px) { .hx-waiting-line .hx-btn { min-height: 44px; min-width: 44px; } }
|
|
1327
|
+
|
|
1328
|
+
/* ==========================================================================
|
|
1329
|
+
Sheets on a phone (spec 0010 D7): two at most, one expanded, a stub for the other, and the map keeps 35% of the screen
|
|
1330
|
+
========================================================================== */
|
|
1331
|
+
.hx-sheet-stub { display: none; }
|
|
1332
|
+
@media (max-width: 767px) {
|
|
1333
|
+
/* The node panel and Work take turns: the one displaced is hidden, not closed (its node stays selected) */
|
|
1334
|
+
.hx-dock > .hx-sheet[data-sheet-away] { display: none; }
|
|
1335
|
+
/* A stub: one 44px row with the sheet's title and its badge; a tap expands it, and the expanded one folds to a stub in its place */
|
|
1336
|
+
.hx-dock > .hx-sheet[data-sheet-state="stub"] { min-height: 44px; max-height: 44px; padding-top: 0; padding-bottom: 0; overflow: hidden; }
|
|
1337
|
+
.hx-dock > .hx-sheet[data-sheet-state="stub"] > :not(.hx-sheet-stub) { display: none !important; }
|
|
1338
|
+
.hx-sheet-stub { display: flex; align-items: center; gap: var(--corn-space-3); width: 100%; min-height: 44px; padding: 0 var(--corn-space-1); border: 0; background: none; color: var(--corn-text); font: inherit; font-weight: 600; text-align: left; }
|
|
1339
|
+
.hx-sheet-stub[hidden] { display: none; }
|
|
1340
|
+
.hx-sheet-stub:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-width) * -1); border-radius: var(--corn-radius); }
|
|
1341
|
+
.hx-sheet-stub-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1342
|
+
}
|
|
1343
|
+
/* An expanded sheet is capped so the map keeps 35% of the screen: sheets.js writes `--hx-sheet-cap` (the screen less the map's share, less a stub). Not in a short
|
|
1344
|
+
window (400% zoom), where an open sheet may take the window. */
|
|
1345
|
+
@media (max-width: 767px) and (min-height: 481px) {
|
|
1346
|
+
.hx-dock > .hx-proposal-bar[data-sheet-state="expanded"], .hx-dock > .hx-player[data-sheet-state="expanded"] { max-height: min(var(--hx-sheet-cap, 50dvh), 50dvh); }
|
|
1347
|
+
.hx-dock > .hx-drawer[data-sheet-state="expanded"], .hx-dock > .hx-forge[data-sheet-state="expanded"] { max-height: min(var(--hx-sheet-cap, 60dvh), 60dvh); }
|
|
1348
|
+
}
|