Feature/improve custom rotate#631
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughIncreased thumbnail preview size and adjusted grid layout; enabled floating-point rotation inputs with 0.1-degree steps and one-decimal rounding for both per-page and batch rotation controls. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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 |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/js/logic/rotate-custom-page.ts`:
- Around line 152-153: The parseFloat usage in the apply handlers (e.g., where
you read input.value and set pageState.rotations[pageIndex]) accepts
NaN/Infinity and un-normalized numbers; fix by validating the parsed value with
Number.isFinite and normalizing to one decimal place before assignment (e.g.,
parse -> Number.isFinite check -> round to one decimal such as Math.round(value
* 10) / 10) and fallback to 0 when invalid; apply the same change to both the
handler that sets pageState.rotations[pageIndex] and the other apply path around
the code referenced near line 393 so all typed angles enforce finite values and
one-decimal precision.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: a57585cb-7a59-42ec-9602-678c7aec094f
📒 Files selected for processing (3)
docs/tools/rotate-custom.mdsrc/js/logic/rotate-custom-page.tssrc/pages/rotate-custom.html
7f9c352 to
ec178bd
Compare
Description
This PR improves the usability of the "Rotate by Custom Degrees" tool by addressing two limitations:
h-36toh-64) and reduced grid density to improve visual feedback when adjusting small rotation angles.parseIntwithparseFloat, addedstep="0.1"to inputs, and implemented rounding to 1 decimal place for more precise control.Fixes #630
Type of change
Please delete options that are not relevant.
🧪 How Has This Been Tested?
Please describe how you tested your changes so that maintainers can verify them. Include enough detail for someone else to reproduce your tests.
Checklist:
Test details:
1.2,-0.8)Checklist:
Summary by CodeRabbit