Migrate to Jewel 0.34, IntelliJ IDEA 2025.3.3#925
Conversation
WalkthroughThis pull request updates the project dependencies and build configuration across multiple modules. IntelliJ platform version is bumped to 2025.3.3, Compose is upgraded to 1.10.0, and Leviathan to 3.3.0. New Compose libraries are introduced through the version catalog, with the compose-hot-reload plugin removed. Multiple Gradle build files are updated to use version catalog aliases instead of direct dependency coordinates. The icon system is refactored, removing the custom KotlinLogo implementation and replacing references with AllIconsKeys. API adjustments include changing parameter types in InlineIconText and CodeHighlight functions, updating dependency injection patterns, and adding experimental API opt-ins. Documentation is updated to reflect these changes. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt (1)
36-56:⚠️ Potential issue | 🟠 MajorGuard against
TextUnit.Unspecifiedfor placeholder size.On line 36,
iconSizedefaults tostyle.fontSize. If a style with unspecified font size is passed, lines 54–55 will propagate an invalid size intoPlaceholder, causing anIllegalArgumentExceptionduring layout. The Jetpack ComposePlaceholderAPI requires bothwidthandheightto be specified values insporem;TextUnit.Unspecifiedis not permitted.Resolve by checking if
iconSizeis unspecified and providing a fallback:Proposed fix
fun InlineIconText( text: String, key: IconKey, modifier: Modifier = Modifier, iconTint: Color = Color.Unspecified, style: TextStyle = JewelTheme.defaultTextStyle, iconSize: TextUnit = style.fontSize, textAlign: TextAlign = TextAlign.Unspecified, alternateText: String = "[icon]", ) { + val resolvedIconSize = if (iconSize.isUnspecified) 16.sp else iconSize + val parts = text.split(alternateText) @@ placeholder = Placeholder( - width = iconSize, - height = iconSize, + width = resolvedIconSize, + height = resolvedIconSize, placeholderVerticalAlign = PlaceholderVerticalAlign.TextCenter, ),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt` around lines 36 - 56, InlineIconText currently passes iconSize directly into Placeholder which can be TextUnit.Unspecified and crash; update the function to guard iconSize by detecting if iconSize == TextUnit.Unspecified (or style.fontSize is unspecified) and substitute a concrete fallback (e.g., style.fontSize.takeIf { it != TextUnit.Unspecified } ?: 16.sp or another sensible default) before building inlineContent; ensure the computed safe size variable is used for both width and height in InlineTextContent/Placeholder tied to INLINE_CONTENT_ID so Placeholder always receives a valid TextUnit.
🧹 Nitpick comments (2)
tools/idea-plugin/build.gradle.kts (1)
95-96: Use shared constants for IDEA target values to reduce drift risk.At Line 96 and Line 117, hardcoded target values are repeated. A local constant pair keeps this synchronized and easier to update.
♻️ Suggested refactor
+val targetIdeaVersion = "2025.3.3" +val targetIdeaSinceBuild = "253.31033.145" + intellijPlatform { buildSearchableOptions = false projectName = "valkyrie-plugin" pluginConfiguration { ideaVersion { // 2025.3.3 https://www.jetbrains.com/idea/download/other/ - sinceBuild = "253.31033.145" + sinceBuild = targetIdeaSinceBuild untilBuild = provider { null } } changeNotes = provider { changelog.render(Changelog.OutputType.HTML) } } @@ ides { create( type = IntelliJPlatformType.IntellijIdea, - version = "2025.3.3", + version = targetIdeaVersion, ) } }Also applies to: 117-117
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/idea-plugin/build.gradle.kts` around lines 95 - 96, Introduce shared constants for the IntelliJ target builds and replace the two hardcoded literals by referencing them: define top-level vals (e.g., ideaSinceBuild and ideaUntilBuild) in build.gradle.kts, assign the current "253.31033.145" and the matching until-build value to those constants, and then use those constants where sinceBuild and untilBuild are set (the occurrences of sinceBuild at the shown block and the other untilBuild/sinceBuild at the later occurrence around line 117) so updates only need to change the constants.README.md (1)
221-222: Clarify the 1.x compatibility range to avoid ambiguity.At Line 221,
1.0.0can be read as a single-version entry. Consider making the range explicit (e.g.,1.0.0 - 1.3.0) so users on intermediate versions don’t need to infer support.✏️ Suggested doc tweak
-| 1.0.0 | IntelliJ IDEA 2025.3, Android Studio Panda 1 | +| 1.0.0 - 1.3.0 | IntelliJ IDEA 2025.3, Android Studio Panda 1 |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` around lines 221 - 222, Update the ambiguous version row by changing the single "1.0.0" entry to an explicit compatibility range (for example "1.0.0 - 1.3.0") so it's clear which 1.x releases are supported; modify the table row containing the "1.0.0" string (and adjust the adjacent "IntelliJ IDEA 2025.3, Android Studio Panda 1" cell if needed) to reflect the chosen range format, ensuring consistency with the later "1.4.0" row.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt`:
- Around line 36-56: InlineIconText currently passes iconSize directly into
Placeholder which can be TextUnit.Unspecified and crash; update the function to
guard iconSize by detecting if iconSize == TextUnit.Unspecified (or
style.fontSize is unspecified) and substitute a concrete fallback (e.g.,
style.fontSize.takeIf { it != TextUnit.Unspecified } ?: 16.sp or another
sensible default) before building inlineContent; ensure the computed safe size
variable is used for both width and height in InlineTextContent/Placeholder tied
to INLINE_CONTENT_ID so Placeholder always receives a valid TextUnit.
---
Nitpick comments:
In `@README.md`:
- Around line 221-222: Update the ambiguous version row by changing the single
"1.0.0" entry to an explicit compatibility range (for example "1.0.0 - 1.3.0")
so it's clear which 1.x releases are supported; modify the table row containing
the "1.0.0" string (and adjust the adjacent "IntelliJ IDEA 2025.3, Android
Studio Panda 1" cell if needed) to reflect the chosen range format, ensuring
consistency with the later "1.4.0" row.
In `@tools/idea-plugin/build.gradle.kts`:
- Around line 95-96: Introduce shared constants for the IntelliJ target builds
and replace the two hardcoded literals by referencing them: define top-level
vals (e.g., ideaSinceBuild and ideaUntilBuild) in build.gradle.kts, assign the
current "253.31033.145" and the matching until-build value to those constants,
and then use those constants where sinceBuild and untilBuild are set (the
occurrences of sinceBuild at the shown block and the other untilBuild/sinceBuild
at the later occurrence around line 117) so updates only need to change the
constants.
ℹ️ Review info
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
README.mdbuild.gradle.ktsgradle/libs.versions.tomlsdk/compose/codeviewer/build.gradle.ktssdk/compose/foundation/build.gradle.ktssdk/compose/highlights-core/build.gradle.ktssdk/compose/icons/build.gradle.ktssdk/intellij/psi/imagevector/build.gradle.ktssdk/ir/compose/build.gradle.ktstools/compose-app/build.gradle.ktstools/idea-plugin/CHANGELOG.mdtools/idea-plugin/build.gradle.ktstools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ValkyrieToolWindow.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/LinkIcon.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/highlight/CodeHighlight.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/icons/KotlinLogo.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/ui/placeholder/ErrorPlaceholder.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/di/DI.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/di/IntellijPlatformModule.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/existingpack/ui/ChooseExistingPackFile.kttools/idea-plugin/src/main/resources/messages/Valkyrie.properties
💤 Files with no reviewable changes (1)
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/icons/KotlinLogo.kt
ea0fef5 to
26dae5f
Compare
26dae5f to
816c31a
Compare
📝 Changelog
If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs: