Skip to content

Migrate to Jewel 0.34, IntelliJ IDEA 2025.3.3#925

Merged
egorikftp merged 3 commits intomainfrom
feature/jewel_0.34
Apr 1, 2026
Merged

Migrate to Jewel 0.34, IntelliJ IDEA 2025.3.3#925
egorikftp merged 3 commits intomainfrom
feature/jewel_0.34

Conversation

@egorikftp
Copy link
Copy Markdown
Member

@egorikftp egorikftp commented Mar 2, 2026


📝 Changelog

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

@egorikftp egorikftp changed the title Jewel 0.34 Jewel 0.34, IntelliJ IDEA 2025.3.3. Mar 2, 2026
@egorikftp egorikftp changed the title Jewel 0.34, IntelliJ IDEA 2025.3.3. Migrate to Jewel 0.34, IntelliJ IDEA 2025.3.3 Mar 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 2, 2026

Walkthrough

The pull request updates the project to support IntelliJ IDEA 2025.3.3 and Jewel 0.34. Compose dependencies were upgraded from 1.9.0 to 1.10.0, with new catalog entries added for foundation, runtime, resources, UI, material3, and tooling-preview libraries. Compose dependency references across multiple build.gradle.kts files were refactored to use centralized version-catalog aliases. The compose-hot-reload plugin was removed from plugin declarations. Several Compose UI integrations were modified: focus-on-click behavior was removed from panel initialization, custom KotlinLogo icon implementation was deleted, and API signatures were updated to use key-based Icon references and language strings instead of ImageVector and MimeType parameters. Optional API opt-ins were added where needed.

🚥 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 summarizes the main changes in the PR: migrating to Jewel 0.34 and updating to IntelliJ IDEA 2025.3.3.
Description check ✅ Passed The PR description follows the template structure with the changelog checklist section properly filled out, marking the IntelliJ Plugin changelog as updated.

✏️ 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/jewel_0.34

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.

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 | 🟠 Major

Guard against TextUnit.Unspecified for placeholder size.

On line 36, iconSize defaults to style.fontSize. If a style with unspecified font size is passed, lines 54–55 will propagate an invalid size into Placeholder, causing an IllegalArgumentException during layout. The Jetpack Compose Placeholder API requires both width and height to be specified values in sp or em; TextUnit.Unspecified is not permitted.

Resolve by checking if iconSize is 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.0 can 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0ffaf91 and ea0fef5.

📒 Files selected for processing (22)
  • README.md
  • build.gradle.kts
  • gradle/libs.versions.toml
  • sdk/compose/codeviewer/build.gradle.kts
  • sdk/compose/foundation/build.gradle.kts
  • sdk/compose/highlights-core/build.gradle.kts
  • sdk/compose/icons/build.gradle.kts
  • sdk/intellij/psi/imagevector/build.gradle.kts
  • sdk/ir/compose/build.gradle.kts
  • tools/compose-app/build.gradle.kts
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ValkyrieToolWindow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/LinkIcon.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/highlight/CodeHighlight.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/icons/KotlinLogo.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/ui/placeholder/ErrorPlaceholder.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/di/DI.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/di/IntellijPlatformModule.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/existingpack/ui/ChooseExistingPackFile.kt
  • tools/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

@egorikftp egorikftp marked this pull request as draft March 2, 2026 17:46
@egorikftp egorikftp force-pushed the feature/jewel_0.34 branch 2 times, most recently from 26dae5f to 816c31a Compare March 3, 2026 18:00
@egorikftp egorikftp force-pushed the feature/jewel_0.34 branch from 816c31a to 98f71e3 Compare April 1, 2026 19:15
@egorikftp egorikftp marked this pull request as ready for review April 1, 2026 19:17
@egorikftp
Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

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)

59-67: ⚠️ Potential issue | 🔴 Critical

Remove colorFilter parameter; use tint instead for Jewel's Icon component.

Jewel's Icon composable does not accept a colorFilter parameter. Use the tint parameter directly instead. Replace the conditional logic with:

Icon(
    modifier = Modifier.fillMaxSize(),
    key = key,
    contentDescription = null,
    tint = iconTint,
)

If you need special handling for Color.Unspecified, it already represents "no tint" and is the default, so the conditional is unnecessary.

🤖 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 59 - 67, The Icon call in InlineIconText.kt currently passes a
non-existent colorFilter parameter; replace that with the tint parameter by
removing the conditional and using tint = iconTint on the Icon invocation (the
Icon composable, the key argument and iconTint variable remain the same), since
Color.Unspecified already denotes no tint and no extra branching is required.
🤖 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 59-67: The Icon call in InlineIconText.kt currently passes a
non-existent colorFilter parameter; replace that with the tint parameter by
removing the conditional and using tint = iconTint on the Icon invocation (the
Icon composable, the key argument and iconTint variable remain the same), since
Color.Unspecified already denotes no tint and no extra branching is required.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bd81fe96-d18c-473e-a002-a980b436cdb0

📥 Commits

Reviewing files that changed from the base of the PR and between ea0fef5 and 98f71e3.

📒 Files selected for processing (21)
  • README.md
  • build.gradle.kts
  • gradle/libs.versions.toml
  • sdk/compose/codeviewer/build.gradle.kts
  • sdk/compose/foundation/build.gradle.kts
  • sdk/compose/highlights-core/build.gradle.kts
  • sdk/compose/icons/build.gradle.kts
  • sdk/intellij/psi/imagevector/build.gradle.kts
  • sdk/ir/compose/build.gradle.kts
  • tools/compose-app/build.gradle.kts
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ValkyrieToolWindow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/TextEditorWithImageVectorPreview.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/LinkIcon.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/highlight/CodeHighlight.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/icons/KotlinLogo.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/ui/placeholder/ErrorPlaceholder.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/existingpack/ui/ChooseExistingPackFile.kt
  • tools/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
✅ Files skipped from review due to trivial changes (13)
  • sdk/ir/compose/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/TextEditorWithImageVectorPreview.kt
  • build.gradle.kts
  • sdk/compose/foundation/build.gradle.kts
  • sdk/compose/icons/build.gradle.kts
  • tools/idea-plugin/CHANGELOG.md
  • sdk/compose/highlights-core/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/LinkIcon.kt
  • README.md
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/existingpack/ui/ChooseExistingPackFile.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/ui/placeholder/ErrorPlaceholder.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
  • sdk/compose/codeviewer/build.gradle.kts
🚧 Files skipped from review as they are similar to previous changes (4)
  • sdk/intellij/psi/imagevector/build.gradle.kts
  • tools/compose-app/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/highlight/CodeHighlight.kt
  • gradle/libs.versions.toml

@egorikftp egorikftp merged commit e09ec62 into main Apr 1, 2026
3 checks passed
@egorikftp egorikftp deleted the feature/jewel_0.34 branch April 1, 2026 19: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