Skip to content

Material Symbols (rounded) icons on Android, matching desktop - #57

Merged
ingoau merged 1 commit into
mainfrom
claude/hocket-issue-41-estimate-6agvlq
Oct 10, 2026
Merged

ingoau merged 1 commit into
mainfrom
claude/hocket-issue-41-estimate-6agvlq

Conversation

@ingoau

@ingoau ingoau commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Closes #41.

Desktop

Already on Material Symbols Rounded since 96a8d61 (desktop/scripts/gen-icons.mjs → material-icons.ts, drawn by Icon.tsx). Re-running the generator gives a byte-identical file, and no renderer UI draws icons from unicode glyphs, so desktop needs no change here.

Android

Was on androidx.compose.material:material-icons-extended (the older Material Icons, Filled/Outlined styles).

  • scripts/gen-android-icons.mjs generates ui/icons/HocketIcons.kt from the same Iconify dataset desktop uses (@iconify-json/material-symbols, a desktop dev dependency). It emits only the 96 glyphs the app uses, as lazily built Compose ImageVectors.
  • HocketIcons copies androidx's Icons layout (Filled.X, Outlined.X, AutoMirrored.Filled.X) and keeps the same names, so each call site only changes Icons. to HocketIcons. across 29 files.
  • Filled → filled rounded, Outlined → outlined rounded. The bottom bar still shows the selected place by fill alone. Compose names that are themselves outlined glyphs (FavoriteBorder, StarOutline, ErrorOutline, RemoveCircleOutline) map to the symbol's outlined form. AutoMirrored icons keep autoMirror = true so they flip in right-to-left layouts.
  • Removed the material-icons-extended dependency.
  • New test, HocketIconsTest, builds every icon (so a path the parser can't read fails in CI). It checks each is a 24dp vector, that it mirrors exactly when it's in an AutoMirrored group, and that filled and outlined Home differ.
  • README: added a short Icons section in android/README.md.

Path data

Iconify's SVG paths are minified (q0-.475.213-.9). The generator rewrites them with explicit separators so Compose's parser never has to split numbers that run together. I rendered all 16,422 Material Symbols paths in Chromium before and after the rewrite: every one is pixel-identical.

Not verified locally

There's no Android SDK in the environment I worked in, so I haven't compiled this or looked at it on a device; CI is the first compile. Worth a quick look on a device at:

  • the bottom bar, selected vs. unselected
  • the player controls
  • the back arrows in a right-to-left locale

🤖 Generated with Claude Code

https://claude.ai/code/session_01NuB6eB6f9VjDfxTSEfsRQy


Generated by Claude Code

Desktop already draws Material Symbols Rounded (scripts in desktop/scripts/gen-icons.mjs).
Android used androidx material-icons-extended (the older Material Icons, filled/outlined
styles). scripts/gen-android-icons.mjs now generates ui/icons/HocketIcons.kt from the same
Iconify dataset: the 96 glyphs the app uses, as lazy Compose ImageVectors, with filled and
outlined rounded variants so the bottom bar keeps marking the selected place by fill.
HocketIcons mirrors androidx's Icons layout, so call sites only swap the receiver.

Path data is re-spelled with explicit separators; every Material Symbols path renders
pixel-identical before and after in Chromium. Drops the material-icons-extended dependency.

Closes #41

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NuB6eB6f9VjDfxTSEfsRQy
@ingoau
ingoau merged commit 7a5efe4 into main Oct 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to material rounded icons

2 participants