Skip to content

Commit 364b620

Browse files
authored
fix(ui): include vuetify radiobox icons (#6892)
Add the radiobox icons used indirectly by Vuetify internals to the required MDI subset so they are kept during font generation. Regenerate the subset CSS and font files to prevent missing radio button icons at runtime.
1 parent 2e16281 commit 364b620

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

dashboard/scripts/subset-mdi-font.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ const UTILITY_CLASSES = new Set([
3333
"mdi-18px", "mdi-24px", "mdi-36px", "mdi-48px",
3434
]);
3535

36+
// Icons used indirectly by Vuetify internals, so they won't appear in src/ static scans.
37+
const REQUIRED_ICONS = new Set([
38+
"mdi-radiobox-blank",
39+
"mdi-radiobox-marked",
40+
]);
41+
3642
// Regex to match individual icon class definitions in MDI CSS
3743
export const ICON_CLASS_PATTERN = /\.(mdi-[a-z][a-z0-9-]*)::before\s*\{\s*content:\s*"\\([0-9A-Fa-f]+)"\s*;?\s*}/g;
3844

@@ -53,7 +59,7 @@ export function* collectFiles(dir, exts) {
5359
/** Scan source files and return a Set of used mdi-* icon names. */
5460
export function scanUsedIcons(sourceFiles) {
5561
const iconPattern = /mdi-[a-z][a-z0-9-]*/g;
56-
const usedIcons = new Set();
62+
const usedIcons = new Set(REQUIRED_ICONS);
5763
for (const file of sourceFiles) {
5864
const content = readFileSync(file, "utf-8");
5965
for (const match of content.matchAll(iconPattern)) {

dashboard/src/assets/mdi-subset/materialdesignicons-subset.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Auto-generated MDI subset – 235 icons */
1+
/* Auto-generated MDI subset – 237 icons */
22
/* Do not edit manually. Run: pnpm run subset-icons */
33

44
@font-face {
@@ -744,6 +744,14 @@
744744
content: "\F0432";
745745
}
746746

747+
.mdi-radiobox-blank::before {
748+
content: "\F043D";
749+
}
750+
751+
.mdi-radiobox-marked::before {
752+
content: "\F043E";
753+
}
754+
747755
.mdi-refresh::before {
748756
content: "\F0450";
749757
}
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)