Skip to content

perf(data-table): optimize action column width allocation#6135

Open
QuentinHsu wants to merge 1 commit into
mainfrom
perf/data-table-action-width
Open

perf(data-table): optimize action column width allocation#6135
QuentinHsu wants to merge 1 commit into
mainfrom
perf/data-table-action-width

Conversation

@QuentinHsu

@QuentinHsu QuentinHsu commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

概述

  • 优化数据表格操作列的默认宽度分配,避免操作列占用不必要的剩余空间。

改动说明

  • 将内容宽度列的 <col> 宽度提示由未指定调整为 1%
  • 操作列在自动表格布局中收缩至标题和按钮所需宽度。
  • 其他普通数据列继续利用表格剩余可用宽度。
  • 保留现有列宽调整、横向滚动和移动端布局行为。

效果

  • 渠道列表的信息列获得更多展示空间。
  • 操作列宽度与实际操作内容保持一致。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

  • Closes # (如有)

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 Issues 与 PRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

  • bunx oxlint -c .oxlintrc.json src/components/data-table/core/data-table-colgroup.tsx
  • bun run typecheck
  • bun run build
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes
    • Improved data table column sizing for content-sized columns, resulting in more consistent table layout and rendering.

- apply a minimum width hint to content-sized columns to prevent wasted space.
- preserve remaining table width allocation across regular data columns.
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3decefab-a02e-43c9-a819-b36e75766903

📥 Commits

Reviewing files that changed from the base of the PR and between 7c28993 and 52e634d.

📒 Files selected for processing (1)
  • web/default/src/components/data-table/core/data-table-colgroup.tsx

Walkthrough

Content-sized columns in the data-table column group now receive an explicit '1%' width instead of an undefined width.

Changes

Data-table column sizing

Layer / File(s) Summary
Content-sized width assignment
web/default/src/components/data-table/core/data-table-colgroup.tsx
getColumnWidth returns '1%' for content-sized columns.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A bunny saw columns lined in a row,
And gave tiny widths room to grow.
“One percent!” it cried with delight,
As content fit snugly just right.
Hop, hop—the table now flows!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: optimizing data-table action column width allocation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/data-table-action-width

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant