Skip to content

Move :psi:imagevector into sdk#791

Merged
egorikftp merged 1 commit intomainfrom
task/move-psi-imagevector-into-sdk
Dec 20, 2025
Merged

Move :psi:imagevector into sdk#791
egorikftp merged 1 commit intomainfrom
task/move-psi-imagevector-into-sdk

Conversation

@egorikftp
Copy link
Copy Markdown
Member

@egorikftp egorikftp force-pushed the task/move-psi-imagevector-into-sdk branch from 11a60c7 to b7e42a1 Compare December 19, 2025 10:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 19, 2025

Walkthrough

The imagevector PSI module is relocated from components/psi/imagevector to sdk/intellij/psi/imagevector. Kotlin source and test package declarations and imports were updated from io.github.composegears.valkyrie.psi.imagevector.* to io.github.composegears.valkyrie.sdk.intellij.psi.imagevector.*. Gradle settings and build files now include and reference the new module path. The PsiElement extension childrenOfType was moved to the new sdk.intellij.psi.imagevector.util package. One test file was removed from the old location and equivalent tests were added under the new sdk/intellij module.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Move :psi:imagevector into sdk' directly and clearly summarizes the main change—relocating the psi:imagevector module into the sdk structure, which aligns with all the package and import updates throughout the changeset.
Description check ✅ Passed The description references issue #592, which provides context for the change (moving :psi:imagevector into sdk). While minimal, it is relevant to the changeset's objective.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch task/move-psi-imagevector-into-sdk

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89e965c and 409dc15.

