Fix/focus mode numeric string parsing#343
Conversation
|
@mayurigade-hub is attempting to deploy a commit to the Dot_NotSam's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
github.rest.pulls.createComment does not exist in the Octokit API. PR comments must use github.rest.issues.createComment with issue_number, since GitHub treats pull requests as issues for commenting purposes.
|
Hello @SamXop123 |
|
🎉 Congratulations @mayurigade-hub! 🎉 Your pull request has been successfully merged into Paraline! Thank you so much for your valuable contribution and effort. Every single improvement helps make Paraline a better desktop experience for everyone! 🙌 🚀 What's Next?
💬 Stay Connected: Thank you again, and keep up the amazing work! 💻✨ |
Related Issue
Closes #321
Description
Fixed an issue where Focus Mode settings such as
dimOpacity,idleTimeout, andtransitionDurationwere only accepted when stored as numeric values. If these settings were saved as numeric strings (e.g.,"0.4"or"20"), they were treated as invalid and reset to their default values.This fix updates
sanitizeFocusMode()to parse numeric strings usingNumber()/parseFloat()before applying validation and clamping, ensuring valid imported or manually edited settings are preserved.Changes Made
sanitizeFocusMode()to parse numeric string values.Steps to Test
settings.json.dimOpacity:0.4idleTimeout:20transitionDuration:2.5"abc"or""and verify they fall back to the default values.Expected Result
Files Changed
settingsStore.jsType of Change
☑️ Bug fix
☐ New feature
☐ Breaking change
☐ Documentation update