Skip to content

feat: ShellIcons.Maui preview, XAML path generator, static docs site on ShellDocs 0.1.7 - #2

Merged
Shewart merged 8 commits into
mainfrom
feat/shellicons-maui
Sep 27, 2026
Merged

Shewart merged 8 commits into
mainfrom
feat/shellicons-maui

Conversation

@Shewart

@Shewart Shewart commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the MAUI target from the design notes as an unpublished preview, and gets the docs site ready to deploy. ShellDocs 0.1.7-alpha's shelldocs build now outputs a real static site, so docs.yml can publish to shellicons.shellui.dev. No runtime SVG parsing on MAUI: icons are converted to path data at build time and drawn as native Path shapes. release.yml still packs only ShellIcons.Blazor.

ShellIcons.Maui (preview)

  • Typed controls (<icons:ChevronRight />) for all 1,555 icons; each carries its own path data, so unused icons are trimmed
  • Icon dispatcher with an IconName enum, so an icon can be a binding or a component parameter: <icons:Icon Name="{Binding StatusIcon}" />
  • IconCatalog: tags and categories from Lucide's metadata, TryParse for ids, names and Lucide aliases ("home" → House), and Search
  • Properties: Size, StrokeThickness, AbsoluteStroke, Color (bindable; black/white by app theme when unset), Title → SemanticProperties.Description. Icons are InputTransparent, so taps reach the host control.
  • One xmlns for everything, https://shellicons.dev/maui; <icons:Image> coexists with MAUI's <Image>
  • Builds for Android, iOS, Mac Catalyst and Windows

