Skip to content

Add floating zoom control bar to the icon grid for dynamic visual display size adjustment#973

Merged
egorikftp merged 1 commit into
mainfrom
feature/idea/web-import-zoom-actions
May 2, 2026
Merged

Add floating zoom control bar to the icon grid for dynamic visual display size adjustment#973
egorikftp merged 1 commit into
mainfrom
feature/idea/web-import-zoom-actions

Conversation

@egorikftp

@egorikftp egorikftp commented May 2, 2026

Copy link
Copy Markdown
Member
Screen.Recording.2026-05-02.at.14.12.59.mov

📝 Changelog

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

@egorikftp egorikftp requested a review from t-regbs May 2, 2026 11:18
@egorikftp egorikftp enabled auto-merge (rebase) May 2, 2026 11:20
@coderabbitai

coderabbitai Bot commented May 2, 2026

Copy link
Copy Markdown

Walkthrough

This PR adds a ZoomFloatingBar component for controlling icon display size (25%–200%) without affecting import settings and updates the changelog. It introduces JewelTheme.Companion.overlay and onOverlay colors, changes VerticalDivider to accept a color parameter, and adds enabled parameters to several toolbar/tooltip icon button APIs. Material and Standard import screens (and related UI) now maintain a scaleFactor state, apply scaled icon sizes, and conditionally render the floating zoom bar. Multiple UI components were updated to use the new theme overlay colors.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a floating zoom control bar to the icon grid for dynamic visual display size adjustment.
Description check ✅ Passed The PR description includes the required changelog checklist with the IntelliJ Plugin entry checked, satisfying the template requirements.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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/idea/web-import-zoom-actions

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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/IconSizeCustomization.kt (1)

64-64: ⚡ Quick win

HorizontalDivider not migrated to JewelTheme.onOverlay.

MaterialFontCustomization (the other customization panel with the same CustomizationToolbar + HorizontalDivider + content structure) was updated to JewelTheme.onOverlay in this PR. This panel was missed, leaving an inconsistency in light mode where LocalGroupHeaderStyle.current.colors.divider and JewelTheme.globalColors.borders.disabled will produce different divider colors.

♻️ Proposed fix
-import org.jetbrains.jewel.ui.component.styling.LocalGroupHeaderStyle
+import io.github.composegears.valkyrie.jewel.colors.onOverlay

 ...

-        HorizontalDivider(color = LocalGroupHeaderStyle.current.colors.divider)
+        HorizontalDivider(color = JewelTheme.onOverlay)
🤖 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/ui/screen/webimport/common/ui/IconSizeCustomization.kt`
at line 64, In IconSizeCustomization (the panel using CustomizationToolbar +
HorizontalDivider + content), replace the direct use of HorizontalDivider(color
= LocalGroupHeaderStyle.current.colors.divider) with the same pattern used in
MaterialFontCustomization by wrapping the divider in JewelTheme.onOverlay { ...
} and using the overlay border color (JewelTheme.globalColors.borders.disabled)
so the divider color is consistent in overlay/light modes; update the
HorizontalDivider invocation inside IconSizeCustomization accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/ZoomFloatingBar.kt`:
- Around line 46-47: The KDoc for the constant ZOOM_MIN_SCALE is incorrect (says
"50%") while the value is 0.25f (25%); update the comment above the
ZOOM_MIN_SCALE constant in ZoomFloatingBar.kt to state the correct minimum scale
("25%") so it matches the value and the CHANGELOG (25%–200%).
- Around line 138-155: Replace the three hardcoded user-facing strings in
ZoomFloatingBar.kt with stringResource calls: change the TooltipIconButton/Text
contentDescription and tooltipText that currently use "Zoom", "Collapse zoom
bar", and "Collapse" to use localized string resource keys (e.g., create/use
keys like accessibility.zoom, accessibility.zoom.collapseBar,
accessibility.collapse) and reference them via stringResource(...) where
TooltipIconButton and the Text use the values; add the corresponding entries to
the strings resource file so the keys resolve.

---

Nitpick comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/IconSizeCustomization.kt`:
- Line 64: In IconSizeCustomization (the panel using CustomizationToolbar +
HorizontalDivider + content), replace the direct use of HorizontalDivider(color
= LocalGroupHeaderStyle.current.colors.divider) with the same pattern used in
MaterialFontCustomization by wrapping the divider in JewelTheme.onOverlay { ...
} and using the overlay border color (JewelTheme.globalColors.borders.disabled)
so the divider color is consistent in overlay/light modes; update the
HorizontalDivider invocation inside IconSizeCustomization accordingly.
🪄 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: 3bd7de4a-72fa-4706-9e61-915f7943a555

📥 Commits

Reviewing files that changed from the base of the PR and between 1d04e82 and 7727540.

📒 Files selected for processing (12)
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/Toolbar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/VerticalDivider.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/button/TooltipIconButton.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/colors/JewelColors.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/ui/DragAndDropOverlay.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/IconSizeCustomization.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/ZoomFloatingBar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/MaterialSymbolsImportScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/ui/MaterialFontCustomization.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/StandardImportScreenUI.kt

@egorikftp egorikftp force-pushed the feature/idea/web-import-zoom-actions branch from 7727540 to 31aa1c3 Compare May 2, 2026 11:30

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/button/TooltipIconButton.kt (1)

39-58: ⚡ Quick win

ImageVector overload is missing the enabled parameter — API asymmetry with the IconKey overload.

Both overloads delegate to IconActionButton, which accepts enabled regardless of whether it receives an IconKey or a Painter. Leaving it off the ImageVector overload means callers using that path can never disable the button.

♻️ Proposed fix
 `@Composable`
 fun TooltipIconButton(
     imageVector: ImageVector,
     contentDescription: String?,
     onClick: () -> Unit,
     tooltipText: String,
     modifier: Modifier = Modifier,
+    enabled: Boolean = true,
 ) {
     IconActionButton(
         modifier = modifier,
         painter = rememberVectorPainter(imageVector),
         onClick = onClick,
         focusable = false,
+        enabled = enabled,
         contentDescription = contentDescription,
         tooltip = {
             Text(text = tooltipText)
         },
     )
 }
🤖 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/button/TooltipIconButton.kt`
around lines 39 - 58, The ImageVector overload TooltipIconButton is missing an
enabled parameter, causing API asymmetry with the IconKey overload and
preventing callers from disabling the button; add an enabled: Boolean = true
parameter to TooltipIconButton and pass it through to the delegated
IconActionButton call (i.e., include enabled in the IconActionButton(...)
argument list) so both overloads accept and forward the enabled flag
consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/button/TooltipIconButton.kt`:
- Around line 39-58: The ImageVector overload TooltipIconButton is missing an
enabled parameter, causing API asymmetry with the IconKey overload and
preventing callers from disabling the button; add an enabled: Boolean = true
parameter to TooltipIconButton and pass it through to the delegated
IconActionButton call (i.e., include enabled in the IconActionButton(...)
argument list) so both overloads accept and forward the enabled flag
consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ccd920fa-9096-495f-af2f-9e7ec35a15b1

📥 Commits

Reviewing files that changed from the base of the PR and between 7727540 and 31aa1c3.

📒 Files selected for processing (13)
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/Toolbar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/VerticalDivider.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/button/TooltipIconButton.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/colors/JewelColors.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/ui/DragAndDropOverlay.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/IconSizeCustomization.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/ZoomFloatingBar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/MaterialSymbolsImportScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/ui/MaterialFontCustomization.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/StandardImportScreenUI.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
✅ Files skipped from review due to trivial changes (7)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/ui/DragAndDropOverlay.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/VerticalDivider.kt
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/StandardImportScreenUI.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/ui/MaterialFontCustomization.kt
🚧 Files skipped from review as they are similar to previous changes (4)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/IconSizeCustomization.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/colors/JewelColors.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/ZoomFloatingBar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/Toolbar.kt

@egorikftp egorikftp force-pushed the feature/idea/web-import-zoom-actions branch from 31aa1c3 to 606cc2b Compare May 2, 2026 11:40

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/colors/JewelColors.kt (1)

44-52: ⚡ Quick win

Avoid tying a theme token to LocalGroupHeaderStyle.

JewelTheme.onOverlay now varies with a component-local style in dark mode, so the same overlay surface can resolve to different divider colors depending on where it is read. If that variability isn’t intentional, keep this accessor derived from the Jewel theme palette only.

🤖 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/colors/JewelColors.kt`
around lines 44 - 52, JewelTheme.onOverlay currently reads from
LocalGroupHeaderStyle in dark mode which ties a global theme token to a
component-local style; change it to derive solely from the Jewel theme palette
instead. Replace the conditional branch that returns
LocalGroupHeaderStyle.current.colors.divider with a lookup on
JewelTheme.globalColors (for example use the same borders.disabled token or the
appropriate onOverlay/divider token from JewelTheme.globalColors) so both dark
and light branches come from theme tokens (keep the existing light branch
JewelTheme.globalColors.borders.disabled or swap both branches to a single
globalColors token).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/colors/JewelColors.kt`:
- Around line 44-52: JewelTheme.onOverlay currently reads from
LocalGroupHeaderStyle in dark mode which ties a global theme token to a
component-local style; change it to derive solely from the Jewel theme palette
instead. Replace the conditional branch that returns
LocalGroupHeaderStyle.current.colors.divider with a lookup on
JewelTheme.globalColors (for example use the same borders.disabled token or the
appropriate onOverlay/divider token from JewelTheme.globalColors) so both dark
and light branches come from theme tokens (keep the existing light branch
JewelTheme.globalColors.borders.disabled or swap both branches to a single
globalColors token).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7dd8691f-918e-4b94-82bb-ac590a3498e5

📥 Commits

Reviewing files that changed from the base of the PR and between 31aa1c3 and 606cc2b.

📒 Files selected for processing (13)
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/Toolbar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/VerticalDivider.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/button/TooltipIconButton.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/colors/JewelColors.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/ui/DragAndDropOverlay.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/IconSizeCustomization.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/ZoomFloatingBar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/MaterialSymbolsImportScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/ui/MaterialFontCustomization.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/StandardImportScreenUI.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
✅ Files skipped from review due to trivial changes (7)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/ui/MaterialFontCustomization.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/SidePanel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/VerticalDivider.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/Toolbar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/ui/ZoomFloatingBar.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/MaterialSymbolsImportScreen.kt
🚧 Files skipped from review as they are similar to previous changes (3)
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/ui/DragAndDropOverlay.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/standard/common/StandardImportScreenUI.kt

@t-regbs t-regbs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one 🚀

)
AnimatedVisibility(
visible = expanded,
enter = expandHorizontally(expandFrom = Alignment.End) + fadeIn(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: the repeated expandHorizontally(...) + fadeIn() / shrinkHorizontally(...) + fadeOut() specs could be extracted locally

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check it, thanks)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto merged, will be separate pr 😄

@egorikftp egorikftp merged commit 7c83d70 into main May 2, 2026
3 checks passed
@egorikftp egorikftp deleted the feature/idea/web-import-zoom-actions branch May 2, 2026 15:08
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