feat: update SmartSelect component and add SmartMultiSelect exports - #78
Conversation
📝 WalkthroughWalkthroughThe SmartSelect component gains enhanced option filtering by combining label and description fields for search, while its trigger button switches to full-width layout. Simultaneously, the SmartMultiSelect component and associated types are added to the public API exports. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/ui/smart-select.tsx (1)
327-327: Consider a compatibility-safe default width.Switching to
w-fullchanges default layout behavior and may stretch existing usages that depended on the previous fixed trigger width. A capped default can reduce regressions while still supporting full-width containers when needed.Suggested adjustment
- "w-full justify-between border-input text-foreground font-normal", + "w-full max-w-[250px] justify-between border-input text-foreground font-normal",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/ui/smart-select.tsx` at line 327, The trigger currently forces "w-full" in the class list which can stretch existing layouts; change the default width to a compatibility-safe cap (e.g., replace "w-full" with "w-64 max-w-full" or "max-w-xs w-full" in the class string inside the SmartSelect/SmartSelectTrigger component in src/components/ui/smart-select.tsx) and add an optional prop (e.g., fullWidth: boolean) that when true applies "w-full" so consumers can opt into full-width behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/ui/smart-select.tsx`:
- Line 327: The trigger currently forces "w-full" in the class list which can
stretch existing layouts; change the default width to a compatibility-safe cap
(e.g., replace "w-full" with "w-64 max-w-full" or "max-w-xs w-full" in the class
string inside the SmartSelect/SmartSelectTrigger component in
src/components/ui/smart-select.tsx) and add an optional prop (e.g., fullWidth:
boolean) that when true applies "w-full" so consumers can opt into full-width
behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 215ffe3b-8ca9-4b0a-9e84-93433d90336c
📒 Files selected for processing (2)
src/components/ui/smart-select.tsxsrc/index.ts
Summary by CodeRabbit
Release Notes
New Features
Improvements