Fix column resize in play.html after web component refactoring by alexey-milovidov · Pull Request #101295 · ClickHouse/ClickHouse · GitHub
Skip to content

Fix column resize in play.html after web component refactoring#101295

Merged
alexey-milovidov merged 5 commits into
masterfrom
fix-play-column-resize-box-sizing
Apr 10, 2026
Merged

Fix column resize in play.html after web component refactoring#101295
alexey-milovidov merged 5 commits into
masterfrom
fix-play-column-resize-box-sizing

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Mar 31, 2026

Copy link
Copy Markdown
Member

Shadow DOM does not inherit box-sizing: border-box from the outer document. When _changeTableLayout reads offsetWidth (which includes content + padding + border) and sets it as style.width, the default content-box model interprets that as content-only width, adding padding and border on top. This makes every column wider, shifting the table to the right and visibly widening the row-number column.

The fix adds box-sizing: border-box to the shadow DOM styles of QueryResultElement.

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix column resize in play.html web UI after the result table was refactored into a web component.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.1.775
  • Backported to: 26.3.6.7, 26.2.10.10

Shadow DOM does not inherit `box-sizing: border-box` from the outer document. When `_changeTableLayout` reads `offsetWidth` (which includes content + padding + border) and sets it as `style.width`, the default `content-box` model interprets that as content-only width, adding padding and border on top. This makes every column wider, shifting the table to the right.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@clickhouse-gh

clickhouse-gh Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Mar 31, 2026
@pamarcos pamarcos self-assigned this Mar 31, 2026

@pamarcos pamarcos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent 👌

Before

Image

After

Image

@alexey-milovidov

Copy link
Copy Markdown
Member Author

The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

The fix for tests on Azure: #100980

@alexey-milovidov

Copy link
Copy Markdown
Member Author

The Can't adjust last granule error in CI is a known issue. The fix is in #101641

@alexey-milovidov

Copy link
Copy Markdown
Member Author

UBSan issue is fixed here: #100086

@alexey-milovidov

alexey-milovidov commented Apr 10, 2026

Copy link
Copy Markdown
Member Author

@pamarcos I've found a bug on your "after" screenshot. The number 10 is shown as 1…

@alexey-milovidov

Copy link
Copy Markdown
Member Author

@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Apr 10, 2026
alexey-milovidov added a commit that referenced this pull request Apr 10, 2026
Backport #101295 to 26.3: Fix column resize in play.html after web component refactoring
alexey-milovidov added a commit that referenced this pull request Apr 10, 2026
Backport #101295 to 26.2: Fix column resize in play.html after web component refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-improvement Pull request with some product improvements pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v26.2-must-backport v26.3-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants