Skip to content

Align dependencies with Trino Web UI - #55

Open
koszti wants to merge 3 commits into
trinodb:mainfrom
koszti:align-frontend-dependencies
Open

Align dependencies with Trino Web UI#55
koszti wants to merge 3 commits into
trinodb:mainfrom
koszti:align-frontend-dependencies

Conversation

@koszti

@koszti koszti commented Aug 20, 2026

Copy link
Copy Markdown
Member

Description

Align the dependencies with the trino web UI so the component can be embedded without bundling duplicate react, MUI, emotion or monaco runtimes.

Shared frontend libraries are now peer dependencies, the package uses MUI 9-compatible APIs (including the required react component markup updates). The library build externalizes these dependencies and produces a single ES module. This reduces the js build output from 24 MB across many monaco chunks and workers to 1.95 MB or 332 KB compressed.

The standalone example configures its own slim monaco instance while embedded consumers provide monaco through @monaco-editor/react, allowing the query-ui to reuse an existing instance such as the one already configured by the trino web UI.

Additional context and related issues

This PR partially addresses trinodb/trino#30827. The query-ui remains independently maintained and published as @trinodb/trino-query-ui, allowing it to be embedded into other applications.

@cla-bot cla-bot Bot added the cla-signed label Aug 20, 2026
@koszti koszti changed the title Align dependencies with trino Web UI Align dependencies with trino web UI Aug 20, 2026
@koszti
koszti force-pushed the align-frontend-dependencies branch from eb7f1c8 to 9d3a7a7 Compare August 20, 2026 20:50
@koszti
koszti requested a review from mosabua August 20, 2026 20:51

@mosabua mosabua 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.

Code changes all look good.

For the commit message please use the title

Align dependencies with the Trino web UI

And expand the commit body quite bit with a list of

  • what trino version web UI we align with (483?)
  • for each package we upgrade add something like "Upgrade mui deps from 7.3.2 to 9.3.1"
  • add any other technical details worth knowing

Related question also .. should we pin dependencies more strictly or just continue relying on the lock file?

@koszti
koszti force-pushed the align-frontend-dependencies branch from 9d3a7a7 to b424431 Compare August 21, 2026 07:44
koszti added 3 commits August 21, 2026 08:53
Upgrade MUI Material and icons from 7.3.2 to 9.3.1
Upgrade MUI X Data Grid from 8.14.0 to 9.11.0
Upgrade MUI X Tree View from 8.13.1 to 9.11.0

Update component markup and icon usage for compatibility with MUI 9.
Upgrade the React and React DOM peer requirements from 19.1.4 to 19.2.8
Upgrade React types from 19.1.13 to 19.2.18
Upgrade React DOM types from 19.1.9 to 19.2.4
Use the React, Emotion, MUI, MUI X, and Monaco instances supplied by an embedding application. Keep matching development dependencies for local builds and the standalone example.
Keep Emotion at 11.14.0 and 11.14.1 and @monaco-editor/react at 4.7.0.
Add monaco-editor 0.56.0 as an explicit shared dependency.
Externalize peer dependencies and their submodule imports, publish only an ES module, and target ES2020 for the Vite configuration.
Use the Monaco instance supplied through @monaco-editor/react in the library while configuring a slim Monaco instance for the standalone example.
This reduces the JavaScript library output from approximately 24 MB across Monaco chunks and workers to 1.95 MB, or 332 KB compressed.
@koszti
koszti force-pushed the align-frontend-dependencies branch from b424431 to b256eaf Compare August 21, 2026 07:55
@koszti

koszti commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

thanks, I split the change into three focused commits with expanded commit bodies:

  • Upgrade MUI dependencies
  • Upgrade React dependencies
  • Externalize shared frontend dependencies

Commit bodies show actual version bumps ahe dependency versions use Trino 484 (current snapshot) as the reference baseline. wdyt?

should we pin dependencies more strictly or just continue relying on the lock file?

Even if we pin direct dependencies exactly, they and their transitive dependencies may still use version ranges. We therefore need the lockfile to reproduce the exact dependency tree across local, CI, and release builds. Peer dependencies (such as react, mui, monaco) should use ranges so host applications can provide compatible versions without dependency conflicts.

does it make sense?

@koszti koszti changed the title Align dependencies with trino web UI Align dependencies with Trino Web UI Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants