[IDEA] Fix gutter icons with gradient#963
Conversation
da90b8c to
2687f2b
Compare
WalkthroughThis pull request refactors gradient XML generation in the SDK to consistently emit color stop 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
`@sdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.kt`:
- Around line 145-155: parseColorExpression currently only accepts expressions
whose text startsWith("Color."), so fully-qualified references like
androidx.compose.ui.graphics.Color.White are skipped; update
parseColorExpression (and the Branch handling KtDotQualifiedExpression) to
detect any occurrence of ".Color." (or use substringAfterLast("Color.")) to
extract the actual color identifier (e.g., "White") before calling getIrColor
and returning IrFill.Color, while keeping existing KtCallExpression parsing
intact.
🪄 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: 553eacbc-dbc4-4676-9c11-37cefcf4aa20
📒 Files selected for processing (9)
sdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/IrToXmlGenerator.ktsdk/generator/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/IrToXmlGeneratorTest.ktsdk/intellij/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/common/FillParser.ktsdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/KtFileToImageVectorParserTest.ktsdk/intellij/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/sdk/intellij/psi/imagevector/expected/LinearGradientComposeColors.ktsdk/test/sharedTestResources/imagevector/kt/backing/LinearGradient.compose.colors.ktsdk/test/sharedTestResources/imagevector/kt/lazy/LinearGradient.compose.colors.kttools/idea-plugin/CHANGELOG.mdtools/idea-plugin/src/test/kotlin/io/github/composegears/valkyrie/gutter/ImageVectorGutterTest.kt
Before:

After

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