lizhimins opened a new issue, #4208: URL: https://github.com/apache/rocketmq-dashboard/issues/4208
Every list table in Studio passes a numeric `scroll.x` computed from its column widths (`tableScrollX`), on the assumption that this makes the declared widths authoritative. It does not. rc-table only switches to `table-layout: fixed` when `scroll.y` is set, a column is `fixed`, or a column is `ellipsis`. Without one of those the table stays on `table-layout: auto`, where the declared widths are only advisory and a single long cell value stretches its column past them. **Reproduce** — on the Group management page, create a consumer group with a long name, e.g. `GID_A_VERY_LONG_CONSUMER_GROUP_NAME_FOR_ALIGN` (45 chars). Measured on the resulting table: | | declared | rendered | |---|---|---| | Group name column | 190px | **432px** | | table width | 1154px | **1371px** | `getComputedStyle(table).tableLayout` returns `auto`. The defect is invisible on an empty table: with no rows there is no content to stretch a column, so the widths happen to match their declarations. That is why it went unnoticed. Two consequences show up once the layout is forced to `fixed`: 1. The table still carries `min-width: 100%`, so a window wider than the table shares the surplus across every column in proportion to its width. On a 1482px container every column inflates by 28% — the expand-arrow column renders at 62px and a `Push`/`Pull` tag column at 108px. 2. Concentrating the surplus in a single flexible column overshoots when the fixed columns are narrow: a K8s cluster name column reached 492px while the certificate issuer DN next to it stayed truncated at 180px. The `tableScrollX` doc comment also states that a numeric `scroll.x` switches the table to `table-layout: fixed`, which does not match rc-table behaviour and misled every call site. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
