feat(shadow): add shadow style on invalid form control#7842
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnsures valid focused custom select controls do not display a box shadow by explicitly resetting the shadow styling in the validation state. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull request overview
Updates ValidateForm component styling intended to address visual feedback for validation states.
Changes:
- Normalizes the SCSS
@usedirective formatting/encoding at the top of the file. - Adds
box-shadow: none;to the valid (:valid/.is-valid) focus styles for form controls/selects.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .was-validated .form-control:valid:focus, | ||
| .form-control.is-valid:focus, | ||
| .was-validated .custom-select:valid:focus, | ||
| .custom-select.is-valid:focus { | ||
| border-color: var(--bs-success); | ||
| box-shadow: none; | ||
| } |
There was a problem hiding this comment.
This change adds box-shadow: none; for the valid focus state, but it doesn't add any shadow styling for the invalid form control state (the invalid focus block above still explicitly sets box-shadow: none;). If the goal is to "add shadow style on invalid form control" (Issue #7841 / PR title), the shadow should be introduced in the :invalid / .is-invalid selectors (e.g., set a danger-tinted box-shadow there) rather than disabling the valid shadow.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7842 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 764 764
Lines 34165 34165
Branches 4704 4704
=========================================
Hits 34165 34165
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The PR title and description mention adding shadow styling for invalid controls, but the diff only removes the box-shadow for valid-focused
.custom-select; consider clarifying or aligning the implementation with the stated intent. - If the goal is to standardize focus styling across controls, you may want to check whether similar
:valid:focusrules for other form elements also needbox-shadow: noneto keep the behavior consistent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The PR title and description mention adding shadow styling for invalid controls, but the diff only removes the box-shadow for valid-focused `.custom-select`; consider clarifying or aligning the implementation with the stated intent.
- If the goal is to standardize focus styling across controls, you may want to check whether similar `:valid:focus` rules for other form elements also need `box-shadow: none` to keep the behavior consistent.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Link issues
fixes #7841
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhancements: