fix: allow whole number heights for custom devices (#1307)#1308
fix: allow whole number heights for custom devices (#1307)#1308
Conversation
The number input for device height had min=0.5 but no step attribute, causing the browser to only accept values in the sequence 0.5, 1.5, 2.5... Adding step="0.5" allows both whole numbers and half-U values. Fixes #1307 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA step attribute of 0.5 is added to the height input field in the AddDeviceForm component, allowing fractional height values in increments of 0.5 while preserving existing validation boundaries. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
User description
Summary
min=0.5with nostepattribute, causing the browser to only accept values in the sequence 0.5, 1.5, 2.5... (offset by the min value)step="0.5"so both whole numbers (1, 2, 3) and half-U values (0.5, 1.5) are validTest plan
Closes #1307
CodeAnt-AI Description
Allow entering whole-number and half-U device heights in Add Device form
What Changed
Impact
✅ Accept whole and half-U heights✅ Fewer failed add-device attempts✅ Precise stepper increments by 0.5💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.