Switch icon generation to official Material Symbols rounded 24px source #3

Merged
Copilot merged 6 commits from copilot/fix-generate-icons-script into main 2026-06-23 19:41:44 +00:00
Copilot commented 2026-06-23 19:41:29 +00:00 (Migrated from github.com)

The icon generator was sourcing assets from an outdated npm package instead of Google’s upstream repository. This updates generation to read directly from the official Material Symbols source and align the output with the current flat symbol catalog.

  • Source of truth

    • Replace package-based extraction with a clone of google/material-design-icons
    • Read from symbols/web/*/materialsymbolsrounded/
    • Select only the default rounded 24px asset for each symbol ({icon}_24px.svg), excluding weight/grade/fill variants
  • Generated output shape

    • Collapse per-category output into a single generated module:
      • src/material/material-symbols-rounded.ts
    • Remove legacy categorized generated files that no longer match the upstream structure
  • Consumer updates

    • Rewrite src/index.ts to export the single flat symbol module
    • Rewrite src/trials.ts to load the flat symbol set instead of category buckets
  • Generator behavior

    • Use sparse checkout against the upstream repo to limit checkout scope to the rounded 24px symbol files
    • Regenerate exports with stable symbol naming: material_<icon_name>_rounded

Example of the new selection model:

symbols/web/chess_pawn/materialsymbolsrounded/chess_pawn_24px.svg

Which generates:

export const material_chess_pawn_rounded = generate_function(
  "material_chess_pawn_rounded",
  "<svg ... />",
);
The icon generator was sourcing assets from an outdated npm package instead of Google’s upstream repository. This updates generation to read directly from the official Material Symbols source and align the output with the current flat symbol catalog. - **Source of truth** - Replace package-based extraction with a clone of `google/material-design-icons` - Read from `symbols/web/*/materialsymbolsrounded/` - Select only the default rounded 24px asset for each symbol (`{icon}_24px.svg`), excluding weight/grade/fill variants - **Generated output shape** - Collapse per-category output into a single generated module: - `src/material/material-symbols-rounded.ts` - Remove legacy categorized generated files that no longer match the upstream structure - **Consumer updates** - Rewrite `src/index.ts` to export the single flat symbol module - Rewrite `src/trials.ts` to load the flat symbol set instead of category buckets - **Generator behavior** - Use sparse checkout against the upstream repo to limit checkout scope to the rounded 24px symbol files - Regenerate exports with stable symbol naming: `material_<icon_name>_rounded` Example of the new selection model: ```txt symbols/web/chess_pawn/materialsymbolsrounded/chess_pawn_24px.svg ``` Which generates: ```ts export const material_chess_pawn_rounded = generate_function( "material_chess_pawn_rounded", "<svg ... />", ); ```
Sign in to join this conversation.
No description provided.