From 2bb17b170e2107e50921a2240ceb372289bbe7c4 Mon Sep 17 00:00:00 2001 From: Twest2 Date: Mon, 15 Jun 2026 09:46:31 -0500 Subject: [PATCH] Use display labels for annotation types in the Annotations list and copy-style text The per-annotation list cards and the "Copy this style to every other ... annotation" text/tooltips were still showing raw type ids (rect, arrow, etc). Use ANNOTATION_TYPE_LABELS for these too. --- app/renderer/editor.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/renderer/editor.js b/app/renderer/editor.js index 5cd17da..d621edc 100644 --- a/app/renderer/editor.js +++ b/app/renderer/editor.js @@ -962,7 +962,7 @@ class GuideEditor { dataset: { annId: ann.id }, style: { cursor: 'pointer', borderColor: selected ? 'var(--accent)' : '' }, }, - el('div.row', {}, el('strong', {}, ann.type), el('span.muted', {}, ann.text || ann.value || '')), + el('div.row', {}, el('strong', {}, ANNOTATION_TYPE_LABELS[ann.type] || ann.type), el('span.muted', {}, ann.text || ann.value || '')), el('div.muted', {}, `${ann.x.toFixed(3)}, ${ann.y.toFixed(3)} · ${ann.w.toFixed(3)} × ${ann.h.toFixed(3)}`))); } } @@ -1013,6 +1013,7 @@ class GuideEditor { const fields = new Set(ANNOTATION_FIELDS[selected.type] || []); const strokeLabel = (selected.type === 'text' || selected.type === 'number') ? 'Color' : 'Stroke'; + const typeLabel = ANNOTATION_TYPE_LABELS[selected.type] || selected.type; const rows = [labeledRow('Type', typeSelect)]; if (fields.has('text')) rows.push(labeledRow('Text', textInput)); @@ -1026,16 +1027,16 @@ class GuideEditor { if (fields.has('radius')) rows.push(labeledRow('Radius', radiusInput)); if (fields.has('tail')) rows.push(labeledRow('Tail', tailInput)); rows.push( - el('div.muted', {}, `Copy this style to every other "${selected.type}" annotation:`), + el('div.muted', {}, `Copy this style to every other "${typeLabel}" annotation:`), el('div.row', {}, el('button', { type: 'button', - title: `Overwrite the style of every "${selected.type}" annotation on this step with the style shown above.`, + title: `Overwrite the style of every "${typeLabel}" annotation on this step with the style shown above.`, onClick: () => this.applyStyleAcross('step'), }, 'This step'), el('button', { type: 'button', - title: `Overwrite the style of every "${selected.type}" annotation across all steps in this guide with the style shown above.`, + title: `Overwrite the style of every "${typeLabel}" annotation across all steps in this guide with the style shown above.`, onClick: () => this.applyStyleAcross('guide'), }, 'Entire guide'), ),