From 839ea3f95c8c3f55d622c4299788fd599e20af85 Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Tue, 23 Jun 2026 17:38:08 +0200 Subject: [PATCH] Show full score top-level in SubObjects: info, tuning, articles, stage, instruments, bars --- static/components/PaneSubObjects.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/static/components/PaneSubObjects.js b/static/components/PaneSubObjects.js index e6ea600..6c1de30 100644 --- a/static/components/PaneSubObjects.js +++ b/static/components/PaneSubObjects.js @@ -13,10 +13,20 @@ export const PaneSubObjects = { function subItems(node) { if (!node) return []; if (node.type === 'score') { - return [ - ...node.instruments.map(i => ({ kind: 'instrument', node: i, label: i.name })), - ...node.bars.map(b => ({ kind: 'bar', node: b, label: b.id })), - ]; + const items = []; + if (node.info) + items.push({ kind: 'info', node: node.info, label: node.info.title ?? '(no title)', hasChildren: false }); + if (node.tuning) + items.push({ kind: 'tuning', node: node.tuning, label: `base ${node.tuning.base ?? '?'}`, hasChildren: false }); + for (const a of (node.articles ?? [])) + items.push({ kind: 'article', node: a, label: a.name, hasChildren: false }); + for (const sv of (node.stageVoices ?? [])) + items.push({ kind: 'stage', node: sv, label: sv.name, hasChildren: false }); + for (const i of node.instruments) + items.push({ kind: 'instrument', node: i, label: i.name, hasChildren: true }); + for (const b of node.bars) + items.push({ kind: 'bar', node: b, label: b.id, hasChildren: false }); + return items; } if (node.type === 'instrument') { return node.variations.map((v, idx) => ({ @@ -56,7 +66,7 @@ export const PaneSubObjects = { label: item.label, typeTag: item.kind, focused: props.store.focusPath.includes(item.node), - hasChildren: item.kind !== 'bar' && item.kind !== 'voice', + hasChildren: item.hasChildren ?? (item.kind !== 'bar' && item.kind !== 'voice'), onFocus: () => props.store.pushFocus(item.node), onDrillDown: () => props.store.pushFocus(item.node), })