📒 Files selected for processing (33)
  • components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtCallExpressionTests.kt (0 hunks)
  • components/test/coverage/build.gradle.kts (1 hunks)
  • sdk/intellij/psi/imagevector/api/imagevector.api (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/ImageVectorPsiParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/BuilderExpression.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtCallExpression.kt (2 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/PathNodeParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/MaterialImageVectorPsiParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/RegularImageVectorPsiParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/util/PsiElement.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtCallExpressionTests.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtFileToImageVectorParserTest.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtFile.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/ParseType.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllGroupParams.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllPathParams.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/ClipPathGradient.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/ComposeColor.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyImageVector.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyPaths.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/IconWithGroup.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/IconWithImportMember.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/LinearGradient.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/MaterialIcon.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/RadialGradient.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/SinglePath.kt (1 hunks)
  • settings.gradle.kts (1 hunks)
  • tools/idea-plugin/build.gradle.kts (1 hunks)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/ui/VirtualFileImageVector.kt (1 hunks)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/editor/edit/EditViewModel.kt (1 hunks)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ImageVectorToXmlViewModel.kt (1 hunks)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ImageVectorPsiUtil.kt (1 hunks)
💤 Files with no reviewable changes (1)
  • components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtCallExpressionTests.kt
✅ Files skipped from review due to trivial changes (2)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/LinearGradient.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/IconWithImportMember.kt
🚧 Files skipped from review as they are similar to previous changes (22)
  • settings.gradle.kts
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllGroupParams.kt
  • tools/idea-plugin/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ImageVectorPsiUtil.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtCallExpression.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/PathNodeParser.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/ui/VirtualFileImageVector.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/BuilderExpression.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/RegularImageVectorPsiParser.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/util/PsiElement.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllPathParams.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/IconWithGroup.kt
  • components/test/coverage/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ImageVectorToXmlViewModel.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/MaterialIcon.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/MaterialImageVectorPsiParser.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/ClipPathGradient.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/ParseType.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyPaths.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/RadialGradient.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/SinglePath.kt
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-21T20:55:27.073Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 651
File: tools/idea-plugin/build.gradle.kts:147-175
Timestamp: 2025-10-21T20:55:27.073Z
Learning: In Gradle Kotlin DSL (.gradle.kts) scripts, the types `org.gradle.api.artifacts.ArtifactCollection` and `org.gradle.api.artifacts.component.ModuleComponentIdentifier` are implicitly available and do not require explicit import statements.

Applied to files:

  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/ImageVectorPsiParser.kt
📚 Learning: 2025-12-07T20:07:49.753Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 750
File: tools/gradle-plugin/src/main/kotlin/io/github/composegears/valkyrie/gradle/internal/task/GenerateImageVectorsTask.kt:71-85
Timestamp: 2025-12-07T20:07:49.753Z
Learning: In the Valkyrie Gradle plugin (Kotlin), the `useFlatPackage` flag in `IconPackExtension` is only applicable when nested packs are configured. For single icon packs (without nested packs), the flag is intentionally not propagated to `ImageVectorGeneratorConfig` as there is no package hierarchy to flatten.

Applied to files:

  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/ImageVectorPsiParser.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtFileToImageVectorParserTest.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyImageVector.kt
📚 Learning: 2025-09-27T22:19:48.762Z
Learnt from: t-regbs
Repo: ComposeGears/Valkyrie PR: 587
File: sdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/XmlSerializer.kt:13-16
Timestamp: 2025-09-27T22:19:48.762Z
Learning: The VectorDrawable.Child sealed interface in the Valkyrie project only has Group and Path as implementations. ClipPath is not implemented in this project, despite being supported in Android's official VectorDrawable specification.

Applied to files:

  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyImageVector.kt
🧬 Code graph analysis (1)
sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtCallExpressionTests.kt (2)
sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtCallExpression.kt (1)
  • getIrColor (79-84)
components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtCallExpressionTests.kt (2)
  • Black to 0x000000 (12-61)
  • Black to 0x000000 (11-62)
🔇 Additional comments (10)
sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/ComposeColor.kt (1)

1-1: LGTM! Package declaration correctly updated.

The package declaration has been properly updated to reflect the module's new location under sdk.intellij.psi.imagevector, consistent with the PR's objective to relocate the imagevector PSI module into the SDK.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtCallExpressionTests.kt (2)

73-74: Previous issues resolved.

The test names for the alpha tests now correctly match their expected hex values. The fixes from the previous review have been applied successfully.

Also applies to: 78-79


10-91: LGTM!

All test implementations are correct:

  • Standard color tests properly validate hex ARGB values with full opacity (0xFF alpha)
  • Alpha modification tests correctly calculate expected hex values (0x7F for 0.5f, 0x3F for 0.25f, 0xBF for 0.75f)
  • Edge case for empty string returning null is covered

The test coverage comprehensively validates the getIrColor function behavior.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyImageVector.kt (1)

1-12: Package declaration correctly updated for module relocation.

The file has been properly moved from components/psi/imagevector to sdk/intellij/psi/imagevector, and the package path has been updated accordingly. The ImageVector test data definition remains correct, and no stray references to the old package path exist in the codebase.

sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/ImageVectorPsiParser.kt (1)

1-4: LGTM! Package relocation is correct.

The package declaration and import paths have been correctly updated to reflect the module's new location in the SDK structure. The logic remains unchanged.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtFile.kt (1)

1-1: LGTM! Test utility package updated correctly.

The package declaration has been updated to match the new module location. The function implementation and imports remain unchanged.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/editor/edit/EditViewModel.kt (1)

11-11: LGTM! Import path updated correctly.

The import statement has been updated to reference the relocated ImageVectorPsiParser in the SDK module. The usage at line 44 remains compatible.

sdk/intellij/psi/imagevector/api/imagevector.api (1)

1-5: LGTM! Binary compatibility API updated correctly.

The API definition file has been updated to reflect the new module location. The public API surface remains unchanged—only the package paths have been updated. All references in the codebase have been properly migrated to the new package path.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtFileToImageVectorParserTest.kt (2)

33-219: Test logic remains unchanged and intact.

The test implementations are unmodified, which is appropriate for a module relocation. All test methods maintain their original logic and assertions.


1-26: LGTM! Package and import updates are consistent with the module relocation.

The package declaration and all import statements have been correctly updated to reflect the new module structure (sdk.intellij.psi.imagevector). The refactoring is systematic and maintains consistency throughout.


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.

@egorikftp egorikftp force-pushed the task/move-psi-imagevector-into-sdk branch 2 times, most recently from 104c3e3 to 89e965c Compare December 19, 2025 11:30
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: 2

🧹 Nitpick comments (1)
sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.kt (1)

43-55: Consider simplifying the colorStops initialization pattern.

The colorStops variable is initialized with mutableListOf() and then reassigned (not mutated). The .toMutableList() call is unnecessary since the variable is reassigned and never mutated afterward. This pattern could be simplified for clarity.

🔎 Suggested simplification

For parseLinearGradient:

-    var colorStops = mutableListOf<IrFill.ColorStop>()
+    var colorStops: List<IrFill.ColorStop> = emptyList()
     var startX = 0f
     var startY = 0f
     var endX = 0f
     var endY = 0f

     valueArguments.forEach { arg ->
         val argName = arg.getArgumentName()?.asName?.identifier
         val argValue = arg.getArgumentExpression()

         when (argName) {
             "colorStops" -> {
-                colorStops = argValue.safeAs<KtCallExpression>()?.parseColorStops().orEmpty().toMutableList()
+                colorStops = argValue.safeAs<KtCallExpression>()?.parseColorStops().orEmpty()
             }

Apply the same pattern to parseRadialGradient at lines 83-94.

Also applies to: 83-94

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b7e42a1 and 89e965c.

📒 Files selected for processing (33)
  • components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtCallExpressionTests.kt (0 hunks)
  • components/test/coverage/build.gradle.kts (1 hunks)
  • sdk/intellij/psi/imagevector/api/imagevector.api (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/ImageVectorPsiParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/BuilderExpression.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtCallExpression.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/PathNodeParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/MaterialImageVectorPsiParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/RegularImageVectorPsiParser.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/util/PsiElement.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtCallExpressionTests.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtFileToImageVectorParserTest.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtFile.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/ParseType.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllGroupParams.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllPathParams.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/ClipPathGradient.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/ComposeColor.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyImageVector.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyPaths.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/IconWithGroup.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/IconWithImportMember.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/LinearGradient.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/MaterialIcon.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/RadialGradient.kt (1 hunks)
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/SinglePath.kt (1 hunks)
  • settings.gradle.kts (1 hunks)
  • tools/idea-plugin/build.gradle.kts (1 hunks)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/ui/VirtualFileImageVector.kt (1 hunks)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/editor/edit/EditViewModel.kt (1 hunks)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ImageVectorToXmlViewModel.kt (1 hunks)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ImageVectorPsiUtil.kt (1 hunks)
💤 Files with no reviewable changes (1)
  • components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtCallExpressionTests.kt
🚧 Files skipped from review as they are similar to previous changes (17)
  • settings.gradle.kts
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtFileToImageVectorParserTest.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyImageVector.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/IconWithImportMember.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/ClipPathGradient.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllGroupParams.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/EmptyPaths.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ImageVectorPsiUtil.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/editor/edit/EditViewModel.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/ImageVectorPsiParser.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/PathNodeParser.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/MaterialIcon.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/ui/VirtualFileImageVector.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/ParseType.kt
  • components/test/coverage/build.gradle.kts
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/RadialGradient.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/IconWithGroup.kt
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-12-07T20:07:49.753Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 750
File: tools/gradle-plugin/src/main/kotlin/io/github/composegears/valkyrie/gradle/internal/task/GenerateImageVectorsTask.kt:71-85
Timestamp: 2025-12-07T20:07:49.753Z
Learning: In the Valkyrie Gradle plugin (Kotlin), the `useFlatPackage` flag in `IconPackExtension` is only applicable when nested packs are configured. For single icon packs (without nested packs), the flag is intentionally not propagated to `ImageVectorGeneratorConfig` as there is no package hierarchy to flatten.

Applied to files:

  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/BuilderExpression.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/SinglePath.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/LinearGradient.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/MaterialImageVectorPsiParser.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ImageVectorToXmlViewModel.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/RegularImageVectorPsiParser.kt
📚 Learning: 2025-10-21T20:55:27.073Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 651
File: tools/idea-plugin/build.gradle.kts:147-175
Timestamp: 2025-10-21T20:55:27.073Z
Learning: In Gradle Kotlin DSL (.gradle.kts) scripts, the types `org.gradle.api.artifacts.ArtifactCollection` and `org.gradle.api.artifacts.component.ModuleComponentIdentifier` are implicitly available and do not require explicit import statements.

Applied to files:

  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/BuilderExpression.kt
📚 Learning: 2025-09-27T22:19:48.762Z
Learnt from: t-regbs
Repo: ComposeGears/Valkyrie PR: 587
File: sdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/XmlSerializer.kt:13-16
Timestamp: 2025-09-27T22:19:48.762Z
Learning: The VectorDrawable.Child sealed interface in the Valkyrie project only has Group and Path as implementations. ClipPath is not implemented in this project, despite being supported in Android's official VectorDrawable specification.

Applied to files:

  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/SinglePath.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.kt
  • sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllPathParams.kt
  • sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/RegularImageVectorPsiParser.kt
🧬 Code graph analysis (1)
sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtCallExpressionTests.kt (1)
sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtCallExpression.kt (1)
  • getIrColor (78-83)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build (ubuntu-latest)
🔇 Additional comments (22)
sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtFile.kt (1)

1-1: LGTM! Package declaration correctly updated.

The package declaration aligns with the module relocation from components/psi/imagevector to sdk/intellij/psi/imagevector as described in the PR objectives.

sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.kt (1)

1-4: LGTM! Package and import paths correctly updated for module relocation.

The package declaration and import path have been properly updated to reflect the module's new location in sdk/intellij/psi/imagevector. The changes are consistent with the PR objective of moving the imagevector PSI module.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/SinglePath.kt (1)

1-1: Package declaration correctly updated for SDK module relocation.

The package namespace has been properly updated to reflect the new module location under sdk.intellij.psi.imagevector. No old package references remain in the codebase.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtCallExpressionTests.kt (3)

1-8: LGTM! Package and imports align with the new module structure.

The package declaration and imports correctly reflect the relocation from components/psi/imagevector to sdk/intellij/psi/imagevector.


12-70: LGTM! Named color tests verify correct ARGB mappings.

All test assertions correctly validate the color name to ARGB value mappings, including standard colors and the transparent special case.


87-90: LGTM! Edge case handling is correctly tested.

The test properly validates that an empty string input returns null, ensuring defensive behavior.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/ComposeColor.kt (1)

1-1: LGTM!

Package declaration correctly updated to reflect the module relocation to sdk/intellij/psi/imagevector.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/AllPathParams.kt (1)

1-1: LGTM!

Package declaration correctly updated for the module relocation.

sdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/LinearGradient.kt (1)

1-1: LGTM!

Package declaration updated consistently with the module relocation.

sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/KtCallExpression.kt (1)

1-1: LGTM!

Package declaration correctly updated for the module relocation.

sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/util/PsiElement.kt (2)

1-1: LGTM!

Package declaration updated correctly to reflect the new module location under sdk/intellij/psi/imagevector/util.


10-12: LGTM!

The childrenOfType extension function has been successfully relocated to the new util package.

sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/BuilderExpression.kt (2)

1-1: LGTM!

Package declaration correctly updated for the module relocation.


4-4: LGTM!

Import path correctly updated to reference the relocated childrenOfType extension function.

sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/MaterialImageVectorPsiParser.kt (2)

1-1: LGTM!

Package declaration correctly updated to reflect the module relocation.


3-14: LGTM!

All import paths correctly updated to reference the relocated common utilities and extension functions in the new sdk.intellij.psi.imagevector namespace.

tools/idea-plugin/build.gradle.kts (1)

33-33: All references to the old module path have been successfully updated.

Verification confirms no remaining references to components.psi.imagevector exist in the codebase. The dependency at line 33 correctly uses the new module path sdk.intellij.psi.imagevector.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ImageVectorToXmlViewModel.kt (1)

10-10: LGTM!

The import path update correctly reflects the module relocation to sdk.intellij.psi.imagevector. The usage at line 111 remains valid.

sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/parser/RegularImageVectorPsiParser.kt (3)

1-19: LGTM!

Package declaration and imports correctly reflect the module relocation to sdk.intellij.psi.imagevector. Internal utility imports point to the new package paths while external dependencies remain unchanged.


29-49: Implementation is sound.

The parsing logic correctly handles null cases, extracts builder expressions from both getter and delegate patterns, and provides sensible fallbacks for empty names.


51-120: LGTM!

The helper functions correctly parse the ImageVector DSL structure with proper null safety and default value handling. The recursive group parsing and path attribute extraction are well implemented.

sdk/intellij/psi/imagevector/api/imagevector.api (1)

1-5: API surface updated correctly.

The public API definition reflects the module relocation with the updated package path. The parseToIrImageVector method signature remains unchanged, maintaining backward compatibility for the public interface.

@egorikftp egorikftp force-pushed the task/move-psi-imagevector-into-sdk branch from 89e965c to 409dc15 Compare December 19, 2025 21:16
@egorikftp egorikftp merged commit 7096027 into main Dec 20, 2025
3 checks passed
@egorikftp egorikftp deleted the task/move-psi-imagevector-into-sdk branch December 20, 2025 07:30
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