XAML path generator (ShellIcons.Generator.Xaml)

  • Converts each SVG into one path in absolute coordinates: <path>, <circle>, <ellipse>, <rect> (corner radii), <line>, <polyline>, <polygon>
  • The path parser handles run-together numbers, arc flags without separators, and shorthand curves (S/T)
  • fill="currentColor" shapes get a second, filled path; every other icon is one native view
  • At runtime the pre-converted path becomes geometry once per icon and is shared by every control showing it
  • Aspect=None plus a scale transform keeps icons on Lucide's 24×24 grid; the stroke width is scaled separately
  • New diagnostics for custom icons: SHELLICONS002 (unsupported SVG such as <g> or transform), SHELLICONS004 (name can't be an enum member), SHELLICONS005 (shape outside the viewBox, dropped)
  • The Blazor and MAUI generators share one naming rule (Naming.KebabToPascal)

Docs site (ShellDocs 0.1.3 → 0.1.7-alpha)

  • Static build: every page is prerendered to plain HTML. docs.yml pins the CLI and passes --site-url, which adds sitemap.xml, robots.txt and og: tags.
  • Icon browser: moved from /icons to /docs/icons as a component used from content/docs/icons.md. The build only prerenders content/ pages, so the old route would have 404'd.
  • Icon search: works after in-app navigation (the old inline script only ran on a full page load)
  • App.razor: plain asset paths instead of the template's hashed @Assets[…] URLs, which 404 on a static host (the scoped-CSS bundle among them)
  • Page titles: now update on in-app navigation (<HeadOutlet> gets the same render mode as <Routes>)
  • Highlighting: XAML, CSS and PowerShell code blocks
  • Content: a MAUI section (getting started, names & catalog, how rendering works) and a full diagnostics table; the intro and generator pages now recommend <ChevronRightIcon />

Solutions and CI

  • MAUI projects are in a new ShellIcons.Maui.slnx, so ShellIcons.slnx still builds without the MAUI workloads
  • New Windows CI job: installs the MAUI workload, builds all five targets, runs the MAUI tests

Repo docs

  • CHANGELOG.md: Unreleased covers the merged Blazor changes and this PR
  • RELEASING.md: the release flow for maintainers (bump version + CHANGELOG, tag, approve the release environment); owner-only setup is marked as done
  • README: status table, MAUI quickstart, how to build the static docs
  • catalog/custom/README.md: which SVG features convert to MAUI
  • .gitignore: now covers publish/ (static docs output) and nupkgs/

Fixes found along the way

  • Lucide 0.475.0's save-off.svg has a stray shape entirely outside the viewBox. Browsers clip it; a native Path would draw it beside the icon, so it's dropped for MAUI.

Breaking changes

  • None for ShellIcons.Blazor consumers. The docs site's icon browser URL changes from /icons to /docs/icons, but the site hasn't been deployed yet.

Test plan

  • dotnet build ShellIcons.slnx: 0 warnings, 0 errors
  • dotnet test ShellIcons.slnx: 101/101 (57 generator, 44 Blazor). New tests cover the path parser, the shape converter, the metadata reader and off-canvas detection.
  • dotnet build ShellIcons.Maui.slnx: 0 warnings, 0 errors for net10.0, Android, iOS, Mac Catalyst and Windows
  • dotnet test tests/ShellIcons.Maui.Tests: 34/34, headless. Includes:
    • a compiled XAML page (xmlns, string → IconName, icons:Image next to MAUI's Image)
    • a check that parses every icon into MAUI geometry and keeps every endpoint on the grid (this found the save-off shape)
  • shelldocs build: 16 pages prerendered
  • Output served as plain files and checked in a browser:
    • search ("circle" → 55 of 1,555)
    • sidebar expand/collapse
    • stylesheets loading, no stray reconnect dialogs
  • Docs dev server: home → "Browse icons" by click, then search; page titles update on navigation
  • Icon browser click-to-copy (automation can't read the clipboard)
  • Android / iOS / macOS visual check of ShellIcons.Maui (not verified yet)

Follow-ups

  • Look at ShellIcons.Maui on devices, give it its own package readme, and add it to release.yml (Windows or macOS job with the MAUI workload)
  • Consumer-selectable icon subsets: needs the generator and catalog shipped inside the package
  • ShellDocs: use a folder's meta.json title (the sidebar shows "Maui"), prerender custom @page routes, and fix the scaffolded App.razor. Tracked in shelldocs' SHELLDOCS_FIXES.md.
  • Bump <Version> in Directory.Build.props before the next tag. 0.1.0-alpha is already on NuGet.
  • ShellUI Native can switch its interim icon component to ShellIcons.Maui once it ships (same IconName / Icon names)

…rived icons, including Icon and IconCatalog classes, geometry handling, and comprehensive README documentation
…mproved icon browsing experience

- Updated site tagline to reflect support for .NET MAUI.
- Adjusted navigation links to point to the correct documentation paths.
- Added IconBrowser component for searching and copying icon components.
- Removed ReconnectModal component and associated files to streamline the layout.
- Updated project dependencies to the latest alpha versions.
- Enhanced documentation with new icons page and MAUI getting started guide.
…JSON icon processing

- Introduced IconMetadataReader for extracting metadata from JSON files.
- Added MauiIconGenerator to generate icon-related source files from SVG and JSON inputs.
- Implemented PathNormalizer for converting SVG path data to a format compatible with MAUI.
- Created SvgShapeReader to parse SVG elements and convert them into XAML-compatible shapes.
- Established project structure with a new .csproj file for ShellIcons.Generator.Xaml.
…unctionality

- Introduced PathNormalizerTests to validate path normalization logic with various SVG path inputs.
- Added SvgShapeReaderTests to ensure correct parsing of SVG elements and attributes.
- Implemented OffCanvasTests to verify behavior of shapes outside the viewBox.
- Enhanced project file to include necessary source files for testing.
- Introduced CatalogTests to validate icon enumeration and parsing functionality.
- Added ControlTests to ensure correct behavior of icon controls and their properties.
- Implemented GeometryTests to verify icon geometry parsing and grid alignment.
- Created XamlTests to check XAML namespace resolution and coexistence of typed and Maui images.
- Established project structure with necessary files for testing ShellIcons.Maui.
…ild clarity

- Added entries to .gitignore for nupkgs and publish directories to streamline build processes.
- Updated README to reflect the new MAUI quickstart section and improved documentation links.
- Introduced ShellIcons.Maui.slnx to separate MAUI projects from the main solution for easier management.
- Introduced CHANGELOG.md to document notable changes and versioning for ShellIcons packages.
- Added RELEASING.md to outline the process for publishing ShellIcons.Blazor to NuGet and creating GitHub Releases.
- Included detailed instructions for versioning, environment setup, and release approval processes.
@Shewart
Shewart merged commit 51d11f3 into main Sep 27, 2026
2 checks passed
@Shewart
Shewart deleted the feat/shellicons-maui branch October 1, 2026 08:24
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