@rig-c/review 1.16.2 → 1.16.3
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/package.json +1 -1
- package/web/direction-panel.ts +18 -9
- package/web/styles.css +7 -1
- package/web/workspace-ui.ts +2 -1
package/package.json
CHANGED
package/web/direction-panel.ts
CHANGED
|
@@ -42,8 +42,18 @@ export function bindDirectionPanel(before: HTMLElement, read: () => DirectionVie
|
|
|
42
42
|
host.hidden = true;
|
|
43
43
|
const title = document.createElement('summary');
|
|
44
44
|
const body = document.createElement('div');
|
|
45
|
+
const metadata = document.createElement('div');
|
|
46
|
+
const details = document.createElement('details');
|
|
47
|
+
details.id = 'direction-authored-keys';
|
|
48
|
+
details.hidden = true;
|
|
49
|
+
const summary = document.createElement('summary');
|
|
50
|
+
const keys = document.createElement('pre');
|
|
51
|
+
keys.id = 'direction-authored-body';
|
|
52
|
+
summary.setAttribute('aria-controls', keys.id);
|
|
53
|
+
details.append(summary);
|
|
54
|
+
body.append(metadata, details);
|
|
45
55
|
host.append(title, body);
|
|
46
|
-
before.before(host);
|
|
56
|
+
before.before(host, keys);
|
|
47
57
|
function refresh() {
|
|
48
58
|
if (host.hidden) return;
|
|
49
59
|
const view = read();
|
|
@@ -55,7 +65,7 @@ export function bindDirectionPanel(before: HTMLElement, read: () => DirectionVie
|
|
|
55
65
|
});
|
|
56
66
|
const list = document.createElement('ul');
|
|
57
67
|
list.append(...rows);
|
|
58
|
-
|
|
68
|
+
metadata.replaceChildren(list);
|
|
59
69
|
if (view.sets.length) {
|
|
60
70
|
const label = document.createElement('label');
|
|
61
71
|
label.textContent = t('direction.chooseSet');
|
|
@@ -69,23 +79,22 @@ export function bindDirectionPanel(before: HTMLElement, read: () => DirectionVie
|
|
|
69
79
|
picker.value = view.activeSet ?? '';
|
|
70
80
|
picker.onchange = () => set(picker.value);
|
|
71
81
|
label.append(picker);
|
|
72
|
-
|
|
82
|
+
metadata.append(label);
|
|
73
83
|
}
|
|
74
84
|
if (view.model?.inspected && view.authored) {
|
|
75
85
|
const { camera, timing, take } = view.authored;
|
|
76
|
-
const details = document.createElement('details');
|
|
77
|
-
const summary = document.createElement('summary');
|
|
78
86
|
summary.textContent = t('direction.keys');
|
|
79
|
-
const keys = document.createElement('pre');
|
|
80
87
|
keys.textContent = JSON.stringify({ camera, timing, take }, null, 2);
|
|
81
|
-
details.
|
|
82
|
-
|
|
88
|
+
details.hidden = false;
|
|
89
|
+
} else {
|
|
90
|
+
details.hidden = true;
|
|
91
|
+
keys.textContent = '';
|
|
83
92
|
}
|
|
84
93
|
}
|
|
85
94
|
const language = onLanguageChange(refresh);
|
|
86
95
|
return {
|
|
87
96
|
refresh,
|
|
88
97
|
show(active: boolean) { host.hidden = !active; refresh(); },
|
|
89
|
-
dispose() { language(); host.remove(); },
|
|
98
|
+
dispose() { language(); host.remove(); keys.remove(); },
|
|
90
99
|
};
|
|
91
100
|
}
|
package/web/styles.css
CHANGED
|
@@ -417,7 +417,13 @@ main{position:relative}.toolbar{anchor-name:--stage-comment-bar}#stage-comment{w
|
|
|
417
417
|
:root[data-inspection-stage="2"] #mode-build-picker,:root[data-inspection-stage="4"] #mode-build-picker{display:none!important}
|
|
418
418
|
#direction-panel{flex:none;max-height:40%;overflow:auto;padding:.5rem .75rem;overflow-wrap:anywhere}
|
|
419
419
|
#direction-panel ul{margin:.4rem 0;padding-inline-start:1.4rem}
|
|
420
|
-
#direction-
|
|
420
|
+
#direction-authored-body{display:none;flex:1;min-height:0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:.75rem}
|
|
421
|
+
#direction-panel[open]:not([hidden]):has(#direction-authored-keys[open]:not([hidden])) + #direction-authored-body{
|
|
422
|
+
display:block
|
|
423
|
+
}
|
|
424
|
+
#direction-panel[open]:not([hidden]):has(#direction-authored-keys[open]:not([hidden])) + #direction-authored-body ~ #stage-layout{
|
|
425
|
+
display:none
|
|
426
|
+
}
|
|
421
427
|
.review-stage-panel.with-interview {
|
|
422
428
|
display: grid;
|
|
423
429
|
grid-template: min-content minmax(240px, 1fr) / minmax(0, 1fr) minmax(0, 1fr);
|
package/web/workspace-ui.ts
CHANGED
|
@@ -81,7 +81,8 @@ export function bindWorkspaceUI(options:{changed:()=>void;defaultTheme:(theme:Wo
|
|
|
81
81
|
if(disposed||applying)return;applying=true;
|
|
82
82
|
try{
|
|
83
83
|
// Chrome shares the center width. It is not charged against the actual stage minimum.
|
|
84
|
-
|
|
84
|
+
// Authored JSON can fill the same slot as the rig while Direction metadata stays above it.
|
|
85
|
+
const chrome=[...stack.children].filter(node=>node!==stage&&node.id!=='direction-authored-body'&&!((node as HTMLElement).hidden)).reduce((sum,node)=>sum+(node as HTMLElement).getBoundingClientRect().height,0);
|
|
85
86
|
available={width:Math.max(0,layout.clientWidth),height:Math.max(0,layout.clientHeight-chrome)};effective=allocateWorkspaceLayout(available,desired,columns);
|
|
86
87
|
const mode=(panel:WorkspacePanel)=>effective[panel==='leftWidth'?'leftMode':panel==='rightWidth'?'rightMode':'inspectorMode'];
|
|
87
88
|
for(const panel of present)dock(panel,mode(panel)==='drawer');
|