Skip to content

[Web Import] Add More Customization Settings for Standard Icon Sets#948

Open
t-regbs wants to merge 4 commits intomainfrom
feature/svg-customization
Open

[Web Import] Add More Customization Settings for Standard Icon Sets#948
t-regbs wants to merge 4 commits intomainfrom
feature/svg-customization

Conversation

@t-regbs
Copy link
Copy Markdown
Collaborator

@t-regbs t-regbs commented Mar 26, 2026

Addresses #931

Screen.Recording.2026-03-26.at.21.15.00.compressed.mp4

📝 Changelog

If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs:

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

Walkthrough

The pull request enhances SVG import customization capabilities in the IDE plugin. It replaces the SizeSettings configuration with a comprehensive SvgImportSettings model supporting size, color, rotation, and flip transformations. A new SvgCustomizationPanel composable UI component is introduced for configuring these settings. All standard icon providers (Lucide, Bootstrap, Remix, BoxIcons, FontAwesome) are updated to persist custom colors and recent color history. The SVG processing flow is refactored to separate loading (loadSvg()) from customization application (applySettings()). Supporting infrastructure includes helper functions for color serialization, a new SvgImportCustomizer implementation replacing the deprecated SvgSizeCustomizer, and test coverage for SVG transformation logic.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding customization settings (color, rotation, flip, persistence) for standard icon sets in the Web Import feature.
Description check ✅ Passed The PR description addresses issue #931 and includes a video asset demonstrating the feature. It correctly marks the IntelliJ Plugin changelog as updated (checked).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/svg-customization

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SvgCustomizationPanel.kt`:
- Around line 68-74: The hex format mismatch: AwtColor.toRgbHexString()
currently strips alpha by using .takeLast(6), producing `#RRGGBB` which
Color.fromArgbHexStringOrNull (called in String.toComposeColorOrNull) expects
`#AARRGGBB` and thus returns null; fix by having AwtColor.toRgbHexString() return
the full ARGB string (remove .takeLast(6) and keep the uppercase result) so
Color.fromArgbHexStringOrNull receives an 8-character `#AARRGGBB`, or
alternatively update String.toComposeColorOrNull() to detect 7-char `#RRGGBB`
inputs and prepend a default alpha (e.g., "#FF") before calling
Color.fromArgbHexStringOrNull.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 30ed405d-15b7-4f22-94b1-2bcabd4229d7

📥 Commits

Reviewing files that changed from the base of the PR and between d0416d5 and e5afe40.

📒 Files selected for processing (23)
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/service/PersistentSettings.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/settings/InMemorySettings.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/model/IconSettings.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/IconSizeCustomization.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SvgCustomizationPanel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/bootstrap/domain/BootstrapUseCase.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/boxicons/domain/BoxIconsUseCase.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/StandardIconViewModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/StandardImportScreenUI.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/domain/StandardIconProvider.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/domain/SvgImportCustomizer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/domain/SvgSizeCustomizer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/model/SizeSettings.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/model/SvgCustomizationCapabilities.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/model/SvgImportSettings.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/fontawesome/domain/FontAwesomeUseCase.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/lucide/domain/LucideUseCase.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/remix/domain/RemixUseCase.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
  • tools/idea-plugin/src/test/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/domain/SvgImportCustomizerTest.kt
💤 Files with no reviewable changes (2)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/domain/SvgSizeCustomizer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/model/SizeSettings.kt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant