Skip to content

Conversation

@shenjunjian
Copy link
Collaborator

@shenjunjian shenjunjian commented Jan 12, 2026

PR

select 的多选提示框,增加 max-height:50% 的限制。 用户可以通过属性传入,覆盖掉这个默认值。

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?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • New Features

    • Select dropdowns now enforce a maximum height of 50% of available vertical space, preventing overflow and improving usability on small or constrained screens.
  • Style

    • Added a theming utility to enable the new max-height behavior and allow customization of select popper sizing.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added the bug Something isn't working label Jan 12, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 12, 2026

Walkthrough

Added a CSS utility limiting select popper height to 50% in two theme packages, and applied that class via popperClass in the renderless select component configuration.

Changes

Cohort / File(s) Summary
Select popper config
packages/renderless/src/select/vue.ts
Added popperClass: 'tiny-select__popper-maxh-50' to rootAutoTipConfig.
Theme styling (select-dropdown)
packages/theme/src/select-dropdown/index.less,
packages/theme-saas/src/select-dropdown/index.less
Introduced @select-prefix-cls variable (SAAS) and added .@{select-prefix-cls}__popper-maxh-50 { max-height: 50%; }; SAAS file includes minor selector spacing/formatting adjustments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A nip, a tuck, a gentle fix,
Popper bounded in fifty ticks.
Styles stitched and config set,
Slimmer dropdowns—soft silhouette.
Hooray, the select looks sharp and neat! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(select): add max-height:50% for select-dropdown' directly matches the main change—adding a max-height constraint to the select dropdown component across multiple theme files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb033f1 and 861e096.

📒 Files selected for processing (1)
  • packages/theme-saas/src/select-dropdown/index.less
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/theme-saas/src/select-dropdown/index.less
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @packages/theme-saas/src/select-dropdown/index.less:
- Around line 147-149: The LESS file defines a rule using the variable
@select-prefix-cls (see .@{select-prefix-cls}__popper-maxh-50) but never
declares it; add the missing variable declaration @select-prefix-cls:
~'@{css-prefix}select'; alongside the other prefix variables near the top of
packages/theme-saas/src/select-dropdown/index.less so the class compiles to the
correct selector.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1bfdd2 and cb033f1.

📒 Files selected for processing (3)
  • packages/renderless/src/select/vue.ts
  • packages/theme-saas/src/select-dropdown/index.less
  • packages/theme/src/select-dropdown/index.less
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
🔇 Additional comments (3)
packages/renderless/src/select/vue.ts (1)

295-300: LGTM - Default max-height class applied to tooltip.

The implementation correctly adds a default popperClass for the max-height constraint. The spread of props.tooltipConfig after popperClass allows users to override this default when needed.

Note: If users want to provide a custom popperClass while retaining the max-height behavior, they'll need to include 'tiny-select__popper-maxh-50' in their custom class string.

packages/theme-saas/src/select-dropdown/index.less (1)

44-44: LGTM - Formatting improvements.

The spacing changes in selectors (> .tiny-svg vs >.tiny-svg) and the semicolon addition improve consistency and readability.

Also applies to: 92-93, 102-102

packages/theme/src/select-dropdown/index.less (1)

199-201: No action needed—overflow is handled by the tooltip component wrapper.

The class applies max-height: 50% to the popper element. The tooltip component's content-wrapper (.@{tooltip-prefix-cls}__content-wrapper) already includes overflow: auto; at the theme level, which handles content overflow properly. The class design is intentional: it constrains the popper's maximum height while delegating overflow handling to the parent tooltip component.

The percentage-based max-height is appropriate for popper elements, which are typically viewport or ancestor-positioned.

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