Skip to content

Commit 50da16e

Browse files
qfaiCopilot
andauthored
fix(validation): downgrade missing thumbnail to warning when sample not in config (#1714)
When a sample is not found in samples-config-v3.json, the missing thumbnail is a warning (not an error) since the sample is not in the gallery anyway. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 053da8a commit 50da16e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

validation-tool/src/validators/imageValidator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ export default async function validateImage(projectDir: string): Promise<Result>
7272
if (dimensions.width && dimensions.height && dimensions.width / dimensions.height === 40/23) {
7373
result.passed.push(`assets/thumbnail.${ext} has 1600*920/800*460 resolution or same ratio.`);
7474
} else {
75-
result.failed.push(`assets/thumbnail.${ext} must have 1600*920/800*460 resolution or same ratio (40:23 aspect ratio). Current: ${dimensions.width}x${dimensions.height}.`);
75+
result.warning.push(`assets/thumbnail.${ext} must have 1600*920/800*460 resolution or same ratio (40:23 aspect ratio). Current: ${dimensions.width}x${dimensions.height}.`);
7676
}
7777
break;
7878
}
7979
}
8080
if (!thumbnailFound) {
81-
result.failed.push(`Thumbnail image is required to display in sample gallery. Please add thumbnailPath to samples-config-v3.json or add assets/thumbnail.png.`);
81+
result.warning.push(`Thumbnail image not found. Add thumbnailPath to samples-config-v3.json or add assets/thumbnail.png to include this sample in the gallery.`);
8282
}
8383
}
8484

0 commit comments

Comments
 (0)