Conversation
Co-authored-by: Alexzjt <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #3309 +/- ##
==========================================
+ Coverage 75.77% 78.78% +3.01%
==========================================
Files 257 224 -33
Lines 11994 12442 +448
Branches 2464 2815 +351
==========================================
+ Hits 9088 9802 +714
+ Misses 1398 946 -452
- Partials 1508 1694 +186 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Size Change: +183 B (+0.02%) Total Size: 740 kB
ℹ️ View Unchanged
|
Contributor
|
你好, @Copilot CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。 Hello, @Copilot CI run failed, please click the [Details] button for detailed log information and fix it. |
Contributor
|
/gemini review |
Contributor
There was a problem hiding this comment.
Code Review
这次的 Pull Request 做得很棒!通过引入 compactExtraWidth 和 compactMinWidth 两个新的样式配置,有效地解决了紧凑布局模式下单元格可能过窄的问题,提升了表格的可读性和美观性。
主要改动点都考虑得很周全:
- 核心逻辑: 在
pivot-facet、table-facet和pivot-chart-facet中都正确地应用了新的宽度计算逻辑。 - 测试覆盖: 为新功能添加了全面的单元测试,覆盖了
compactExtraWidth和compactMinWidth相互作用的各种场景。 - 文档更新: 及时更新了中英文文档,并增加了一个新的 Playground 示例,方便用户理解和使用新功能。
代码整体质量很高,这是一个非常有价值的功能增强。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solve the issue and close #3305
layoutWidthType: 'compact'模式下缺少对额外宽度和最小宽度的配置支持,导致紧凑布局时单元格可能过窄影响可读性。改动
新增配置项 (
S2Style):compactExtraWidth: 紧凑模式下在计算宽度基础上增加的额外宽度compactMinWidth: 紧凑模式下的最小单元格宽度应用新配置:
pivot-facet.ts:getCompactGridColNodeWidth,getCompactGridRowNodeWidthtable-facet.ts:getCompactColNodeWidthpivot-chart-facet.ts:getCompactGridColNodeWidth使用示例
iShot_2026-01-31_22.27.34.mp4