Skip to content

fix(logs):修复「最近内容」列塌缩覆盖「时间」列的问题 - #280

Open
smarty-kiki wants to merge 1 commit into
OpenBMB:mainfrom
smarty-kiki:fix/conversation-log-column-overlap
Open

smarty-kiki wants to merge 1 commit into
OpenBMB:mainfrom
smarty-kiki:fix/conversation-log-column-overlap

Conversation

@smarty-kiki

Copy link
Copy Markdown

对话日志表在其 9 列中有 8 列声明了宽度(合计 1136px)。在 table-fixed 布局下,自动列获得的是 tableWidth - sum(已声明宽度),因此在应用默认的 1280x800 窗口下——内容区宽 964px(1280 - 220 侧边栏 - 96 页面内边距)——「最近内容」被分配到了 0px。其表头没有任何裁剪,于是标题文字直接盖到了相邻的「时间」列上。

为「最近内容」声明一个宽度,并把那些过宽的兄弟列重新压回到它们内容实际测量的值(168/136/124/92/120/168/154/120)。现在九列全部带有宽度,因此 fixedTableWidth 不再是 undefined,表格会改为横向滚动,而不是把某一列压塌。

同时裁剪共享的表头单元格:被挤压的表头应当截断,绝不能压印到相邻列上。代码库中不存在 headClassName,因此这不会遮蔽调用方的意图。

The conversation-log table declared widths on 8 of its 9 columns (1136px
total). Under `table-fixed` the auto column receives
`tableWidth - sum(specifiedWidths)`, so at the app's default 1280x800
window — a 964px content area (1280 - 220 sidebar - 96 page padding) —
最近内容 was handed 0px. Its header has no clipping, so the title text
painted straight over the neighbouring 时间 column.

Declare a width for 最近内容 and rebalance the over-wide siblings down to
what their content actually measures (168/136/124/92/120/168/154/120).
All nine columns now carry a width, so `fixedTableWidth` is no longer
`undefined` and the table scrolls horizontally instead of collapsing a
column.

Also clip the shared header cell: a squeezed header should truncate, never
overprint its neighbour. No `headClassName` exists in the codebase, so this
cannot shadow a caller's intent.

This branch has not been deployed

No deployments
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