Skip to content

M4-05 Icons in the design system

No Date Ruling Reason
D-M4-05-0 2026-10-17 The ticket was built on an integration base and ported onto main with only its own commits; the English docs and spec of main win, and text this ticket adds is English. The lock keeps vector_graphics_compiler 1.3.1, the version the ticket measured and generated the assets with; http, which vector_graphics brings, already has its license override from M4-06, whose reason now names both users. The tickets are built in parallel on integration bases; main takes each ticket as one pull request; merged names win (D-W-100).
D-M4-05-1 2026-10-15 The icons ship as vector_graphics_compiler assets (assets/icons/<weight>/<glyph>.vec), not as an icon font. Measured on 128 glyphs at 16, 20 and 24 px and ratios 1 and 2 against the flutter_svg render: vectors 0 % mean alpha difference everywhere, the font 2.97 % mean and up to 47.1 % in one pixel at 16 px x1 (table in docs/design/icons.md "Integration (M4-05)"); 74,608 bytes for the vectors against 34,564 for the font. Design note 1: the clearly sharper candidate at 16 px wins, the size only decides a tie. vector_graphics is maintained by the Flutter team (BSD-3-Clause).
D-M4-05-2 2026-10-15 The icon assets, their lookup file, LICENSE and MANIFEST.json are generated by the token tool (tokens.py icons, part of build); check rebuilds them in memory and compares byte for byte, an extra file under assets/icons/ is stale too. The compiler runs from the workspace lock with the mask, clip and overdraw optimizers off. docs/design/icons.md names icon.tokens.json as the single source; the optimizers need the native path-ops library of the host, and Phosphor glyphs have no masks or clips, so turning them off keeps the bytes the same on every host.
D-M4-05-3 2026-10-15 The assets hold every mapped glyph in its mapped weight and in fill, and every space icon in regular; tokens.py vendor copies exactly these SVGs and no longer requires --sans and --mono (without them vendor/fonts/ stays as it is). Design note 3: the golden and DsIcon(filled: true) need the active form of every icon; a new icon should need only the Phosphor package.
D-M4-05-4 2026-10-15 A spinning glyph rotates once per motion.duration.pulse, and only while the ambient DsMotion has a positive pulse, which only the full context has (the reduced one is zero); otherwise no AnimationController exists. No dedicated token exists, and adding one would change the token files of M0-01's gate (design note 4). The pulse test also holds during a theme animation, when AnimatedTheme lerps a new DsMotion instance that is not identical to DsMotion.full.
D-M4-05-5 2026-10-15 DsIcon throws an ArgumentError without a non-empty label and without decorative: true in debug and in release (no separate assert); an empty label counts as none. DsIconSizeRole is a new enum of this ticket (the brief names it, the generated code has only DsIconSize). testing.dart gains dsPumpIcons, so flutter_test (SDK) becomes a regular dependency like alchemist, and DsIconPlaceholder is public so the helper can wait for it. The lookup class is DsIconAssets with lookup(glyph, {filled}) and space(name), returning the asset path. One rule in every build mode; an empty label gives no screen reader text. Vector assets load asynchronously, and every member with icons in a golden needs the same wait.
D-M4-05-6 2026-10-17 The pre-push hook runs make check as env -u GIT_DIR -u GIT_WORK_TREE -u GIT_INDEX_FILE -u GIT_COMMON_DIR -u GIT_PREFIX make check; tools/hooks/tests/test_pre_push_env.py runs the hook's prefix with the five variables set and holds that none reaches the command. The per-tool removals (D-M2-38-22, codegen_check.py, dart_api_docs.py) stay. Fourth tool with the same failure: tokens.py runs dart run vector_graphics_compiler, and under the hook the Dart SDK read its version from this repository's GIT_DIR and refused the workspace ("requires the Flutter SDK"), so the token gate failed in every pre-push run while it passed in CI. One rule at the hook covers every gate instead of each tool.