Skip to content

Conversation

@koszti
Copy link
Member

@koszti koszti commented Nov 16, 2025

Description

The CodeBlock component in the preview UI doesn't render word-wrapped long lines with the correct height, which results in an incorrect layout. This PR fixes the issue by calculating the height properly.

Additional context and related issues

Before:
image

After (sensitive data is masked):
image

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text:

## Section
* Fix preview UI to render single line sqls. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Nov 16, 2025
@github-actions github-actions bot added the ui Web UI label Nov 16, 2025
@koszti koszti force-pushed the fix-preview-ui-to-render-single-line-sqls branch from ce98a55 to 1aa0465 Compare November 16, 2025 08:43
@koszti koszti changed the title Fix preview UI to render single line sqls Fix preview UI to render long single line sqls correctly Nov 16, 2025
@koszti koszti changed the title Fix preview UI to render long single line sqls correctly Fix preview UI to render long single line SQLs correctly Nov 16, 2025
@wendigo
Copy link
Contributor

wendigo commented Nov 17, 2025

@koszti I've also noticed recently, while on the plane, that query doesn't render offline as some of the components are fetched over network. Can we make these bundled so that preview UI works offline too?

@koszti
Copy link
Member Author

koszti commented Nov 17, 2025

@koszti I've also noticed recently, while on the plane, that query doesn't render offline as some of the components are fetched over network. Can we make these bundled so that preview UI works offline too?

oh good to know thanks. i’ll send PR

@wendigo wendigo force-pushed the fix-preview-ui-to-render-single-line-sqls branch from 1aa0465 to 0d78657 Compare November 18, 2025 22:52
@koszti
Copy link
Member Author

koszti commented Nov 19, 2025

@wendigo not fully related to this PR but I tested the offline mode and was not able to reproduce. Can you share any further info ideally a network error from you browser's dev tools? I've done this:

  1. git pull latest trino from master
  2. ./mvnw clean install -DskipTests
  3. disconnecting ethernet cable and wifi
  4. running WebUiPreviewQueryRunner
  5. opening http://localhost:8080/ui/preview

@wendigo
Copy link
Contributor

wendigo commented Nov 19, 2025

@koszti this happens for query json only

@wendigo wendigo merged commit 4bce3e6 into trinodb:master Nov 19, 2025
100 checks passed
@github-actions github-actions bot added this to the 479 milestone Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants