Skip to content

Tags: add a visual icon picker for tag icons#40

Merged
StuartMeeks merged 1 commit into
mainfrom
feat/icon-picker
Jun 1, 2026
Merged

Tags: add a visual icon picker for tag icons#40
StuartMeeks merged 1 commit into
mainfrom
feat/icon-picker

Conversation

@StuartMeeks

Copy link
Copy Markdown
Owner

What & why

Tag icons were set by typing a raw Segoe Fluent Icons glyph or its hex code point — unfriendly, and with no way to browse what's available. This adds a visual picker: a searchable grid of icons you click to choose, driven from the Tags view.

Smoke-tested by Stuart and looks good.

How it works

  • Each row in the Tags view gains a Choose… button that opens GlyphPickerDialog — a virtualised GridView of FontIcons with a search box that filters by name, keyword or code point (e.g. folder, run, E80F). Pick via single-select + Choose, or double-tap a glyph.
  • The free-text field stays as the escape hatch for pasting a glyph directly. Selection still flows through the existing GlyphInput.Resolve and stored-character model, so persistence is unchanged.
  • The catalogue is a curated 50-glyph set in appsettings.json beside the app (code point + friendly name + search keywords). The picker re-reads the file each time it opens, so adding/removing entries takes effect with no rebuild. Code points were grounded against the official Segoe Fluent Icons font list rather than guessed.

Architecture

Respects the one-way Core → App boundary:

  • Core (UI-free, testable): GlyphCatalogueEntry model, IGlyphCatalogueProvider, GlyphPickerViewModel (all search/selection logic), new IShellInteractions.PickGlyphAsync, and a ChooseGlyphCommand on TagIconRowViewModel.
  • App (WinUI): GlyphCatalogueProvider (reads/resolves the JSON, degrades to an empty catalogue rather than throwing on a bad edit), GlyphPickerDialog, DI registration, and the WindowsShellInteractions implementation.

Scope kept to the first cut per the TODO: tags only — CLI icons stay image/identicon.

Testing

  • 11 new Core unit tests: GlyphPickerViewModelTests (sort, name/keyword/code-point search, no-results, preselection by glyph and typed code point, selection-dropped-on-filter, empty catalogue) and TagIconsViewModelTests (Choose command stores / cancels / no-ops without interactions). All 226 Core tests pass.
  • WinUI head compile-verified on the Windows build agent: 0 warnings, 0 errors.

Notes for later

  • A Velopack update overwrites the install directory, so user edits to appsettings.json won't survive an update. Fine for the shipped default; if catalogue customisation becomes a real need, LocalAppData is the durable home.
  • Search is substring matching across name + keywords + code point — plenty for 50 entries. Revisit fuzzy search only if the catalogue grows large.

🤖 Generated with Claude Code

Adds a searchable glyph picker so tag icons can be chosen from a grid
instead of typing a Segoe Fluent Icons code point. The free-text field
remains as an escape hatch and persistence is unchanged (selection still
flows through GlyphInput.Resolve).

The catalogue is a curated 50-glyph set in appsettings.json beside the
app, re-read each time the picker opens so edits need no rebuild. Core
holds the model, provider abstraction and search/selection view model
(unit-tested); the App reads the file and presents the dialog.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@StuartMeeks StuartMeeks merged commit cff9054 into main Jun 1, 2026
6 checks passed
@StuartMeeks StuartMeeks deleted the feat/icon-picker branch June 1, 2026 07:41
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.

1 participant