PaneCP article label + PaneFO editable property rows
Article entries in the CP path list now show the article label (letter/extension) instead of just "article", with a property count in the meta column. In the FO pane, each property is rendered as an editable row: key input, value input (coerced via ast-parser.coerce), scope toggle, morphing default/overwrite label, and per-row remove button. A "+ add property" button appends a blank defaults entry. Every edit marks the score dirty. `coerce` is now exported from ast-parser.js so the FO pane can apply the same type-inference rules to user input as the parser does to AST values.
This commit is contained in:
@@ -34,6 +34,10 @@ function shortView(node) {
|
||||
return { typeTag: 'motif', label: node.label, meta: node.isStatic ? [{ key: 'static', value: '✓' }] : [] };
|
||||
case 'stem_note':
|
||||
return { typeTag: 'stem_note', label: String(node.pitch), meta: [] };
|
||||
case 'article': {
|
||||
const n = node.properties?.length ?? 0;
|
||||
return { typeTag: 'article', label: node.name, meta: n ? [{ key: 'props', value: n }] : [] };
|
||||
}
|
||||
default:
|
||||
return { typeTag: node.type, label: node.type, meta: [] };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user