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

feat: 调整单元格默认 padding, 优化多行文本时的展示效果 #2970

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

lijinke666
Copy link
Member

@lijinke666 lijinke666 commented Nov 8, 2024

👀 PR includes

✨ Feature

  • New feature

📝 Description

  1. 多行文本高度自适应时, 考虑了单元格的 padding, 但默认的 paddingTop 和 paddingBottom 只有 4, 显得有点拥挤, 调整为 8

TODO: 单元格存在 icon 时效果还有优化空间 (预渲染计算宽度时获取不到 icon 宽度), 后续优化
image

const adaptiveHeight = textHeight + padding.top + padding.bottom;

🖼️ Screenshot

Before After
image image

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Nov 13, 2024 8:53am

@github-actions github-actions bot added the next 2.0-next 版本的问题 label Nov 8, 2024
Copy link
Contributor

github-actions bot commented Nov 8, 2024

Size Change: +2 B (0%)

Total Size: 336 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 236 kB +2 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 388 B
./packages/s2-react/dist/index.min.js 70.9 kB
./packages/s2-react/dist/style.min.css 3.77 kB
./packages/s2-vue/dist/index.min.js 23 kB
./packages/s2-vue/dist/style.min.css 1.85 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Nov 13, 2024

你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。

Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it.

@github-actions github-actions bot added the 🚨 test failed 单元测试挂了 label Nov 13, 2024
@lijinke666 lijinke666 changed the title [WIP] feat: 调整单元格默认 padding, 优化多行文本时的展示效果 feat: 调整单元格默认 padding, 优化多行文本时的展示效果 Nov 13, 2024
@github-actions github-actions bot added the pr(feature) new feature label Nov 13, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.68%. Comparing base (ecdc9c8) to head (4d241cc).
Report is 483 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2970      +/-   ##
==========================================
+ Coverage   75.77%   80.68%   +4.91%     
==========================================
  Files         257      179      -78     
  Lines       11994    10437    -1557     
  Branches     2464     2375      -89     
==========================================
- Hits         9088     8421     -667     
+ Misses       1398      563     -835     
+ Partials     1508     1453      -55     

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

@wjgogogo wjgogogo merged commit 599d7a4 into next Nov 14, 2024
10 of 11 checks passed
@wjgogogo wjgogogo deleted the fix-optimize-cell-height branch November 14, 2024 03:32
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v2.0.0-next.33 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-react-components-v1.1.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题 pr(feature) new feature released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants