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: 修复紧凑模式下, 文本带有 '\n' 换行符时 maxLines 配置未生效和文本溢出的问题 closes #2963 #2900 #2972

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

lijinke666
Copy link
Member

@lijinke666 lijinke666 commented Nov 13, 2024

👀 PR includes

🐛 Bugfix

📝 Description

// 文本: `哈哈哈\n哈哈哈`

  style: {
    dataCell: {
      maxLines: 1
    }
  },

TODO: G 的两个问题

  • 字符宽度测量方式和 S2 不同, 由于特定字体下中文和数字的字间距不同, 在足够宽的情况下, 也会显示省略号 (目前采用临时方案绕过).

image

  • 文字含有 '\n' 换行符, 未渲染省略号 (后续优化)

image

等待底层修复中...

🖼️ Screenshot

Before After
image image
image image
image image

🔗 Related issue link

closes #2963 #2900

🔍 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 13, 2024

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

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Nov 14, 2024 2:38am

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

github-actions bot commented Nov 13, 2024

Size Change: -39 B (-0.01%)

Total Size: 336 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 236 kB -39 B (-0.02%)
ℹ️ 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

@lijinke666 lijinke666 changed the title [WIP] fix: 修复紧凑模式下, 文本带有 '\n' 换行符时 maxLines 配置未生效和文本溢出的问题 closes #2963 #2900 fix: 修复紧凑模式下, 文本带有 '\n' 换行符时 maxLines 配置未生效和文本溢出的问题 closes #2963 #2900 Nov 13, 2024
@github-actions github-actions bot added the pr(fix) bug fix label Nov 13, 2024
@wjgogogo wjgogogo merged commit 8d45f07 into next Nov 14, 2024
8 of 9 checks passed
@wjgogogo wjgogogo deleted the fix-compact-word-wrap branch November 14, 2024 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题 pr(fix) bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛明细表紧凑布局文字溢出 🐛紧凑模式,手动拖拽减小列宽,字体直接溢出
2 participants