Release v1.0.7: UX Improvements and Persistence - #8
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📝 WalkthroughWalkthroughThe 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
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
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().screenSizereturns the primary monitor dimensions only. For proper multi-monitor support, use the window'sgraphicsConfiguration.boundsinstead.🌐 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()
….0.7 release candidate.
Description
This release (v1.0.7) introduces several usability and accessibility improvements to the Typing Training plugin.
Key Changes:
Ctrl + Scroll Wheelsupport to resize the text font, with the dialog window scaling dynamically to fit.PersistentStateComponent.build.gradle.ktsoverride of change notes to favor theplugin.xmlsource.Fixed Issues:
Summary by CodeRabbit
New Features
Chores