Skip to content

Conversation

@nickspurry
Copy link
Contributor

This PR adds VSCode Codicons to the set of supported icons. Codicons are given a prefix of "Vsc" to match React-Icons. Icons are gated behind a new "Codicons" feature.

This PR also sets a default SVG viewbox size of "0 0 16 16" in codegen for icons that don't include an SVG viewbox element. At least a couple of the upstream Codicons do not contain a viewbox element, which previously caused codegen to panic.

@marc2332 marc2332 requested review from Copilot and marc2332 March 29, 2025 21:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for VSCode Codicons by introducing a new icon feature and updating the code generation to provide a default SVG viewbox.

  • Introduces a new module (vsc_icons) gated behind the "codicons" feature.
  • Adds a Cargo.toml dependency for codicons.
  • Updates codegen to generate Codicons using a default viewbox for missing SVG attributes.
  • Updates README.md to document the new Codicons feature.

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/lib/src/icons.rs Adds module for VSCode Codicons gated by the "codicons" feature
packages/lib/Cargo.toml Registers the codicons dependency
packages/codegen/src/main.rs Introduces code generation for Codicons using a new icon prefix "Vsc"
packages/codegen/src/create_icon_file.rs Updates SVG attribute extraction with a default viewbox
README.md Documents the new Codicons feature and adds a link to its official site
Files not reviewed (2)
  • .gitmodules: Language not supported
  • icon_resources/vscode-codicons: Language not supported
Comments suppressed due to low confidence (1)

README.md:24

  • The link path uses 'vs_icons' which is inconsistent with the module name 'vsc_icons'. Consider updating the documentation to align with the code.
- [codicons](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/vs_icons/index.html)

Copy link
Member

@nissy-dev nissy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!Thanks!

@nissy-dev nissy-dev merged commit b1a6aec into dioxus-community:main May 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants