Skip to content

Release v1.0.7: UX Improvements and Persistence - #8

Merged
Kiolk merged 4 commits into
mainfrom
release/v1.0.7
Feb 4, 2026
Merged

Release v1.0.7: UX Improvements and Persistence#8
Kiolk merged 4 commits into
mainfrom
release/v1.0.7

Conversation

@Kiolk

@Kiolk Kiolk commented Feb 4, 2026

Copy link
Copy Markdown
Owner

Description

This release (v1.0.7) introduces several usability and accessibility improvements to the Typing Training plugin.

Key Changes:

  • Dynamic Window Resizing: The typing dialog now automatically adjusts its size based on the text content.
  • Interactive Text Zooming: Added Ctrl + Scroll Wheel support to resize the text font, with the dialog window scaling dynamically to fit.
  • Persistent Settings: Your preferred font size is now saved across sessions and IDE restarts using PersistentStateComponent.
  • Smart Auto-Scrolling: Improved cursor visibility with automatic scrolling that maintains a comfortable margin (at least 3 characters or one line) from the window edges.
  • Clean Configuration: Reverted build.gradle.kts override of change notes to favor the plugin.xml source.

Fixed Issues:

Summary by CodeRabbit

  • New Features

    • Dynamic window resizing based on text content to optimize display.
    • Interactive text zooming via Ctrl + Scroll Wheel for better readability.
    • Persistent font size preferences saved automatically across sessions.
    • Smart auto-scrolling maintains cursor visibility with automatic margin adjustments.
  • Chores

    • Project version updated to 1.0.7 and release metadata cleaned.

@coderabbitai

coderabbitai Bot commented Feb 4, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Kiolk has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 28 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

The release bumps the plugin version to 1.0.7, persists font size via TypingService, and adds Ctrl+MouseWheel zoom and dynamic auto-resizing with improved cursor visibility in the typing dialog.

Changes

Cohort / File(s) Summary
Build & Versioning
build.gradle.kts
Version updated from 1.0.61.0.7; removed the changeNotes block from the IntelliJ plugin configuration.
Service State & API
src/main/kotlin/com/github/kiolk/typingplugin/service/TypingService.kt
Added fontSize: Int = 14 to State; exposed getFontSize() and setFontSize(size: Int) for persisting font size.
UI Dialog Enhancements
src/main/kotlin/com/github/kiolk/typingplugin/ui/TypingDialog.kt
Introduced centerPanel and typingService integration; disabled dimension service key (returns null); added Ctrl+MouseWheel zoom handling (handleZoom), dynamic sizing (updateWindowSize), caret/padding maintenance, and mouse-wheel/drag wiring.
Plugin Metadata
src/main/resources/META-INF/plugin.xml
Replaced previous change-notes with feature entries describing dynamic resizing, interactive zoom, persisted font size, and smart auto-scrolling.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Dialog as TypingDialog
    participant TextPane as TextPane
    participant Service as TypingService

    User->>Dialog: Ctrl + MouseWheel
    Dialog->>Dialog: handleZoom(event)
    Dialog->>TextPane: setFont(newSize)
    TextPane-->>Dialog: fontUpdated
    Dialog->>Service: setFontSize(newSize)
    Service-->>Dialog: persisted
    Dialog->>Dialog: updateWindowSize()
    Dialog->>TextPane: ensureCaretVisible()
    Dialog-->>User: resized & redrawn
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐇 I nibble keys and tweak the size,

Ctrl+scroll makes text grow wise.
Windows swell to fit the line,
Fonts remember, snug and fine.
Hop, zoom, persist — a coder's prize.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Release v1.0.7: UX Improvements and Persistence' accurately summarizes the main changes: a version bump, UX improvements (dynamic resizing, zooming, auto-scrolling), and persistence features.
Linked Issues check ✅ Passed The PR successfully addresses both linked issues: #5 is resolved through dynamic window resizing in TypingDialog, and #6 is resolved through interactive text zooming (Ctrl + Scroll Wheel) with persistent font size settings.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issues: version bump, fontSize property/accessors, dialog resizing logic, zoom handling, persistence integration, and updated changelog are all within scope.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release/v1.0.7

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.

@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: 1

🤖 Fix all issues with AI agents
In `@src/main/kotlin/com/github/kiolk/typingplugin/service/TypingService.kt`:
- Around line 18-21: Persisted fontSize must be clamped to a safe range to avoid
0/negative or extreme values: add a small helper to clamp values (e.g.,
minFontSize = 10, maxFontSize = 36) and use it wherever font size is set or
loaded — specifically validate State.fontSize on creation/restore and in the
setter that changes font size (refer to the State data class and any methods
named setFontSize, loadState, restoreState or similar) so incoming or mutated
values are constrained to the safe range.
🧹 Nitpick comments (1)
src/main/kotlin/com/github/kiolk/typingplugin/ui/TypingDialog.kt (1)

205-219: Use the window's graphics configuration for multi-monitor sizing.
Toolkit.getDefaultToolkit().screenSize returns the primary monitor dimensions only. For proper multi-monitor support, use the window's graphicsConfiguration.bounds instead.

🌐 Suggested fix (multi-monitor aware)
-        val screenSize = Toolkit.getDefaultToolkit().screenSize
-        val maxAvailableWidth = (screenSize.width * 0.9).toInt()
-        val maxAvailableHeight = (screenSize.height * 0.9).toInt()
+        val screenBounds =
+            SwingUtilities.getWindowAncestor(centerPanel)
+                ?.graphicsConfiguration
+                ?.bounds
+                ?: Rectangle(0, 0, Toolkit.getDefaultToolkit().screenSize.width, Toolkit.getDefaultToolkit().screenSize.height)
+        val maxAvailableWidth = (screenBounds.width * 0.9).toInt()
+        val maxAvailableHeight = (screenBounds.height * 0.9).toInt()

@Kiolk
Kiolk merged commit d72bcd4 into main Feb 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resize size of the text. Dialog screen should resize to size of selected text for practice.

1 participant