From 680bd58442728e6c59acf714ba04a96727712fa7 Mon Sep 17 00:00:00 2001 From: Eric Tuvesson Date: Wed, 8 Jan 2025 22:02:10 +0100 Subject: [PATCH] chore: Update "Used in x places" text (#84) We cannot guarantee that this is always correct since there is repeaters and dynamic repeaters etc, but this can give a hint to how many times a component is used. --- .../src/views/panels/componentspanel/ComponentsPanel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/noodl-editor/src/editor/src/views/panels/componentspanel/ComponentsPanel.ts b/packages/noodl-editor/src/editor/src/views/panels/componentspanel/ComponentsPanel.ts index a358c6b..47c5a56 100644 --- a/packages/noodl-editor/src/editor/src/views/panels/componentspanel/ComponentsPanel.ts +++ b/packages/noodl-editor/src/editor/src/views/panels/componentspanel/ComponentsPanel.ts @@ -991,7 +991,7 @@ export class ComponentsPanelView extends View { // Find references const nodeReference = HACK_findNodeReference(scope.comp.name); - const nodeReferencesText = `Used in ${nodeReference?.referenaces?.length || 0} places`; + const nodeReferencesText = `Used in ~${nodeReference?.referenaces?.length || 0} places`; items = items.concat([ { @@ -1122,7 +1122,7 @@ export class ComponentsPanelView extends View { if (scope.canBecomeRoot) { // Find references const nodeReference = HACK_findNodeReference(scope.folder.component.name); - const nodeReferencesText = `Used in ${nodeReference?.referenaces?.length || 0} places`; + const nodeReferencesText = `Used in ~${nodeReference?.referenaces?.length || 0} places`; items = items.concat([{ label: nodeReferencesText