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.
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' |
There was a problem hiding this comment.
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' |
This comment has been minimized.
This comment has been minimized.
HHHindawy
left a comment
There was a problem hiding this comment.
Thanks for working on this, I really like how it looks!
Just left you a couple of comments 🙏
|
|
||
| const renderContent = () => { | ||
| // Fallback | ||
| if (!value || value.trim() === '' || !['color', 'image'].includes(type)) { |
There was a problem hiding this comment.
Would the type ever be anything other than color or image?
We have it already typed as one of these values: type: 'color' | 'image';
| <label | ||
| htmlFor={id} | ||
| className='cio-filter-option-label text-sm flex flex-row items-center cursor-pointer grow p-1'> | ||
| {checkboxVisible && ( |
There was a problem hiding this comment.
Is it intentional that we disable the interactivity of the filter option if the checkbox is not visible?
Removing the <input> means that clicking on the filter option will do nothing and the onChange will not fire. Just asking to see if this is intentional.
| return ( | ||
| <RenderPropsWrapper | ||
| props={{ | ||
| id, |
There was a problem hiding this comment.
Minor thing: Should we create a renderProps variable that includes all of these props, similar to the rest of the components?
There was a problem hiding this comment.
Let's discuss in Slack
| return ( | ||
| <RenderPropsWrapper | ||
| props={{ | ||
| ...props, |
There was a problem hiding this comment.
Same renderProps question
| isChecked = false, | ||
| onChange, | ||
| checkboxPosition = 'left', | ||
| startContent, |
There was a problem hiding this comment.
How do you feel about adding an endContent as well? 🤔
There was a problem hiding this comment.
I kinda like it but I would like to do it in a separate PR if that's okay
| optionValue: 'purple', | ||
| displayValue: 'Purple', | ||
| displayCountValue: '291', | ||
| showCheckbox: false, |
There was a problem hiding this comment.
I don't believe we have this prop defined anywhere
There was a problem hiding this comment.
It's the legacy name I used. Then I checked it to something else. Thanks for the catch! 94dea79
| id: 'filter-1', | ||
| optionValue: 'red', | ||
| displayValue: 'Red', | ||
| displayCountValue: '1572', |
There was a problem hiding this comment.
onChange is required, but it's missing from all stories.
Also can we add argTypes?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Code Review Results✅ StrengthsThe composition pattern is well-executed — 🚨 Critical Issues
|
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?