fix(alerts): remove double border on InputNumber fields in report modal#42090
Conversation
The screenshot width and alert threshold fields passed type="number" to
antd's InputNumber. antd forwards unknown props to the inner <input>, so it
rendered as <input type="number"> and matched the
StyledInputContainer rule input[type='number'] { border: 1px solid ... },
drawing a bordered box inside the already-bordered .ant-input-number wrapper
(a "box within a box") and adding native spinners on top of antd's step
handles. Removing the redundant prop lets InputNumber own its single border.
Update two toHaveValue assertions accordingly: without type="number",
jest-dom reads the value as a string.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42090 +/- ##
=======================================
Coverage 65.08% 65.08%
=======================================
Files 2747 2747
Lines 153926 153926
Branches 35304 35304
=======================================
Hits 100186 100186
Misses 51828 51828
Partials 1912 1912
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🎪 Showtime deployed environment on GHA for 2b10149 • Environment: http://34.217.126.139:8080 (admin/admin) |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🎪 Showtime deployed environment on GHA for 17b6c48 • Environment: http://100.23.169.161:8080 (admin/admin) |
aminghadersohi
left a comment
There was a problem hiding this comment.
Verified both edits are on antd InputNumber (not plain Input) at the threshold and screenshot-width fields — type="number" was inert there and only leaked onto the inner native input, colliding with the StyledInputContainer input[type='number'] border rule. min/max props are untouched, no InputNumber+type="number" combo remains in the file, and the test changes correctly assert the fix. CI green, clean root-cause fix — approving.
Code Review Agent Run #ddaaa1Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
The Screenshot width field (and the alert Value/threshold field) in the Alert/Report modal rendered a "box within a box": a bordered input nested inside the already-bordered
InputNumbercontrol, with native browser number spinners layered on top of antd's own step handles.Root cause: both fields passed
type="number"to antd'sInputNumber. antd forwards unrecognized props to the inner<input>, so it became<input type="number">. That matched a rule in the modal'sStyledInputContainerstyled component:which gave the inner
<input>its own border/padding on top of the wrapping.ant-input-numberborder — hence the nested box. Thetypeprop was redundant anyway:InputNumberalready restricts input to numeric values.The fix removes
type="number"from bothInputNumberinstances so the component owns its single border. Othertype="number"usages in the codebase are on antd's plainInput(a single bordered element) and are unaffected.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Rendered with the project's antd version and the exact
StyledInputContainerCSS:Screen.Recording.2026-07-15.at.2.05.45.PM.mov
Screen.Recording.2026-07-15.at.10.21.43.PM.mov
TESTING INSTRUCTIONS
Unit tests:
AlertReportModal.test.tsxpasses (68/68).ADDITIONAL INFORMATION
FEATURE FLAGS
FEATURE_ALERT_REPORTS=true
FEATURE_ALERT_REPORT_TABS=true
FEATURE_ALERT_REPORTS_FILTER=true