This commit is contained in:
Mateusz Gruszczyński committed 2026-11-07 15:26:06 +01:00
1 parent 6d7f152a0b
commit 064772765b
24 files changed
+418 -67

No files matched your search

+24
View File
@@ -47,4 +47,28 @@ for (const icon of ["plus", "save", "check", "trash", "edit", "refresh", "settin
assert.ok(new RegExp(`\\b${icon}:`).test(icons), `missing semantic SVG icon definition: ${icon}`);
}
// 0.36.2 semantic review: verbs/explicit ids must win over colliding keywords.
const explicitIcons = { "overview-layout-unlock": "unlock", "overview-inline-save": "lock", "overview-layout-open": "layers", "docker-settings-open": "settings", "login-submit": "login", "revoke-sessions": "logout", "about-open": "info" };
for (const [id, icon] of Object.entries(explicitIcons)) assert.match(icons, new RegExp(`"${id}": "${icon}"`), `${id} must use ${icon}`);
assert.match(icons, /\(\^\|\[\^p\]\)reset/, "preset buttons must not match the reset rule");
assert.match(icons, /UI_GLYPH_LABEL/);
assert.match(icons, /raw === key/, "English labels equal to their key must still count as translated");
for (const icon of ["unlock", "layers", "expand", "collapse", "ban", "eraser", "hash", "info", "plug", "transfer", "mapPin", "compare"]) {
assert.ok(new RegExp(`\\b${icon}:`).test(icons), `missing semantic SVG icon definition: ${icon}`);
}
const logo = read("src/admin/web/app/logo-animation.js");
const router = read("src/admin/router.rs");
const shellCss = read("src/admin/web/css/20-shell.css");
assert.match(html, /id="ui-logo-animation"[^>]*type="checkbox"/);
assert.match(router, /web\/app\/logo-animation\.js/);
assert.match(preferences, /logo_animation:\s*false/);
assert.match(preferences, /applyAdminLogoAnimation\(value\.logo_animation\)/);
assert.match(preferences, /saveAppearancePreference\(\{ logo_animation: next \}/);
assert.match(logo, /prefers-reduced-motion: reduce/);
assert.match(logo, /document\.hidden/);
assert.match(shellCss, /prefers-reduced-motion: reduce[\s\S]*data-logo-effect/);
assert.equal(openapi.components.schemas.AdminPreferences.properties.logo_animation.default, false);
assert.ok(pl.translations.logoAnimation && pl.translations.logoAnimationHelp);
console.log("Panel SVG icon preference contract: OK");