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

[WIP] fix: select multiple filter, last line tag padding higher than other #2150

Closed
wants to merge 2 commits into from

Conversation

pointhalo
Copy link
Collaborator

@pointhalo pointhalo commented Apr 3, 2024

…line, #1667

中文模板 / 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

为了解决Select多选有filter的情况下,换行之后最后一行的间距与其他不一致的问题, #1667

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

解决方案:

  • 需要动态使用 JS 判断 semi-content-wrapper 这个flex 容器的children是否已经被wrap到了不止一行 ,若换行,给单独的额classname: semi-content-wrapper-wrap,然后给这个classname下的 input-wrapper、input 覆盖一下height、line-height

image

Changelog

🇨🇳 Chinese

  • Fix: 修复 ...

🇺🇸 English

  • Fix: fix ...

Checklist

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

Other

  • Skip Changelog

Additional information

@pointhalo pointhalo changed the title fix: select multiple filter, last line tag padding higher than other [WIP] fix: select multiple filter, last line tag padding higher than other Apr 3, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 92.50000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 88.20%. Comparing base (506a7ca) to head (02401aa).
Report is 4 commits behind head on main.

❗ Current head 02401aa differs from pull request most recent head 0846722. Consider uploading reports for the commit 0846722 to get more accurate results

Files Patch % Lines
packages/semi-ui/select/index.tsx 88.23% 2 Missing ⚠️
packages/semi-ui/typography/base.tsx 92.30% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2150      +/-   ##
==========================================
+ Coverage   88.16%   88.20%   +0.03%     
==========================================
  Files         440      440              
  Lines       25969    26004      +35     
  Branches     6614     6619       +5     
==========================================
+ Hits        22896    22937      +41     
+ Misses       3073     3067       -6     

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

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 0846722:

Sandbox Source
pr-story Configuration

Copy link

cypress bot commented Apr 3, 2024

Passing run #2407 ↗︎

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 0846722 into edc8771...
Project: semi-design Commit: 02401aa037 ℹ️
Status: Passed Duration: 11:01 💡
Started: Apr 3, 2024 4:12 AM Ended: Apr 3, 2024 4:23 AM

Review all test suite changes for PR #2150 ↗︎

@pointhalo
Copy link
Collaborator Author

该方案废弃。以 #2151 为准。

@pointhalo pointhalo closed this Apr 3, 2024
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.

2 participants