-
Notifications
You must be signed in to change notification settings - Fork 0
[CDX-335] Feature: Create Visual Filter component (color swatch & image thumbnail) #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[CDX-335] Feature: Create Visual Filter component (color swatch & image thumbnail) #31
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| checkboxPosition={checkboxPosition} | ||
| displayValue={displayValue} | ||
| className={cn('cio-visual-filter-option-list-row', className)} | ||
| data-slot='visual-filter-option-list-row' |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data-slot value 'visual-filter-option-list-row' is inconsistent with the test expectation and comment on line 135 which expects 'visual-filter' based on the test description. Review for consistency.
| data-slot='visual-filter-option-list-row' | |
| data-slot='visual-filter' |
Code Review Results✅ StrengthsWell-structured component architecture with comprehensive test coverage, good accessibility implementation, and proper TypeScript type definitions. 🚨 Critical Issues[File: onError={(e) => {
e.currentTarget.style.display = 'none';
e.currentTarget.parentElement?.classList.add('bg-gray-200');
}}Recommendation: Use React state to manage the error condition: const [imageError, setImageError] = useState(false);
// In render:
{type === 'image' && !imageError ? (
<img src={value} alt={name} onError={() => setImageError(true)} />
) : (
<div className="bg-gray-200" />
)}[File: Recommendation: Remove the type check: if (!value || value.trim() === '') {
// fallback...
}
|
Pull Request Checklist
Before you submit a pull request, please make sure you have to following:
PR Type
What kind of change does this PR introduce?
@HHHindawy @TarekAlQaddy @Mudaafi
componentOverridesare not implemented at the moment for the row components. Do you think we need them in this PR?