@intentius/behold 0.29.44 → 0.29.46
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/dist/cli.js +101 -5
- package/package.json +1 -1
- package/web/app.js +135 -4
- package/web/event-help-modal.js +58 -8
- package/web/float-place.js +85 -0
- package/web/float-place.test.js +117 -0
- package/web/index.html +6 -2
- package/web/kiosk-demo-frame.test.js +27 -0
- package/web/kiosk-event-help-ui.js +82 -14
- package/web/kiosk-event-help.js +146 -0
- package/web/kiosk-highlight.test.js +249 -0
- package/web/kiosk-modal-sticky.test.js +294 -0
- package/web/kiosk-popover.js +6 -22
- package/web/kiosk-vendor.js +2 -0
- package/web/kiosk-watch.js +16 -9
- package/web/kiosk.html +9 -1
- package/web/kiosk.js +44 -4
- package/web/tg-read-pills.js +23 -0
- package/web/tg-read-pills.test.js +42 -1
- package/web/tooltip.js +5 -2
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
// behold#757: a step's highlight, what is special about it in the driver's
|
|
2
|
+
// words, opened in Watch as a modal when its step arrives: once per arrival,
|
|
3
|
+
// at the same moment in a replay, never with Tips off, and nothing at all for
|
|
4
|
+
// a step without one.
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { HIGHLIGHT_KICKER, modeLine, openEventModal } from "./event-help-modal.js";
|
|
7
|
+
import { HIGHLIGHT_MS, ehStore, highlightOpens, highlightShown, highlightStepKey, highlightTurn, stepHighlight } from "./kiosk-event-help.js";
|
|
8
|
+
import { startEventHelp } from "./kiosk-event-help-ui.js";
|
|
9
|
+
import { replayAt, scrubDemo } from "./kiosk-vendor.js";
|
|
10
|
+
|
|
11
|
+
const HL = { title: "Same orchestration as the commercial platforms", body: "Fifteen OpenTofu states, applied in dependency order. This is the stack-dependency orchestration Terraform automation platforms sell, run here by terragucci on plain OpenTofu and Forgejo." };
|
|
12
|
+
const demo = (step, more = {}) => ({ cycle: 9, scenario: "fan-out", title: "t", step, label: `the ${step} line`, started_at: "2026-10-18T00:00:00Z", next: null, pull: 3, commit: null, ...more });
|
|
13
|
+
|
|
14
|
+
describe("highlight: the floor", () => {
|
|
15
|
+
it("is a title and a body, both non-empty strings, else nothing", () => {
|
|
16
|
+
expect(stepHighlight(demo("failed", { highlight: HL }))).toEqual(HL);
|
|
17
|
+
for (const v of [null, undefined, "x", [], {}, { title: "t" }, { title: "", body: "b" }, { title: "t", body: " " }, { title: 2, body: "b" }]) expect(stepHighlight(demo("failed", { highlight: v }))).toBeNull();
|
|
18
|
+
expect(stepHighlight(null)).toBeNull();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe("highlight: once per cycle, step and title (terragucci#1176)", () => {
|
|
23
|
+
it("comes with its step, once, and goes with it", () => {
|
|
24
|
+
let s = highlightTurn(null, demo("applying"));
|
|
25
|
+
expect(s.pending).toBeNull();
|
|
26
|
+
s = highlightTurn(s, demo("failed", { highlight: HL }));
|
|
27
|
+
expect(s.pending).toMatchObject({ key: highlightStepKey(demo("failed")), ...HL });
|
|
28
|
+
// Opened: the same step looked at again brings nothing back.
|
|
29
|
+
s = highlightShown(s);
|
|
30
|
+
expect(s.pending).toBeNull();
|
|
31
|
+
expect(highlightTurn(s, demo("failed", { highlight: HL }))).toBe(s);
|
|
32
|
+
// A step that goes takes a highlight not yet opened with it.
|
|
33
|
+
const waiting = highlightTurn(null, demo("failed", { highlight: HL }));
|
|
34
|
+
expect(highlightTurn(waiting, demo("resumed")).pending).toBeNull();
|
|
35
|
+
});
|
|
36
|
+
it("opens once though the driver writes its step again, around a hold", () => {
|
|
37
|
+
const w = (step, t) => demo(step, { started_at: `2026-10-18T00:00:${t}Z`, highlight: step === "applying" ? HL : null });
|
|
38
|
+
let s = highlightShown(highlightTurn(null, w("applying", 10)));
|
|
39
|
+
s = highlightTurn(s, w("waiting", 20));
|
|
40
|
+
s = highlightTurn(s, w("applying", 30));
|
|
41
|
+
expect(s.pending).toBeNull();
|
|
42
|
+
});
|
|
43
|
+
it("opens when a step gains one partway through, as choudoufu's operator's apply does", () => {
|
|
44
|
+
let s = highlightTurn(null, demo("applying", { started_at: "2026-10-18T00:00:10Z" }));
|
|
45
|
+
expect(s.pending).toBeNull();
|
|
46
|
+
s = highlightTurn(s, demo("applying", { started_at: "2026-10-18T00:00:10Z", highlight: HL }));
|
|
47
|
+
expect(s.pending).toMatchObject(HL);
|
|
48
|
+
});
|
|
49
|
+
it("a fix's step opens its own title, not the same one again; the next cycle opens it again", () => {
|
|
50
|
+
const opened = highlightShown(highlightTurn(null, demo("planned", { highlight: HL })));
|
|
51
|
+
expect(highlightTurn(opened, demo("planned", { pull: 4, highlight: HL })).pending).toBeNull();
|
|
52
|
+
expect(highlightTurn(opened, demo("planned", { pull: 4, highlight: { title: "Only what was blocked", body: "b" } })).pending).toMatchObject({ title: "Only what was blocked" });
|
|
53
|
+
expect(highlightTurn(opened, demo("planned", { cycle: 10, highlight: HL })).pending).not.toBeNull();
|
|
54
|
+
});
|
|
55
|
+
it("opens in Watch with Tips on, over a Waiting modal but not over a critical one, nor on a held small stage", () => {
|
|
56
|
+
const pending = { key: "k", ...HL };
|
|
57
|
+
expect(highlightOpens({ pending, on: true, watch: true })).toBe(true);
|
|
58
|
+
expect(highlightOpens({ pending, on: true, watch: true, modal: "waiting" })).toBe(true);
|
|
59
|
+
expect(highlightOpens({ pending, on: false, watch: true })).toBe(false);
|
|
60
|
+
expect(highlightOpens({ pending, on: true, watch: false })).toBe(false);
|
|
61
|
+
expect(highlightOpens({ pending, on: true, watch: true, held: true })).toBe(false);
|
|
62
|
+
expect(highlightOpens({ pending, on: true, watch: true, modal: "failed" })).toBe(false);
|
|
63
|
+
expect(highlightOpens({ pending: null, on: true, watch: true })).toBe(false);
|
|
64
|
+
});
|
|
65
|
+
it("in a replay, arrives when the replay's clock reaches its step, and again each time the replay loops round", () => {
|
|
66
|
+
const steps = [demo("applying", { at: "2026-10-18T00:00:00Z" }), demo("failed", { at: "2026-10-18T00:00:20Z", highlight: HL }), demo("reset", { at: "2026-10-18T00:00:40Z" })];
|
|
67
|
+
let s = null;
|
|
68
|
+
const opened = [];
|
|
69
|
+
for (let t = 0; t < 130_000; t += 1_000) {
|
|
70
|
+
const d = steps[replayAt(steps, t).index];
|
|
71
|
+
s = highlightTurn(s, d);
|
|
72
|
+
if (s.pending) {
|
|
73
|
+
opened.push(t);
|
|
74
|
+
s = highlightShown(s);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const loop = replayAt(steps, 0).loop;
|
|
78
|
+
expect(opened).toEqual([20_000, 20_000 + loop, 20_000 + 2 * loop].filter((t) => t < 130_000));
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe("highlight: on a tool's page", () => {
|
|
83
|
+
it("goes whole when it names a rival of the page's tool, as the step's line does", () => {
|
|
84
|
+
expect(scrubDemo(demo("failed", { highlight: HL }), "tofu-fanout").highlight).toEqual(HL);
|
|
85
|
+
expect(scrubDemo(demo("failed", { highlight: HL }), "chant-fanout").highlight).toBeNull();
|
|
86
|
+
expect("highlight" in scrubDemo(demo("failed"), "tofu-fanout")).toBe(false);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/** Just enough of a DOM for Tips and its modal. */
|
|
91
|
+
function fakeDoc() {
|
|
92
|
+
const listeners = {};
|
|
93
|
+
const make = (tag) => {
|
|
94
|
+
const n = {
|
|
95
|
+
tagName: tag.toUpperCase(),
|
|
96
|
+
children: [],
|
|
97
|
+
handlers: {},
|
|
98
|
+
textContent: "",
|
|
99
|
+
className: "",
|
|
100
|
+
dataset: {},
|
|
101
|
+
style: { setProperty() {} },
|
|
102
|
+
classList: { toggle() {}, add() {}, remove() {} },
|
|
103
|
+
appendChild(c) {
|
|
104
|
+
c.parent = n;
|
|
105
|
+
n.children.push(c);
|
|
106
|
+
return c;
|
|
107
|
+
},
|
|
108
|
+
append(...cs) {
|
|
109
|
+
cs.forEach((c) => typeof c === "object" && n.appendChild(c));
|
|
110
|
+
},
|
|
111
|
+
prepend(c) {
|
|
112
|
+
n.appendChild(c);
|
|
113
|
+
},
|
|
114
|
+
replaceChildren() {
|
|
115
|
+
n.children = [];
|
|
116
|
+
},
|
|
117
|
+
setAttribute() {},
|
|
118
|
+
addEventListener(ev, fn) {
|
|
119
|
+
(n.handlers[ev] ||= []).push(fn);
|
|
120
|
+
},
|
|
121
|
+
querySelector: () => null,
|
|
122
|
+
remove() {
|
|
123
|
+
if (n.parent) n.parent.children = n.parent.children.filter((x) => x !== n);
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
return n;
|
|
127
|
+
};
|
|
128
|
+
return {
|
|
129
|
+
createElement: make,
|
|
130
|
+
head: make("head"),
|
|
131
|
+
body: make("body"),
|
|
132
|
+
getElementById: () => null,
|
|
133
|
+
querySelectorAll: () => [],
|
|
134
|
+
addEventListener: (ev, fn) => ((listeners[ev] ||= []).push(fn)),
|
|
135
|
+
removeEventListener() {},
|
|
136
|
+
fire: (ev, e) => (listeners[ev] || []).forEach((fn) => fn(e)),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
const all = (n) => [n, ...n.children.flatMap(all)];
|
|
140
|
+
const find = (root, cls) => all(root).find((n) => n.className && n.className.split(" ").includes(cls));
|
|
141
|
+
/** The Tips switch's shelf, on or off (event-help-store.js). */
|
|
142
|
+
const shelf = (on = true) => {
|
|
143
|
+
const m = new Map();
|
|
144
|
+
ehStore({ setItem: (k, v) => m.set(k, v) }, on);
|
|
145
|
+
return { getItem: (k) => (m.has(k) ? m.get(k) : null), setItem: (k, v) => m.set(k, v) };
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
describe("highlight: Tips draws it", () => {
|
|
149
|
+
let t;
|
|
150
|
+
beforeEach(() => {
|
|
151
|
+
vi.useFakeTimers();
|
|
152
|
+
t = 1_000_000;
|
|
153
|
+
});
|
|
154
|
+
afterEach(() => vi.useRealTimers());
|
|
155
|
+
const start = ({ on = true, watch = true, replay = false } = {}) => {
|
|
156
|
+
const doc = fakeDoc();
|
|
157
|
+
const view = { demo: demo("applying"), watch, replay };
|
|
158
|
+
const api = startEventHelp({ doc, store: shelf(on), tipsHost: doc.body, modalHost: doc.body, now: () => t, get: () => ({ ...view, strip: null, stripReady: true }), reduced: () => true });
|
|
159
|
+
const modal = () => find(doc.body, "eh-modal");
|
|
160
|
+
const step = (d, ms = 0) => {
|
|
161
|
+
view.demo = d;
|
|
162
|
+
t += ms;
|
|
163
|
+
vi.advanceTimersByTime(ms);
|
|
164
|
+
api.tick();
|
|
165
|
+
};
|
|
166
|
+
return { api, doc, view, modal, step };
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
it("opens with its step in Watch, with its kicker, title and body, and no button", () => {
|
|
170
|
+
const k = start();
|
|
171
|
+
k.step(demo("applying"));
|
|
172
|
+
expect(k.modal()).toBeUndefined();
|
|
173
|
+
k.step(demo("failed", { highlight: HL }), 1_000);
|
|
174
|
+
const m = k.modal();
|
|
175
|
+
expect(m.className).toContain("eh-modal-highlight");
|
|
176
|
+
expect(find(m, "eh-modal-mode").textContent).toBe(HIGHLIGHT_KICKER);
|
|
177
|
+
expect(find(m, "eh-modal-title").textContent).toBe(HL.title);
|
|
178
|
+
expect(find(m, "eh-modal-line").textContent).toBe(HL.body);
|
|
179
|
+
expect(find(m, "eh-modal-act")).toBeUndefined();
|
|
180
|
+
expect(k.api.state.modal.kind).toBe("highlight");
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it("stays HIGHLIGHT_MS, then goes, and does not come back for the same step", () => {
|
|
184
|
+
const k = start();
|
|
185
|
+
k.step(demo("failed", { highlight: HL }));
|
|
186
|
+
k.step(demo("failed", { highlight: HL }), HIGHLIGHT_MS - 1_000);
|
|
187
|
+
expect(k.modal()).toBeDefined();
|
|
188
|
+
k.step(demo("failed", { highlight: HL }), 1_500);
|
|
189
|
+
expect(k.modal()).toBeUndefined();
|
|
190
|
+
k.step(demo("failed", { highlight: HL }), 5_000);
|
|
191
|
+
expect(k.modal()).toBeUndefined();
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it("goes with its step, and closes with Esc", () => {
|
|
195
|
+
const k = start();
|
|
196
|
+
k.step(demo("failed", { highlight: HL }));
|
|
197
|
+
k.step(demo("resumed"), 2_000);
|
|
198
|
+
expect(k.modal()).toBeUndefined();
|
|
199
|
+
k.step(demo("applied", { highlight: HL }), 2_000);
|
|
200
|
+
expect(k.modal()).toBeDefined();
|
|
201
|
+
k.doc.fire("keydown", { key: "Escape" });
|
|
202
|
+
expect(k.modal()).toBeUndefined();
|
|
203
|
+
k.step(demo("applied", { highlight: HL }), 1_000);
|
|
204
|
+
expect(k.modal()).toBeUndefined();
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
it("shows nothing with Tips off, nor in Inspect, nor for a step without one", () => {
|
|
208
|
+
const off = start({ on: false });
|
|
209
|
+
off.step(demo("failed", { highlight: HL }));
|
|
210
|
+
expect(off.modal()).toBeUndefined();
|
|
211
|
+
const inspect = start({ watch: false });
|
|
212
|
+
inspect.step(demo("failed", { highlight: HL }));
|
|
213
|
+
expect(inspect.modal()).toBeUndefined();
|
|
214
|
+
const none = start();
|
|
215
|
+
none.step(demo("failed"));
|
|
216
|
+
none.step(demo("failed", { highlight: { title: "", body: "b" } }), 1_000);
|
|
217
|
+
expect(none.modal()).toBeUndefined();
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
it("in a replay, opens as the replay reaches its step, marked a replay", () => {
|
|
221
|
+
const k = start({ replay: true });
|
|
222
|
+
k.step(demo("applying"));
|
|
223
|
+
expect(k.modal()).toBeUndefined();
|
|
224
|
+
k.step(demo("failed", { highlight: HL }), 20_000);
|
|
225
|
+
expect(k.modal().className).toContain("eh-mode-replay");
|
|
226
|
+
expect(find(k.modal(), "eh-modal-mode").textContent).toBe(HIGHLIGHT_KICKER);
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
describe("highlight: the modal", () => {
|
|
231
|
+
it("says its kicker in every mode", () => {
|
|
232
|
+
for (const mode of ["narrated", "replay", "live"]) expect(modeLine(mode, "highlight", {})).toBe(HIGHLIGHT_KICKER);
|
|
233
|
+
});
|
|
234
|
+
it("closes after `closeAfter`, and holds while hovered", () => {
|
|
235
|
+
let now = 0;
|
|
236
|
+
const timers = [];
|
|
237
|
+
const doc = fakeDoc();
|
|
238
|
+
const m = openEventModal(doc.body, { mode: "narrated", kind: "highlight", data: { title: HL.title, lines: [{ text: HL.body }], closeAfter: 12_000 }, doc, now: () => now, setTimer: (fn) => timers.push(fn), clearTimer() {} });
|
|
239
|
+
const box = find(doc.body, "eh-modal");
|
|
240
|
+
box.handlers.pointerenter.forEach((fn) => fn());
|
|
241
|
+
now = 13_000;
|
|
242
|
+
timers.forEach((fn) => fn());
|
|
243
|
+
expect(m.state.closed).toBe(false);
|
|
244
|
+
box.handlers.pointerleave.forEach((fn) => fn());
|
|
245
|
+
now = 16_000;
|
|
246
|
+
timers.forEach((fn) => fn());
|
|
247
|
+
expect(m.state.closed).toBe(true);
|
|
248
|
+
});
|
|
249
|
+
});
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
// behold#764: "'waiting on pipeline' keeps popping back after shutting and
|
|
2
|
+
// covering the detail overlay". A story modal the viewer closes stays closed
|
|
3
|
+
// for what it was about, across redraws and a reload; and no story modal
|
|
4
|
+
// opens over a card's details popover the viewer has open.
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { coversRect, openEventModal } from "./event-help-modal.js";
|
|
7
|
+
import { DISMISS_MAX, DISMISS_STORE, createDismissals, dismissKey, ehStore, highlightOpens, waitingOpens } from "./kiosk-event-help.js";
|
|
8
|
+
import { startEventHelp } from "./kiosk-event-help-ui.js";
|
|
9
|
+
|
|
10
|
+
const HL = { title: "Same orchestration as the commercial platforms", body: "Fifteen OpenTofu states, applied in dependency order." };
|
|
11
|
+
const demo = (step, more = {}) => ({ cycle: 9, scenario: "fan-out", title: "t", step, label: `the ${step} line`, started_at: "2026-10-18T00:00:00Z", next: null, pull: 3, commit: null, ...more });
|
|
12
|
+
const WAIT = { key: "0|0|the pipeline to start the plan", what: "the pipeline to start the plan", why: "Pull request 106 is open.", fraction: 0.3, words: "usually about 21 s" };
|
|
13
|
+
/** A sessionStorage stand-in that outlives one page: what a reload keeps. */
|
|
14
|
+
const session = () => {
|
|
15
|
+
const m = new Map();
|
|
16
|
+
return { getItem: (k) => (m.has(k) ? m.get(k) : null), setItem: (k, v) => m.set(k, String(v)), map: m };
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
describe("the closed modals' keys", () => {
|
|
20
|
+
it("say the kind, the cycle and beat, the pull request, the step and the modal's own key", () => {
|
|
21
|
+
expect(dismissKey("waiting", demo("pull-request"), WAIT.key)).toBe(`waiting|9||3|pull-request|${WAIT.key}`);
|
|
22
|
+
expect(dismissKey("waiting", demo("pull-request", { beat: "fix" }), "k")).not.toBe(dismissKey("waiting", demo("pull-request"), "k"));
|
|
23
|
+
// A new wait: a later step, a new pull request, a new cycle.
|
|
24
|
+
const k = dismissKey("waiting", demo("pull-request"), "k");
|
|
25
|
+
for (const d of [demo("merged"), demo("pull-request", { pull: 4 }), demo("pull-request", { cycle: 10 })]) expect(dismissKey("waiting", d, "k")).not.toBe(k);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("are kept in the store given (sessionStorage), so a new page reads them back", () => {
|
|
29
|
+
const store = session();
|
|
30
|
+
const a = createDismissals(store);
|
|
31
|
+
a.add("x");
|
|
32
|
+
a.add("x");
|
|
33
|
+
expect(JSON.parse(store.getItem(DISMISS_STORE))).toEqual(["x"]);
|
|
34
|
+
expect(createDismissals(store).has("x")).toBe(true);
|
|
35
|
+
a.clear();
|
|
36
|
+
expect(createDismissals(store).has("x")).toBe(false);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it("keep the newest DISMISS_MAX, and live in memory where storage throws or holds junk", () => {
|
|
40
|
+
const store = session();
|
|
41
|
+
const a = createDismissals(store);
|
|
42
|
+
for (let i = 0; i < DISMISS_MAX + 5; i++) a.add(`k${i}`);
|
|
43
|
+
expect(a.keys()).toHaveLength(DISMISS_MAX);
|
|
44
|
+
expect(a.has("k0")).toBe(false);
|
|
45
|
+
expect(a.has(`k${DISMISS_MAX + 4}`)).toBe(true);
|
|
46
|
+
const broken = { getItem: () => { throw new Error("blocked"); }, setItem: () => { throw new Error("blocked"); } };
|
|
47
|
+
const b = createDismissals(broken);
|
|
48
|
+
b.add("y");
|
|
49
|
+
expect(b.has("y")).toBe(true);
|
|
50
|
+
store.setItem(DISMISS_STORE, "{not json");
|
|
51
|
+
expect(createDismissals(store).keys()).toEqual([]);
|
|
52
|
+
expect(createDismissals(null).has("z")).toBe(false);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
describe("when a story modal may open", () => {
|
|
57
|
+
it("the waiting one: not over a details popover, not for a wait the viewer closed, not over another modal", () => {
|
|
58
|
+
expect(waitingOpens({ waiting: WAIT })).toBe(true);
|
|
59
|
+
expect(waitingOpens({ waiting: WAIT, pop: { left: 0, top: 0, width: 10, height: 10 } })).toBe(false);
|
|
60
|
+
expect(waitingOpens({ waiting: WAIT, closed: true })).toBe(false);
|
|
61
|
+
expect(waitingOpens({ waiting: WAIT, modal: {} })).toBe(false);
|
|
62
|
+
expect(waitingOpens({ waiting: WAIT, due: true })).toBe(false);
|
|
63
|
+
expect(waitingOpens({ waiting: WAIT, on: false })).toBe(false);
|
|
64
|
+
expect(waitingOpens({ waiting: null })).toBe(false);
|
|
65
|
+
});
|
|
66
|
+
it("a highlight: waits while a details popover is open", () => {
|
|
67
|
+
const pending = { key: "k", ...HL };
|
|
68
|
+
expect(highlightOpens({ pending, on: true, watch: true, pop: { left: 0, top: 0, width: 10, height: 10 } })).toBe(false);
|
|
69
|
+
expect(highlightOpens({ pending, on: true, watch: true, pop: null })).toBe(true);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
describe("Tips: a closed modal stays closed, and none covers the details popover", () => {
|
|
74
|
+
let t;
|
|
75
|
+
beforeEach(() => {
|
|
76
|
+
vi.useFakeTimers();
|
|
77
|
+
t = 1_000_000;
|
|
78
|
+
});
|
|
79
|
+
afterEach(() => vi.useRealTimers());
|
|
80
|
+
const FRAME = { getBoundingClientRect: () => ({ left: 5, top: 77, width: 1356, height: 686, right: 1361, bottom: 763 }) };
|
|
81
|
+
/** One page of the kiosk; `store` is its sessionStorage, which a reload keeps. */
|
|
82
|
+
const page = (store, { pop = null } = {}) => {
|
|
83
|
+
const doc = fakeDoc();
|
|
84
|
+
const view = { demo: demo("pull-request"), watch: true, waiting: WAIT, frame: FRAME, pop };
|
|
85
|
+
const api = startEventHelp({ doc, store: shelf(), session: store, tipsHost: doc.body, modalHost: doc.body, now: () => t, get: () => ({ ...view, strip: null, stripReady: true }), reduced: () => true });
|
|
86
|
+
const modal = (kind) => all(doc.body).find((n) => n.className && n.className.split(" ").includes(`eh-modal-${kind}`));
|
|
87
|
+
const step = (ms = 1_000, more = {}) => {
|
|
88
|
+
Object.assign(view, more);
|
|
89
|
+
t += ms;
|
|
90
|
+
vi.advanceTimersByTime(ms);
|
|
91
|
+
api.tick();
|
|
92
|
+
};
|
|
93
|
+
const closeX = (kind) => {
|
|
94
|
+
const x = all(modal(kind)).find((n) => n.className === "eh-modal-close");
|
|
95
|
+
x.handlers.click.forEach((fn) => fn({}));
|
|
96
|
+
};
|
|
97
|
+
return { api, doc, view, modal, step, closeX };
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
it("the Waiting modal, closed with ×, does not come back on the next looks at the same wait", () => {
|
|
101
|
+
const k = page(session());
|
|
102
|
+
k.step();
|
|
103
|
+
expect(k.modal("waiting")).toBeDefined();
|
|
104
|
+
k.closeX("waiting");
|
|
105
|
+
expect(k.modal("waiting")).toBeUndefined();
|
|
106
|
+
for (let i = 0; i < 60; i++) k.step(1_000);
|
|
107
|
+
expect(k.modal("waiting")).toBeUndefined();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it("closed with Escape, it stays closed too; a new wait (a later step) opens again", () => {
|
|
111
|
+
const k = page(session());
|
|
112
|
+
k.step();
|
|
113
|
+
k.doc.fire("keydown", { key: "Escape" });
|
|
114
|
+
k.step(5_000);
|
|
115
|
+
expect(k.modal("waiting")).toBeUndefined();
|
|
116
|
+
k.step(1_000, { demo: demo("merged"), waiting: { ...WAIT, key: "0|2|the pipeline to apply" } });
|
|
117
|
+
expect(k.modal("waiting")).toBeDefined();
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("a close by the page (news, the wait ending) is no viewer's: the same wait may open again", () => {
|
|
121
|
+
const k = page(session());
|
|
122
|
+
k.step();
|
|
123
|
+
k.step(1_000, { waiting: null });
|
|
124
|
+
expect(k.modal("waiting")).toBeUndefined();
|
|
125
|
+
k.step(1_000, { waiting: WAIT });
|
|
126
|
+
expect(k.modal("waiting")).toBeDefined();
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it("survives a reload: the next page, with the same session, does not reopen the wait the viewer closed", () => {
|
|
130
|
+
const store = session();
|
|
131
|
+
const first = page(store);
|
|
132
|
+
first.step();
|
|
133
|
+
first.closeX("waiting");
|
|
134
|
+
const again = page(store);
|
|
135
|
+
for (let i = 0; i < 10; i++) again.step(1_000);
|
|
136
|
+
expect(again.modal("waiting")).toBeUndefined();
|
|
137
|
+
// A fresh visit (a new session) opens it.
|
|
138
|
+
const fresh = page(session());
|
|
139
|
+
fresh.step();
|
|
140
|
+
expect(fresh.modal("waiting")).toBeDefined();
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it("a step's highlight is once per cycle, step and title across a reload too", () => {
|
|
144
|
+
const store = session();
|
|
145
|
+
const first = page(store);
|
|
146
|
+
first.step(1_000, { demo: demo("failed", { highlight: HL }), waiting: null });
|
|
147
|
+
expect(first.modal("highlight")).toBeDefined();
|
|
148
|
+
first.closeX("highlight");
|
|
149
|
+
const again = page(store);
|
|
150
|
+
again.step(1_000, { demo: demo("failed", { highlight: HL }), waiting: null });
|
|
151
|
+
again.step(1_000);
|
|
152
|
+
expect(again.modal("highlight")).toBeUndefined();
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it("a replay looping round forgets what was closed: its wait opens again", () => {
|
|
156
|
+
const k = page(session());
|
|
157
|
+
k.step(1_000, { demo: demo("pull-request", { at: "2026-10-18T00:00:10Z" }) });
|
|
158
|
+
k.closeX("waiting");
|
|
159
|
+
k.step(1_000);
|
|
160
|
+
expect(k.modal("waiting")).toBeUndefined();
|
|
161
|
+
k.step(1_000, { demo: demo("pull-request", { at: "2026-10-18T00:00:00Z" }) });
|
|
162
|
+
expect(k.modal("waiting")).toBeDefined();
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it("opens no story modal while a card's details popover is open; the one held back opens once it closes", () => {
|
|
166
|
+
const k = page(session(), { pop: { x: 600, y: 80, w: 412, h: 141 } });
|
|
167
|
+
for (let i = 0; i < 5; i++) k.step(1_000);
|
|
168
|
+
expect(k.modal("waiting")).toBeUndefined();
|
|
169
|
+
k.step(1_000, { demo: demo("failed", { highlight: HL }), waiting: null });
|
|
170
|
+
expect(k.modal("highlight")).toBeUndefined();
|
|
171
|
+
k.step(1_000, { pop: null });
|
|
172
|
+
expect(k.modal("highlight")).toBeDefined();
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
describe("a modal already up when the details popover opens", () => {
|
|
177
|
+
/** A box the size of a modal, in the middle of a 1366x768 window. */
|
|
178
|
+
const layoutDoc = () => {
|
|
179
|
+
const doc = fakeDoc();
|
|
180
|
+
doc.defaultView = { innerWidth: 1366, innerHeight: 768 };
|
|
181
|
+
const make = doc.createElement;
|
|
182
|
+
doc.createElement = (tag) => {
|
|
183
|
+
const n = make(tag);
|
|
184
|
+
n.getBoundingClientRect = () => ({ left: 383, top: 284, width: 600, height: 200 });
|
|
185
|
+
return n;
|
|
186
|
+
};
|
|
187
|
+
return doc;
|
|
188
|
+
};
|
|
189
|
+
const classes = (n) => n.classes;
|
|
190
|
+
it("moves clear of it, its sheet no longer over it", () => {
|
|
191
|
+
const doc = layoutDoc();
|
|
192
|
+
let keep = null;
|
|
193
|
+
const timers = [];
|
|
194
|
+
openEventModal(doc.body, { mode: "narrated", kind: "waiting", data: { title: "Waiting on the pipeline", lines: [], keepClear: () => keep }, doc, now: () => 0, setTimer: (fn) => timers.push(fn), clearTimer() {} });
|
|
195
|
+
const wrap = doc.body.children[0];
|
|
196
|
+
const box = wrap.children[0];
|
|
197
|
+
expect(classes(wrap).has("eh-modal-keep")).toBe(false);
|
|
198
|
+
// The popover opens under the middle of the window, where the modal stands; the modal's next tick moves it.
|
|
199
|
+
keep = { left: 500, top: 300, width: 300, height: 140 };
|
|
200
|
+
timers.forEach((fn) => fn());
|
|
201
|
+
expect(classes(wrap).has("eh-modal-keep")).toBe(true);
|
|
202
|
+
expect(classes(wrap).has("eh-modal-placed")).toBe(true);
|
|
203
|
+
const at = { left: Number.parseFloat(box.style.marginLeft), top: Number.parseFloat(box.style.marginTop), width: 600, height: 200 };
|
|
204
|
+
expect(coversRect(at, keep)).toBe(false);
|
|
205
|
+
expect(classes(wrap).has("eh-modal-yield")).toBe(false);
|
|
206
|
+
// It closes: the modal goes back to the middle.
|
|
207
|
+
keep = null;
|
|
208
|
+
timers.forEach((fn) => fn());
|
|
209
|
+
expect(classes(wrap).has("eh-modal-keep")).toBe(false);
|
|
210
|
+
expect(classes(wrap).has("eh-modal-placed")).toBe(false);
|
|
211
|
+
expect(box.style.marginLeft).toBe("");
|
|
212
|
+
});
|
|
213
|
+
it("steps out of sight, its time held, where no spot clears it", () => {
|
|
214
|
+
const doc = layoutDoc();
|
|
215
|
+
const keep = { left: 0, top: 0, width: 1366, height: 768 };
|
|
216
|
+
let now = 0;
|
|
217
|
+
const timers = [];
|
|
218
|
+
const m = openEventModal(doc.body, { mode: "narrated", kind: "highlight", data: { title: "h", lines: [], closeAfter: 1_000, keepClear: () => keep }, doc, now: () => now, setTimer: (fn) => timers.push(fn), clearTimer() {} });
|
|
219
|
+
const wrap = doc.body.children[0];
|
|
220
|
+
expect(classes(wrap).has("eh-modal-yield")).toBe(true);
|
|
221
|
+
now = 5_000;
|
|
222
|
+
timers.forEach((fn) => fn());
|
|
223
|
+
expect(m.state.closed).toBe(false);
|
|
224
|
+
expect(m.state.closedBy).toBeUndefined();
|
|
225
|
+
m.close();
|
|
226
|
+
expect(m.state.closedBy).toBe("page");
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
/** Just enough of a DOM for Tips and its modal (kiosk-highlight.test.js's, with a classList that keeps its classes). */
|
|
231
|
+
function fakeDoc() {
|
|
232
|
+
const listeners = {};
|
|
233
|
+
const make = (tag) => {
|
|
234
|
+
const classes = new Set();
|
|
235
|
+
const n = {
|
|
236
|
+
tagName: tag.toUpperCase(),
|
|
237
|
+
children: [],
|
|
238
|
+
handlers: {},
|
|
239
|
+
textContent: "",
|
|
240
|
+
dataset: {},
|
|
241
|
+
classes,
|
|
242
|
+
style: { setProperty() {} },
|
|
243
|
+
classList: {
|
|
244
|
+
toggle: (c, on) => ((on === undefined ? !classes.has(c) : on) ? classes.add(c) : classes.delete(c)),
|
|
245
|
+
add: (...cs) => cs.forEach((c) => classes.add(c)),
|
|
246
|
+
remove: (...cs) => cs.forEach((c) => classes.delete(c)),
|
|
247
|
+
contains: (c) => classes.has(c),
|
|
248
|
+
},
|
|
249
|
+
appendChild(c) {
|
|
250
|
+
c.parent = n;
|
|
251
|
+
n.children.push(c);
|
|
252
|
+
return c;
|
|
253
|
+
},
|
|
254
|
+
append(...cs) {
|
|
255
|
+
cs.forEach((c) => typeof c === "object" && n.appendChild(c));
|
|
256
|
+
},
|
|
257
|
+
prepend(c) {
|
|
258
|
+
n.appendChild(c);
|
|
259
|
+
},
|
|
260
|
+
replaceChildren() {
|
|
261
|
+
n.children = [];
|
|
262
|
+
},
|
|
263
|
+
setAttribute() {},
|
|
264
|
+
addEventListener(ev, fn) {
|
|
265
|
+
(n.handlers[ev] ||= []).push(fn);
|
|
266
|
+
},
|
|
267
|
+
querySelector: () => null,
|
|
268
|
+
remove() {
|
|
269
|
+
if (n.parent) n.parent.children = n.parent.children.filter((x) => x !== n);
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
// className is the classList's words, as the DOM's is.
|
|
273
|
+
Object.defineProperty(n, "className", { get: () => [...classes].join(" "), set: (v) => { classes.clear(); String(v).split(/\s+/).filter(Boolean).forEach((c) => classes.add(c)); } });
|
|
274
|
+
return n;
|
|
275
|
+
};
|
|
276
|
+
return {
|
|
277
|
+
createElement: make,
|
|
278
|
+
head: make("head"),
|
|
279
|
+
body: make("body"),
|
|
280
|
+
getElementById: () => null,
|
|
281
|
+
querySelectorAll: () => [],
|
|
282
|
+
addEventListener: (ev, fn) => ((listeners[ev] ||= []).push(fn)),
|
|
283
|
+
removeEventListener(ev, fn) {
|
|
284
|
+
listeners[ev] = (listeners[ev] || []).filter((x) => x !== fn);
|
|
285
|
+
},
|
|
286
|
+
fire: (ev, e) => (listeners[ev] || []).forEach((fn) => fn(e)),
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
const all = (n) => (n ? [n, ...n.children.flatMap(all)] : []);
|
|
290
|
+
const shelf = () => {
|
|
291
|
+
const m = new Map();
|
|
292
|
+
ehStore({ setItem: (k, v) => m.set(k, v) }, true);
|
|
293
|
+
return { getItem: (k) => (m.has(k) ? m.get(k) : null), setItem: (k, v) => m.set(k, v) };
|
|
294
|
+
};
|
package/web/kiosk-popover.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { PICK_HOLD_MS } from "./kiosk-runs.js";
|
|
14
14
|
import { clock } from "./terragucci.js";
|
|
15
|
+
import { placeFloat } from "./float-place.js";
|
|
15
16
|
|
|
16
17
|
/** How many attribute lines the popover shows before "and N more". */
|
|
17
18
|
export const MAX_LINES = 6;
|
|
@@ -208,28 +209,11 @@ export function popReduce(s, ev, now) {
|
|
|
208
209
|
* that side, as near the card's top (or left) as the frame allows. When no
|
|
209
210
|
* side fits, the side with the most room, kept inside the frame. All boxes
|
|
210
211
|
* are `{ left, top, width, height }` in the frame's pixels.
|
|
212
|
+
* behold#764: the shared placement (web/float-place.js), so a card at the
|
|
213
|
+
* frame's very top never puts it off the top, and a popover taller than the
|
|
214
|
+
* frame gets `maxHeight` and scrolls.
|
|
211
215
|
*/
|
|
212
216
|
export function placePopover(card, pop, frame, { gap = 12, margin = 8 } = {}) {
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
const bottom = card.top + card.height;
|
|
216
|
-
const room = {
|
|
217
|
-
right: frame.width - margin - (right + gap),
|
|
218
|
-
left: card.left - gap - margin,
|
|
219
|
-
below: frame.height - margin - (bottom + gap),
|
|
220
|
-
above: card.top - gap - margin,
|
|
221
|
-
};
|
|
222
|
-
const at = (side) => {
|
|
223
|
-
if (side === "right") return { left: right + gap, top: clamp(card.top, margin, frame.height - margin - pop.height), side };
|
|
224
|
-
if (side === "left") return { left: card.left - gap - pop.width, top: clamp(card.top, margin, frame.height - margin - pop.height), side };
|
|
225
|
-
if (side === "below") return { left: clamp(card.left, margin, frame.width - margin - pop.width), top: bottom + gap, side };
|
|
226
|
-
return { left: clamp(card.left, margin, frame.width - margin - pop.width), top: card.top - gap - pop.height, side };
|
|
227
|
-
};
|
|
228
|
-
if (room.right >= pop.width) return at("right");
|
|
229
|
-
if (room.left >= pop.width) return at("left");
|
|
230
|
-
if (room.below >= pop.height) return at("below");
|
|
231
|
-
if (room.above >= pop.height) return at("above");
|
|
232
|
-
const best = Object.entries({ right: room.right / pop.width, left: room.left / pop.width, below: room.below / pop.height, above: room.above / pop.height }).sort((a, b) => b[1] - a[1])[0][0];
|
|
233
|
-
const p = at(best);
|
|
234
|
-
return { left: clamp(p.left, margin, frame.width - margin - pop.width), top: clamp(p.top, margin, frame.height - margin - pop.height), side: best };
|
|
217
|
+
const view = { left: frame.left || 0, top: frame.top || 0, width: frame.width, height: frame.height };
|
|
218
|
+
return placeFloat(card, pop, view, { gap, margin });
|
|
235
219
|
}
|
package/web/kiosk-vendor.js
CHANGED
|
@@ -247,6 +247,8 @@ export function scrubDemo(demo, tool) {
|
|
|
247
247
|
label: keep(demo.label) ?? "",
|
|
248
248
|
about: about && Object.keys(about).length ? about : null,
|
|
249
249
|
next: demo.next ? { ...demo.next, action: keep(demo.next.action) ?? "the next step" } : null,
|
|
250
|
+
// behold#757: a step's highlight goes whole when its title or body names a rival: half of it would read wrong.
|
|
251
|
+
...(demo.highlight ? { highlight: namesOther(demo.highlight.title, tool) || namesOther(demo.highlight.body, tool) ? null : demo.highlight } : {}),
|
|
250
252
|
};
|
|
251
253
|
}
|
|
252
254
|
|
package/web/kiosk-watch.js
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import { STEP_WORDS, focusRoots, matchingPull, matchingRun, scenarioHead, introText, aboutRows, nextWords, demoStage } from "./kiosk.js";
|
|
15
15
|
import { defaultJob, defaultStep, logLineWords, setupLine } from "./kiosk-runs.js";
|
|
16
16
|
import { backendLine, coneLine, coneOf } from "./cone.js";
|
|
17
|
+
import { placeFloat } from "./float-place.js";
|
|
17
18
|
|
|
18
19
|
/** The two modes, Watch first: it is the default. */
|
|
19
20
|
export const MODES = [
|
|
@@ -356,20 +357,26 @@ export function tailLines(runDoc, n = 2) {
|
|
|
356
357
|
/**
|
|
357
358
|
* Where an overlay of `size` goes beside `box` inside `view` (all pixels,
|
|
358
359
|
* `{x, y, w, h}`): to the right of the box when it fits, else to its left,
|
|
359
|
-
* else under it; its top level with the box's, kept inside the
|
|
360
|
-
* right it moves past any of `avoid` (the reads' labels) it
|
|
361
|
-
* `{ x, y, side }`, `side` "right", "left" or "
|
|
360
|
+
* else under it, else over it; its top level with the box's, kept inside the
|
|
361
|
+
* view. On the right it moves past any of `avoid` (the reads' labels) it
|
|
362
|
+
* would cover. `{ x, y, side }`, `side` "right", "left", "below" or "above".
|
|
363
|
+
* behold#764: never past the view's top or bottom. The job box's log drawer,
|
|
364
|
+
* opened, is taller than the graph above the caption at 1366x768, and was
|
|
365
|
+
* lifted 94px off the top; now it keeps the view's top, with `maxHeight` (the
|
|
366
|
+
* caller caps it there and its log scrolls) when it is taller than the view.
|
|
367
|
+
* No side with room: the side with the most (web/float-place.js).
|
|
362
368
|
*/
|
|
363
369
|
export function placeBeside(box, size, view, gap = 18, avoid = []) {
|
|
364
|
-
const
|
|
370
|
+
const fit = placeFloat({ left: box.x, top: box.y, width: box.w, height: box.h }, { width: size.w, height: size.h }, { left: view.x, top: view.y, width: view.w, height: view.h }, { sides: ["left", "below", "above", "right"], gap, margin: 8 });
|
|
371
|
+
const cap = fit.maxHeight ? { maxHeight: fit.maxHeight } : {};
|
|
372
|
+
const h = fit.maxHeight || size.h;
|
|
373
|
+
const top = Math.max(view.y + 8, Math.min(box.y, view.y + view.h - h - 8));
|
|
365
374
|
// Clear of the graph's own labels beside the box: past the right edge of any it would cover.
|
|
366
|
-
const over = (x) => avoid.filter((a) => a.x < x + size.w && a.x + a.w > x && a.y < top +
|
|
375
|
+
const over = (x) => avoid.filter((a) => a.x < x + size.w && a.x + a.w > x && a.y < top + h && a.y + a.h > top);
|
|
367
376
|
let right = box.x + box.w + gap;
|
|
368
377
|
for (let i = 0; i < 4 && over(right).length; i++) right = Math.max(...over(right).map((a) => a.x + a.w)) + gap / 2;
|
|
369
|
-
if (right + size.w <= view.x + view.w - 8) return { x: right, y: top, side: "right" };
|
|
370
|
-
|
|
371
|
-
const x = Math.max(view.x + 8, Math.min(box.x, view.x + view.w - size.w - 8));
|
|
372
|
-
return { x, y: Math.min(box.y + box.h + gap, view.y + view.h - size.h - 8), side: "below" };
|
|
378
|
+
if (right + size.w <= view.x + view.w - 8) return { x: right, y: top, side: "right", ...cap };
|
|
379
|
+
return { x: fit.left, y: fit.top, side: fit.side, ...cap };
|
|
373
380
|
}
|
|
374
381
|
|
|
375
382
|
// ---------------------------------------------------------------------------
|
package/web/kiosk.html
CHANGED
|
@@ -353,6 +353,8 @@
|
|
|
353
353
|
.k-what { font: 600 0.92em var(--font-ui); color: var(--pending); background: transparent; border: 0; padding: 0.1em 0.2em; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
|
|
354
354
|
#k-what-pop { position: absolute; top: 1.8em; right: 0; width: min(34em, calc(100vw - 32px)); padding: var(--s3) var(--s4); background: var(--surface-pane-b); color: var(--fg); border: 1px solid var(--focus);
|
|
355
355
|
border-radius: 8px; box-shadow: 0 6px 24px color-mix(in srgb, var(--shadow) 70%, transparent); font-size: 1.15em; line-height: 1.45; }
|
|
356
|
+
/* behold#764: never past the window's bottom on a short screen: it scrolls. */
|
|
357
|
+
#k-what-pop { max-height: calc(100vh - 4em); overflow-y: auto; overscroll-behavior: contain; }
|
|
356
358
|
#k-what-pop[hidden] { display: none; }
|
|
357
359
|
#k-what-pop p { margin: 0; }
|
|
358
360
|
#k-what-pop .k-what-more { margin-top: var(--s2); }
|
|
@@ -518,7 +520,13 @@
|
|
|
518
520
|
.k-notch { position: absolute; width: 14px; height: 14px; background: inherit; border: inherit; transform: rotate(45deg); top: 1.4em; }
|
|
519
521
|
.k-side-right > .k-notch { left: -9px; border-top: 0; border-right: 0; }
|
|
520
522
|
.k-side-left > .k-notch { right: -9px; border-bottom: 0; border-left: 0; }
|
|
521
|
-
.k-side-below > .k-notch { display: none; }
|
|
523
|
+
.k-side-below > .k-notch, .k-side-above > .k-notch { display: none; }
|
|
524
|
+
/* behold#764: an overlay taller than the graph's view is capped (placeBeside's maxHeight, .k-capped): the callout and
|
|
525
|
+
the result scroll (their notch goes: a scroller clips it), the drawer's log shrinks to fit and scrolls. */
|
|
526
|
+
.k-over.k-capped { overflow-y: auto; overscroll-behavior: contain; }
|
|
527
|
+
.k-over.k-capped > .k-notch { display: none; }
|
|
528
|
+
#k-drawer.k-capped { overflow: hidden; }
|
|
529
|
+
#k-drawer.k-open .k-drawer-body { flex: 1 1 auto; }
|
|
522
530
|
/* The running job's log, a drawer from the active wave's box: folded to its last lines, open on a hover or a click. */
|
|
523
531
|
#k-drawer { width: min(34em, 46vw); background: var(--surface-pane-a); border: 2px solid color-mix(in srgb, var(--pending) 80%, var(--fg)); border-radius: 10px; box-shadow: 0 10px 34px color-mix(in srgb, var(--shadow) 75%, transparent); display: flex; flex-direction: column; }
|
|
524
532
|
.k-drawer-head { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s3) var(--s4) var(--s1); background: transparent; border: 0; color: var(--fg); cursor: pointer; text-align: left; font: inherit; }
|