From 341be34b1f9b8bc1f8858bca951ddd04fe73cf1c Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Fri, 29 Aug 2025 09:48:45 +0200 Subject: [PATCH] feat(preview-comment): put x-ray at top if there are more than 7 changed icons to prevent them from being cut of (#3589) --- scripts/generateChangedIconsCommentMarkup.mts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/scripts/generateChangedIconsCommentMarkup.mts b/scripts/generateChangedIconsCommentMarkup.mts index 20bdb0a4a..e1cc65cb0 100644 --- a/scripts/generateChangedIconsCommentMarkup.mts +++ b/scripts/generateChangedIconsCommentMarkup.mts @@ -134,7 +134,15 @@ const readyToUseCode = changedFiles const commentMarkup = `\ ### Added or changed icons -${changeFiles2pxStrokeImageTags} +${ + changedFiles.length >= 8 + ? `
+Icon X-rays +${changeFilesXRayImageTags} +
+` + : '' +}${changeFiles2pxStrokeImageTags}
Preview cohesion ${cohesionSquaresImageTags}
@@ -157,11 +165,15 @@ ${changeFilesLowDPIImageTags24} ${changeFilesLowDPIImageTags32}

48px (default + retina)

${changeFilesLowDPIImageTags48} -
+${ + changedFiles.length < 8 + ? `
Icon X-rays ${changeFilesXRayImageTags} -
+` + : '' +}
Icon Diffs ${changeFilesDiffImageTags}