From 1d0b27b4c51d612638acf0c2eb71acfed2d1d5eb Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 20 Jun 2026 20:19:54 +0900 Subject: [PATCH] Update frontend-js-size.yml --- .github/workflows/frontend-js-size.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/frontend-js-size.yml b/.github/workflows/frontend-js-size.yml index 287249df2a..9d9cd48c04 100644 --- a/.github/workflows/frontend-js-size.yml +++ b/.github/workflows/frontend-js-size.yml @@ -156,7 +156,7 @@ jobs: if (diff === 0) return `0%`; const percent = Math.round(diff / beforeSize * 100); const color = diff > 0 ? 'orange' : 'green'; - return `$\\color{${color}}{\\text{${formatMathText(percent.toString())}}}$`; + return `$\\color{${color}}{\\text{${formatMathText(percent.toString() + '%')}}}$`; } function escapeCell(value) { @@ -374,7 +374,10 @@ jobs: ]); const startupComparisonRows = getChunkComparisonRows([...startupKeys], before, after); const startupRows = startupComparisonRows - .sort((a, b) => b.sortSize - a.sortSize || a.name.localeCompare(b.name)); + .sort((a, b) => Math.abs(b.afterSize - b.beforeSize) - Math.abs(a.afterSize - a.beforeSize) + || (b.afterSize - b.beforeSize) - (a.afterSize - a.beforeSize) + || b.sortSize - a.sortSize + || a.name.localeCompare(b.name)); const startupTotal = { beforeSize: startupComparisonRows.reduce((sum, row) => sum + row.beforeSize, 0), afterSize: startupComparisonRows.reduce((sum, row) => sum + row.afterSize, 0),