Engineering
add-icon avatar

add-icon

Add a new Tabler icon to the Arto application by updating the icon manifest and Rust enum definitions.

Introduction

This skill provides a structured workflow for developers to integrate new icons from the Tabler Icons library into the Arto codebase. Since Arto utilizes a centralized icon sprite system managed by a Vite plugin, simply adding an SVG file is insufficient. This process ensures that icons are correctly indexed in the project configuration, processed through the build pipeline, and made available for type-safe usage within the Rust-based desktop components.

  • Updates renderer/icons.json to register new icon identifiers for the build system.

  • Automatically generates icon sprites during Vite buildStart hooks for performance optimization.

  • Extends the IconName enum in desktop/src/components/icon.rs to enable strongly-typed icon selection.

  • Updates the Display implementation for the IconName enum to ensure consistent string serialization.

  • Supports the inclusion of outline-style icons from the @tabler/icons npm package.

  • Verify the icon name by browsing the Tabler Icons documentation before modification.

  • Ensure additions to icons.json are maintained in alphabetical order to preserve configuration hygiene.

  • Icons must be added to the IconName enum using PascalCase to match project coding standards.

  • Never edit generated SVG files in the assets/dist/ directory, as these are managed automatically by the build pipeline and are explicitly excluded from version control.

  • Run the development environment using just dev or cargo build to trigger the automatic sprite regeneration and verify integration. When referencing icons in the frontend, use the asset!() macro as per standard Dioxus practice in the project.

Repository Stats

Stars
220
Forks
19
Open Issues
24
Language
Rust
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 04:40 AM
View on GitHub