diff --git a/app/figma-plugin/src/main.ts b/app/figma-plugin/src/main.ts index 9f3ff4e8..da63264d 100644 --- a/app/figma-plugin/src/main.ts +++ b/app/figma-plugin/src/main.ts @@ -452,50 +452,6 @@ figma.ui.onmessage = async (msg: { type: string }) => { }); } - if (msg.type === "analyze-page") { - const page = figma.currentPage; - const children = page.children; - - if (children.length === 0) { - figma.ui.postMessage({ - type: "error", - message: "Current page is empty.", - }); - return; - } - - // Wrap page children into a virtual FRAME document node - const allChildren: AnalysisNode[] = []; - let totalNodes = 0; - - for (const child of children) { - totalNodes += countNodes(child as unknown as { children?: readonly unknown[] }); - allChildren.push(await transformPluginNode(child)); - } - - const file: AnalysisFile = { - fileKey: figma.fileKey ?? "plugin-local", - name: page.name, - lastModified: new Date().toISOString(), - version: "plugin", - document: { - id: page.id, - name: page.name, - type: "CANVAS", - visible: true, - children: allChildren, - }, - components: {}, - styles: {}, - }; - - figma.ui.postMessage({ - type: "result", - data: file, - nodeCount: totalNodes, - }); - } - if (msg.type === "focus-node") { const { nodeId } = msg as { type: string; nodeId: string }; const node = figma.getNodeByIdAsync(nodeId).then((n) => { diff --git a/app/figma-plugin/src/ui.template.html b/app/figma-plugin/src/ui.template.html index 838cbcb7..77021b42 100644 --- a/app/figma-plugin/src/ui.template.html +++ b/app/figma-plugin/src/ui.template.html @@ -17,7 +17,6 @@
-
@@ -26,8 +25,7 @@

Ready to analyze

-

Select a frame, component, or section in Figma, then click Analyze Selection.
- Or click Analyze Page to check the entire current page.

+

Select a frame, component, or section in Figma, then click Analyze Selection.

@@ -102,11 +100,6 @@

Ready to analyze

parent.postMessage({ pluginMessage: { type: 'analyze-selection' } }, '*'); } - function analyzePage() { - showLoading(); - parent.postMessage({ pluginMessage: { type: 'analyze-page' } }, '*'); - } - function showLoading() { document.getElementById('empty-state').style.display = 'none'; document.getElementById('results').className = ''; @@ -114,7 +107,6 @@

Ready to analyze

document.getElementById('loading').style.display = 'block'; document.getElementById('error').style.display = 'none'; document.getElementById('btn-selection').disabled = true; - document.getElementById('btn-page').disabled = true; } function showError(msg) { @@ -127,7 +119,6 @@

Ready to analyze

errEl.textContent = msg; errEl.style.display = 'block'; document.getElementById('btn-selection').disabled = false; - document.getElementById('btn-page').disabled = false; } // ---- Render results via shared renderReportBody() ---- @@ -172,8 +163,7 @@

Ready to analyze

if (msg.type === 'result') { document.getElementById('btn-selection').disabled = false; - document.getElementById('btn-page').disabled = false; - + try { var analysisStart = Date.now(); var file = msg.data; diff --git a/app/shared/styles.css b/app/shared/styles.css index ae6c5a7b..e7ffa59a 100644 --- a/app/shared/styles.css +++ b/app/shared/styles.css @@ -338,13 +338,6 @@ body { text-align: center; } -/* ---- Gauge item active highlight ---- */ -.rpt-gauge-item.active { - opacity: 1; - background: rgba(0,0,0,0.04); - border-radius: var(--radius); -} - /* ---- Score badge ---- */ .rpt-badge { display: inline-flex; diff --git a/src/core/report-html/render.ts b/src/core/report-html/render.ts index eccd44bf..edf238a4 100644 --- a/src/core/report-html/render.ts +++ b/src/core/report-html/render.ts @@ -76,9 +76,9 @@ export function renderReportBody(data: ReportData): string {
-${CATEGORIES.map((cat, i) => { +${CATEGORIES.map((cat) => { const cs = scores.byCategory[cat]; - return `