Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis pull request introduces a new Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/runtime/composables/useComponentIcons.ts`:
- Around line 45-48: The isTrailing computed currently treats an undefined
trailing prop the same as true when an icon is present, causing both isLeading
and isTrailing to be true; change isTrailing to only enable trailing when
trailing is explicitly true or when there is an explicit trailingIcon (and
respect trailing === false). Specifically, update the isTrailing computed (which
reads props.value.trailing, props.value.icon, props.value.loading,
props.value.trailingIcon) so it returns false if props.value.trailing === false,
returns true when props.value.trailing === true or when
!!props.value.trailingIcon, and do not infer trailing from the presence of
props.value.icon (leave default leading behavior intact); ensure loading is only
shown on trailing if trailing was explicitly enabled.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e2f1bd1f-f196-40d5-a173-5549e54d198a
📒 Files selected for processing (7)
playgrounds/nuxt/app/pages/components/select-menu.vueplaygrounds/nuxt/app/pages/components/select.vuesrc/runtime/components/Select.vuesrc/runtime/components/SelectMenu.vuesrc/runtime/composables/useComponentIcons.tstest/components/Select.spec.tstest/components/SelectMenu.spec.ts
The icon is always display at least the trailing is set to false
I reverted the useComponentIcons changes and added the fix in the components. Because modifying useComponentIcons causes issues in other components
commit: |
|
That is the best I could do without modifying many other components. Furthermore—unfortunately—when I run |
🔗 Linked issue
Resolves #6287
❓ Type of change
📚 Description
undefined.isTrailing, if thetrailingisfalse, it returns it.SelectandSelectMenubecause if I modifyuseComponentIconsit makes fails a lot of test in other components.Why is this change required? What problem does it solve?
This is what the documentation says
I expect that the down arrow icons will not be displayed in the select input. But even if I add
:trailing="false", the arrow is still there.📝 Checklist