ui: add custom stepper controls for numeric settings - #58
Conversation
Replace standard browser number inputs with custom stepper controls featuring +/- buttons to match the app\'s dark theme and Verification dropdown styling. Changes: - HTML: wrap connections, maxActive, retries fields in stepper-control - CSS: add styles for stepper buttons and inputs (dark theme) - JS: add initStepperControls() with proper min/max validation Fixes: - Remove non-standard "appearance: textfield" CSS - Fix NaN handling in parseInt for empty values - Clamp values on blur, not during typing Refs: #N/A
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds stepper controls to the Transfer settings numeric fields. The settings UI now wraps ChangesStepper Control for Transfer Settings
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/assets/static/index.html`:
- Around line 741-743: Update the stepper controls so each button in the related
input groups uses a field-specific aria-label instead of the generic
“Decrease”/“Increase”; adjust the buttons associated with the connections,
timeout, and the third stepped setting to include the setting name in their
labels. While updating the button markup, add aria-controls on each stepper
button to point to its corresponding input element, using the existing stepper
button structure and input ids to locate the controls.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 221f0e4b-a31f-4895-980c-4c53d825bc82
📒 Files selected for processing (3)
internal/assets/static/css/style.cssinternal/assets/static/index.htmlinternal/assets/static/js/app.js
Replace standard browser number inputs with custom stepper controls featuring +/- buttons to match the app\'s dark theme and Verification dropdown styling. Changes: - HTML: wrap connections, maxActive, retries fields in stepper-control - CSS: add styles for stepper buttons and inputs (dark theme) - JS: add initStepperControls() with proper min/max validation Fixes: - Remove non-standard "appearance: textfield" CSS - Fix NaN handling in parseInt for empty values - Clamp values on blur, not during typing Refs: #N/A
Closes #57
Summary
Replace standard browser number inputs with custom stepper controls featuring +/- buttons in Settings → Transfer section.
Problem
Numeric fields (Connections per file, Concurrent downloads, Retry attempts) used white browser spinners that didn't match the app's dark theme. The "Verification mode" dropdown was styled correctly and served as the reference.
Changes
HTML (
index.html):connections,maxActive,retriesfields in.stepper-control-and+buttons with proper ARIA labelsdata-defaultattributes for value restorationCSS (
style.css):.stepper-controlflex layoutJavaScript (
app.js):initStepperControls()functionparseBound()helperScreenshots
Before: White browser spinners
After: Styled +/- buttons matching dark theme
Testing
Checklist
go test ./internal/server)node --check)Summary by CodeRabbit