Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: select multiple filter, last line tag padding higher than other #2151

Merged
merged 7 commits into from Apr 3, 2024

Conversation

pointhalo
Copy link
Collaborator

@pointhalo pointhalo commented Apr 3, 2024

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

修复 #1667 的样式问题。

问题原因:
默认情况下 input 组件的默认样式 line-height 30px height 30px,在不换行时没有问题。但如果换行之后,同一行中tag 的 height 是 22px,input会把自己的行撑开,导致含有input 的行与其他行的高度不一致
image

解决方案
参考 TagInput的做法,直接暴露组件级的token,允许配置filter select的 input 高度

image

Changelog

🇨🇳 Chinese


🇺🇸 English

  • Fix: Fixed the issue where the label of the last row is vertically spaced differently from other rows after selecting multiple rows when Select is multi-selected and filter is turned on [BUG] Select多选有filter的情况下,换行之后最后一行的间距与其他不一致 #1667
  • Design Token: Select adds three tokens: $height-select_multiple_input_small, $height-select_multiple_input_default, $height-select_multiple_input_large which can be used to specify the height of the input when searching is enabled.

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

Copy link

codesandbox-ci bot commented Apr 3, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0ea9722:

Sandbox Source
pr-story Configuration

@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.20%. Comparing base (33ff4c7) to head (c81e12e).
Report is 1 commits behind head on release.

❗ Current head c81e12e differs from pull request most recent head 2bddbe8. Consider uploading reports for the commit 2bddbe8 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           release    #2151      +/-   ##
===========================================
+ Coverage    88.17%   88.20%   +0.03%     
===========================================
  Files          440      440              
  Lines        25986    25986              
  Branches      6628     6628              
===========================================
+ Hits         22914    22922       +8     
+ Misses        3072     3064       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cypress bot commented Apr 3, 2024

Passing run #2413 ↗︎

0 252 10 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 2bddbe8 into 33ff4c7...
Project: semi-design Commit: c81e12e95a ℹ️
Status: Passed Duration: 10:59 💡
Started: Apr 3, 2024 6:54 AM Ended: Apr 3, 2024 7:05 AM

Review all test suite changes for PR #2151 ↗︎

@pointhalo pointhalo changed the title [wip] Fix 1667 bak fix: select multiple filter, last line tag padding higher than other Apr 3, 2024
.#{$multiple}.#{$filterable}.#{$module}-small {
.#{$prefix}-input-wrapper {
height: $height-select_multiple_input_small;
line-height: $height-select_multiple_input_small;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

line-height 无需对外暴露。因为该input 是不带样式的。只需要保证高度与lineheight一致即可

@pointhalo pointhalo changed the base branch from main to release April 3, 2024 06:44
@pointhalo pointhalo merged commit 436bec6 into release Apr 3, 2024
6 checks passed
@pointhalo pointhalo deleted the fix-1667-bak branch April 3, 2024 07:09
pointhalo added a commit that referenced this pull request Apr 10, 2024
* chore: format script

* fix: select filter height not expect when empty, relative #2151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants