Skip to content

Conversation

@egorikftp
Copy link
Member

@egorikftp egorikftp commented Jan 13, 2026

Screenshot 2026-01-13 at 18 16 17

@egorikftp
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 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.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Walkthrough

This pull request refactors code highlighting and settings UI components. The rememberCodeHighlight function is relocated from the sdk/compose/codeviewer module to the sdk/compose/highlights-core module, with imports updated accordingly. In the IDE plugin, the excludeCompose() extension function is extracted to the build-logic convention module. Multiple settings UI components are reorganized: PreviewAnnotationSection, SelectableCard, SwitchOption, IndentSizeSection, and OutputFormatSection are removed, while new components like CheckboxSettingsRow, DropdownSettingsRow, RadioButtonGroup, RadioButtonTooltipRow, and KtCodeViewer are introduced. The GeneratorSettingsScreen is rewritten to use the new components. Preview function visibility is narrowed from internal to private across several files. New settings resource strings for code style and preview types are added.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
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.
Description check ❓ Inconclusive The description contains only an image screenshot without any textual explanation of the changes, making it extremely vague and non-informative about the actual modifications. Add a detailed description explaining the migration scope, key changes, components affected, and any migration rationale or breaking changes introduced.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Migrate Settings plugin to Jewel' directly describes the main objective of the pull request, which involves migrating Settings UI components to the Jewel design system.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@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

🤖 Fix all issues with AI agents
In
@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt:
- Around line 18-42: Remove the obsolete CheckboxRow implementation
(CheckboxRow.kt) that conflicts with the new component; delete the
CheckboxRow.kt file entirely and update any remaining references to use the new
CheckboxSettingsRow and the Jewel CheckboxRow by ensuring import
org.jetbrains.jewel.ui.component.CheckboxRow is present in CheckboxSettingsRow;
verify no other files define or call the old CheckboxRow symbol so compilation
uses the imported Jewel CheckboxRow and the new CheckboxSettingsRow exclusively.
🧹 Nitpick comments (5)
tools/idea-plugin/build.gradle.kts (1)

19-32: Consider cleaning up or documenting commented exclusions.

The commented-out exclusions (lines 21-31) appear to be leftover references. If they serve as documentation for potential future exclusions, consider adding a brief comment explaining their purpose. Otherwise, removing dead commented code improves readability.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (1)

34-37: Consider localizing the content description.

The hardcoded "Help" string could be extracted to Valkyrie.properties for consistency with other UI strings, especially if localization is a future consideration.

♻️ Suggested change
             Icon(
                 key = AllIconsKeys.General.ContextHelp,
-                contentDescription = "Help",
+                contentDescription = stringResource("accessibility.help"),
             )
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (1)

33-33: Clarify or remove the @Suppress("UNUSED_PARAMETER") annotation.

All parameters appear to be used in the function body. If this suppress was added for a specific reason (e.g., menuContent lambda parameter naming), consider adding a comment explaining why, or remove it if it's no longer needed.

sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)

23-23: Consider the stability of vararg in remember keys.

Using emphasisLocation (a vararg/array) as a remember key works correctly because arrays use reference equality. However, if callers recreate arrays on each recomposition, this could cause unnecessary recomputations. This is likely fine for the current use cases where emphasis locations are typically stable.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt (1)

56-56: Document which experimental API requires the opt-in.

The @OptIn(ExperimentalFoundationApi::class) annotation is added but it's not immediately clear which component requires it. Consider adding a brief comment indicating this is for Tooltip (used in RadioButtonTooltipRow) or another specific API to help future maintainers understand the dependency.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 308ee55 and ae2484d.

📒 Files selected for processing (30)
  • build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt
  • sdk/compose/codeviewer/api/codeviewer.api
  • sdk/compose/codeviewer/api/codeviewer.klib.api
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/CodeViewer.kt
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/Common.kt
  • sdk/compose/highlights-core/api/highlights-core.api
  • sdk/compose/highlights-core/api/highlights-core.klib.api
  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
  • tools/idea-plugin/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/AboutSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/IndentSizeSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/OutputFormatSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SelectableCard.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SwitchOption.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ui/PreviewBgSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonGroup.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
💤 Files with no reviewable changes (8)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SwitchOption.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/OutputFormatSection.kt
  • sdk/compose/codeviewer/api/codeviewer.klib.api
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/Common.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/IndentSizeSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SelectableCard.kt
  • sdk/compose/codeviewer/api/codeviewer.api
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2026-01-13T10:00:23.462Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 807
File: tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt:19-22
Timestamp: 2026-01-13T10:00:23.462Z
Learning: The Highlights library used in the codebase does not support XML syntax highlighting. When displaying XML content (e.g., in XmlCodeViewer), Kotlin syntax highlighting is used as a fallback workaround.

Applied to files:

  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt
  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
  • sdk/compose/highlights-core/api/highlights-core.api
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/CodeViewer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt
  • sdk/compose/highlights-core/api/highlights-core.klib.api
📚 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:

  • build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt
  • tools/idea-plugin/build.gradle.kts
📚 Learning: 2026-01-01T18:09:41.901Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 801
File: gradle/libs.versions.toml:14-14
Timestamp: 2026-01-01T18:09:41.901Z
Learning: In the Valkyrie project (ComposeGears/Valkyrie), compose-ui-tooling-preview must use version 1.10.0 (even though runtime Compose is 1.8.2) because 1.10.0+ provides unified KMP preview annotation support required for IntelliJ IDEA 2025.3+ preview functionality.

Applied to files:

  • build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt
  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
  • tools/idea-plugin/build.gradle.kts
📚 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:

  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt
🧬 Code graph analysis (8)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxRow.kt (1)
  • CheckboxRow (17-41)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (1)
sdk/compose/foundation/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/foundation/layout/Row.kt (1)
  • CenterVerticalRow (10-20)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxRow.kt (2)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/theme/Theme.kt (1)
  • PreviewTheme (51-74)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/tooling/PreviewTheme.kt (1)
  • PreviewTheme (12-25)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (3)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/theme/Theme.kt (1)
  • PreviewTheme (51-74)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/tooling/PreviewTheme.kt (1)
  • PreviewTheme (12-25)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt (1)
  • CheckboxSettingsRow (18-42)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt (2)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/theme/Theme.kt (1)
  • PreviewTheme (51-74)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/tooling/PreviewTheme.kt (1)
  • PreviewTheme (12-25)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (1)
sdk/compose/foundation/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/foundation/layout/Row.kt (1)
  • CenterVerticalRow (10-20)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt (1)
sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)
  • rememberCodeHighlight (17-31)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt (8)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (2)
  • Group (21-39)
  • GroupSpacing (41-43)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt (1)
  • stringResource (14-18)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (1)
  • DropdownSettingsRow (34-80)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonGroup.kt (1)
  • RadioButtonGroup (21-38)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (1)
  • RadioButtonTooltipRow (17-40)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt (1)
  • KtCodeViewer (14-24)
sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)
  • rememberCodeHighlight (17-31)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt (1)
  • PreviewAnnotationSection (30-84)
⏰ 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 (35)
build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt (1)

1-11: LGTM!

Clean extraction of the excludeCompose() helper to a shared convention module. This promotes reusability across multiple build scripts that may need the same Compose exclusions.

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

1-1: LGTM!

Correctly imports the extracted excludeCompose extension from the shared convention module.


55-58: LGTM!

The excludeCompose() extension is correctly applied to the foundation dependency, maintaining the same exclusion behavior as before while benefiting from the shared implementation.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxRow.kt (1)

43-54: LGTM!

The visibility change from internal to private for the preview function is appropriate. Preview composables are typically only used within their containing file for design-time rendering and don't need broader visibility.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ui/PreviewBgSection.kt (2)

1-1: LGTM!

Package reorganization to ...tabs.preview.ui improves module structure by grouping UI components in a dedicated subpackage.


224-232: LGTM!

Visibility narrowed to private for the preview function, consistent with the PR-wide pattern.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt (1)

110-121: LGTM!

Visibility narrowed to private for the preview function, consistent with the PR-wide pattern of restricting preview composables to file scope.

sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/CodeViewer.kt (1)

12-12: LGTM!

Import path updated to source rememberCodeHighlight from the new highlights.core module location. This aligns with the PR's consolidation of highlighting utilities.

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

11-11: LGTM!

Import path updated to source rememberCodeHighlight from the new highlights.core module, consistent with the codebase-wide migration of this API.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/AboutSettingsScreen.kt (1)

74-78: LGTM!

Narrowing the preview function visibility from internal to private is appropriate since it's only used for IDE previews within this file. This aligns with the consistent visibility changes across other settings screen previews in this PR.

tools/idea-plugin/src/main/resources/messages/Valkyrie.properties (3)

28-29: LGTM!

New settings group keys are well-structured and follow the existing naming conventions.


37-37: LGTM!

The wording change from "Handle" to "Use" is clearer and more user-friendly.


43-45: LGTM!

New preview type options are appropriately named and support the AndroidX vs JetBrains preview annotation selection feature.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (2)

17-40: LGTM!

The composable is well-structured with proper parameter ordering following Compose conventions. The @OptIn(ExperimentalFoundationApi::class) is required for the Jewel Tooltip component.


42-53: LGTM!

Preview function is appropriately private and demonstrates the component usage clearly.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonGroup.kt (2)

21-38: LGTM!

Well-designed grouping component with appropriate use of @Nls annotation for IntelliJ plugin NLS compliance. The nested layout with proper indentation (16.dp start padding) creates clear visual hierarchy for grouped radio options.


40-60: LGTM!

The preview effectively demonstrates interactive state management with rememberMutableState, making it useful for visual testing during development.

sdk/compose/highlights-core/api/highlights-core.klib.api (1)

11-11: LGTM!

The rememberCodeHighlight function is appropriately added to the highlights-core public API. Centralizing this composable in the highlights-core module improves modularity by separating the highlighting concerns from the code viewer presentation layer.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (3)

56-68: Empty onClick and secondaryOnClick handlers may confuse users.

The OutlinedSplitButton has empty click handlers, which means clicking the button text does nothing—only the dropdown arrow works. If this is intentional (dropdown-only behavior), consider adding a brief comment explaining this design choice for maintainability.


44-77: LGTM on the offset calculation logic.

The approach of using onGloballyPositioned to align the InfoText with the split button is a reasonable solution for dynamic alignment. The density conversion and relative offset calculation are correctly implemented.


82-115: Preview implementation looks good.

The preview demonstrates the component's functionality well, including the dropdown menu with tooltip integration.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (1)

47-58: LGTM on the component migration and visibility change.

The switch from CheckboxRow to CheckboxSettingsRow aligns with the new settings UI components, and narrowing the preview visibility to private is consistent with the pattern across this PR.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt (1)

8-8: LGTM on the import path update.

The import change correctly reflects the relocation of rememberCodeHighlight to the highlights-core module.

sdk/compose/highlights-core/api/highlights-core.api (1)

4-4: LGTM on the public API addition.

The new rememberCodeHighlight function is correctly exposed in the public API surface, enabling consistent code highlighting across modules.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt (2)

14-24: LGTM on the KtCodeViewer implementation.

Clean and focused component that renders highlighted code using Jewel's typography and the highlights library.


26-46: Preview demonstrates the component well.

The preview provides a good example of how to use KtCodeViewer with rememberCodeHighlight.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt (2)

21-22: LGTM on the component migration.

The switch to CheckboxSettingsRow and the addition of PreviewBgSection import align with the settings UI migration to Jewel components.

Also applies to: 47-58


72-72: LGTM on the visibility change.

Narrowing the preview function visibility to private is consistent with the pattern across this PR.

sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)

17-31: LGTM on the new rememberCodeHighlight composable.

The implementation correctly uses remember with appropriate keys. The centralization of this function in the highlights-core module is a good architectural decision for reuse across the codebase.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt (1)

44-55: LGTM!

The preview demonstrates interactive state management with rememberMutableState and covers both the checkbox and info text rendering.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt (2)

30-84: LGTM!

The component is well-structured with:

  • Clean separation between the main toggle and conditional radio group
  • Appropriate animation combinations (expand + fade)
  • Consistent tooltip pattern using KtCodeViewer with theme-aware highlighting

86-104: LGTM!

The hint strings correctly showcase the import difference between AndroidX (androidx.compose.ui.tooling.preview.Preview) and JetBrains Desktop (androidx.compose.desktop.ui.tooling.preview.Preview) preview annotations.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt (3)

63-149: LGTM!

The UI is well-organized with:

  • Logical grouping of code style vs. ImageVector generation settings
  • Clean use of VerticallyScrollableContainer for overflow handling
  • Proper wiring of all settings to their respective SettingsAction callbacks
  • Consistent use of the new UI components (CheckboxSettingsRow, DropdownSettingsRow, RadioButtonGroup)

152-172: LGTM!

The hint strings clearly illustrate the difference between the backing property pattern (with null check and private field) and the lazy delegate pattern, helping users understand the output format options.


174-212: LGTM!

The preview function provides comprehensive interactive testing with:

  • Individual rememberMutableState for each setting
  • Complete onAction handler covering all relevant SettingsAction types
  • Proper reconstruction of GeneratorSettings from local state

This allows for full UI interaction testing in preview mode.

@egorikftp egorikftp force-pushed the task/jewel_migration branch from ae2484d to 17ef466 Compare January 13, 2026 19:45
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.

2 participants