Repository navigation
fix(admin/settings): inline range errors below input, SP coverage validation, laddering toggle label - #1433
Conversation
…idation, laddering toggle label (#1411 #1412) Four related UX regressions in Admin settings fixed: 1. Inline range validation (#1411 rows 4.3/5.3/7.13/9.3/9.6/9.9): error element was inserted as a flex sibling inside .setting-input, causing it to appear to the right of the input rather than below it. Fix: wireInlineRangeValidation now inserts after .setting-input (or enclosing label for SP cards) so the error falls outside the flex container. Added flex-wrap: wrap and .setting-row > .field-error { flex-basis: 100% } to settings.css to make it span full width below the label+input row. 2. SP coverage inline validation (#1411 row 7.13): aws-savings-plans-*-coverage inputs were not wired to wireInlineRangeValidation. setupSettingsHandlers now iterates SERVICE_FIELDS with coverageId and wires each one. 3. Laddering toggle label clickable (#1412 row 3.1): ladder.ts used <label for="setting-laddering-enabled"> which made the label text a click target that toggled the checkbox. Changed to <span class="label-like"> + aria-labelledby and wrapped the checkbox in <label class="toggle-label"> to match the auto-collect pattern from issue #464. 4. Cancel does not clear dirty state (#1412 rows 7.4/7.9): code already called updateDirtyMarkers() on cancel; tests added to prevent regression. Tests: 17 new tests (2620 total, 0 fail). Build: webpack clean. Closes #1411 Closes #1412
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Merged to main after independent review (SHIP) + all CI green. inline range validation now renders below the input (flex-wrap) + SP-coverage inputs wired; laddering toggle label fixed; admin settings UX regressions guarded. |
Summary
Fixes two Admin settings regression issues (#1411, #1412) in a single coordinated change on the same surface.
#1411 -- Inline range validation not shown as user types
wireInlineRangeValidationinserted the error<small>element viainsertAdjacentElement('afterend', input), placing it as a flex item inside.setting-input { display: flex }. In the real browser the error appeared to the right of the input (not below it). Tests passed because the test DOM has bare inputs with no flex container.input.closest('.setting-input') ?? input.closest('label') ?? inputso the error element lands outside the flex row.flex-wrap: wrapto.setting-rowand.setting-row > .field-error { flex-basis: 100% }so a direct-child error spans full width and wraps below the label+input row.aws-savings-plans-*-coverageinputs (row 7.13 was missing entirely).#1412 -- Multiple UX regressions
ladder.tsused<label for="setting-laddering-enabled">making the label text toggle the checkbox. Changed to<span class="label-like" id="...">+aria-labelledbyon the input +<label class="toggle-label">wrapper, matching the auto-collect pattern from issue ux(settings): "Auto-collect Recommendations" label is clickable; should be toggle-only #464.updateDirtyMarkers()on cancel. Tests added to prevent future regression.Test plan
npm test), 0 failures (17 new tests added)npm run buildsucceeds (webpack clean, same pre-existing bundle-size warning only)Closes #1411
Closes #1412