Skip to content

Conversation

@KevinAndrewDong
Copy link
Contributor

@KevinAndrewDong KevinAndrewDong commented Oct 24, 2025

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

When using reference slot, hovering over the trigger source causes displayOnlyContent to appear.

What is the new behavior?

When using reference slot, hovering over the trigger source will no longer show displayforContent.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

slot-reference playground

Summary by CodeRabbit

  • Bug Fixes
    • Resolved display behavior in select components when using reference slots, preventing unintended content conflicts.

@coderabbitai
Copy link

coderabbitai bot commented Oct 24, 2025

Walkthrough

Early exit logic added to displayOnlyContent computed property: when a reference slot is present, the function now returns an empty string immediately, bypassing existing multiple/single selection display logic. All other behavior remains unchanged.

Changes

Cohort / File(s) Summary
Select display logic
packages/renderless/src/select/vue.ts
Added early exit in displayOnlyContent computed property to return empty string when vm.$slots.reference exists, skipping standard display logic

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

This is a minimal, localized change adding a single conditional check to one computed property with no impact on exported interfaces or existing logic paths.

Poem

A rabbit hops through the select, so keen,
When reference arrives, no content is seen,
A graceful early exit, swift and slight,
The slot takes the stage—what a beautiful sight! 🐰✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "fix(select): remove displayOnlyContent in slot-reference" directly and accurately describes the main change in the changeset. The code modification introduces an early exit in the displayOnlyContent computed property that prevents it from being displayed when a reference slot is present, which aligns precisely with the title's description of removing displayOnlyContent in the slot-reference context. The title is concise, specific, and clearly communicates the primary fix without vague terminology or unnecessary detail. A developer scanning git history would immediately understand that this addresses a display behavior issue specific to the select component's reference slot usage.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the bug Something isn't working label Oct 24, 2025
@zzcr zzcr merged commit 9a755fb into opentiny:dev Oct 28, 2025
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants