From 6d6590801f4e551209955f0c80c1b9a53b5906ff Mon Sep 17 00:00:00 2001 From: Aaron Klinker Date: Fri, 19 Jan 2024 08:56:12 -0600 Subject: [PATCH] feat: Display +/- count of generated code while hovering --- src/components/createDiffComponent.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/createDiffComponent.ts b/src/components/createDiffComponent.ts index eb9e517..09baae9 100644 --- a/src/components/createDiffComponent.ts +++ b/src/components/createDiffComponent.ts @@ -47,6 +47,9 @@ export function createDiffComponent(options: { generated.id = DIFF_COMPONENT_ID; generated.textContent = options.getGeneratedText(stats.exclude.changes); generated.style.color = GREY_COLOR; + const generatedAdditionsText = `+${stats.exclude.additions}`; + const generatedDeletionsText = `−${stats.exclude.deletions}`; + generated.title = `${generatedAdditionsText} ${generatedDeletionsText}`; spinner.replaceWith(generated); } else { hideSpinner();