-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webapp Preview: Core components #22869
Conversation
e35e915
to
756330a
Compare
756330a
to
62fc1ec
Compare
62fc1ec
to
b80ce91
Compare
Yes.. however I think ideally we start reviewing and merging. We need to get some consensus with other maintainers about the approach and such as well. We should maybe discuss this all some more in either in core-dev channel. |
@mosabua my quality bar is pretty old at the moment for the preview UI. We should just skim PR and go ahead. There is no point in length discussions imo |
Agreed @wendigo .. I just want to make sure it is tucked away safely and doesnt impact the rest of Trino negatively. If that is the case I am happy to just merge rather rapidly all under the understanding that this is a preview and very much under construction. |
I think what I am saying is that we need some sort of config that completely disables the new UI from being used.. it can still be in the binary of course but it should be impossible to use it. And users have to switch the property to true for the preview to work. Something like web-ui.preview-enabled=true or maybe even create a namespace in the config in case we need more of them. web-ui.preview.enabled=true https://trino.io/docs/current/admin/properties-web-interface.html Does that make sense @koszti and @wendigo ? Update: I see that this is already in place from #22783 .. we should add the config to the docs I think. And yes.. lets ship this. |
@mosabua this is already it. The new web-preview is disabled by default and you need to switch on config property :) |
If we get the new separate web ui module in .. do we use that same module for the new preview UI .. I assume yes .. but I could also be convinced that having a separate module for the new UI is even cleaner. |
@mosabua new preview UI is already merged (at least scaffolding) and it's moved to trino-web-ui module too :) |
So we still with same module.. sounds good. |
@koszti please rebase - you need to move these files to the |
b80ce91
to
905d0dc
Compare
@wendigo rebase done |
@koszti I'll review it tommorow |
@@ -11,19 +11,25 @@ | |||
"preview": "vite preview" | |||
}, | |||
"dependencies": { | |||
"@douyinfe/semi-icons": "^2.63.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should rather use https://www.npmjs.com/package/material-symbols
cc @mosabua
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let’s not mix items from two different design packages. (semi and material). If you prefer material design then let’s switch not only the icons but the entire lib, otherwise we might end up with a weird and mixed look and feel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah! makes sense :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@koszti is this a heavy lift to use material ui here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so material ui + material symbols (as called out here: https://m3.material.io/styles/icons/overview)
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { Empty } from "@douyinfe/semi-ui"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not material design? it's more established than semi-ui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @mosabua
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semi design only because its been used in trino-gateway. But I’m happy to use something else, including material-ui as well as I’m not the greatest fan of semi design :)I leave it you to decide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me neither. I think we should stick to the material-ui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I will rework this PR and let you know when it’s ready to review again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also inclined to go with material but I am not a webdev any more... @colebow has more experience.
The fact that semi is used in the Trino Gateway UI is something we should keep in mind but it should not force us. Ideally we want to be able to reuse components across at some stage .. but we are not there yet.
Also .. if material proofs to be a good choice here.. we can also refactor the Trino Gateway UI if we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also .... we already use material for the website as well. And Trino Gateway docs uses material for mkdocs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Material it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks nice!
e3ff489
to
ba669ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how much we need all of the snackbar-themed Snackbar, but it's easy enough to remove and I like that I'm learning MaterialUI by reviewing it. This looks good.
); | ||
} | ||
|
||
const NotFound = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be fun to include a Commander Bun Bun image as part of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core/trino-web-ui/src/main/resources/webapp-preview/src/App.tsx
Outdated
Show resolved
Hide resolved
ba669ae
to
2f147cc
Compare
core/trino-web-ui/src/main/resources/webapp-preview/src/App.tsx
Outdated
Show resolved
Hide resolved
core/trino-web-ui/src/main/resources/webapp-preview/src/components/QueryHistory.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall LGTM. I'd add prettier though
2f147cc
to
b2aa67c
Compare
@wendigo I added prettier with the same The
Wdyt, is this OK and should we add |
@koszti we should add probably a separate "npm run check" execution to the pom which will run all checkers (linters, tests if any in the future etc) |
b2aa67c
to
2505cf1
Compare
ok, added a new |
Is there anything I can do to help get this merged?I'm asking because I'd like to start working on more PRs that depending on this one. |
@koszti I'm gonna review it really soon :) |
core/trino-web-ui/src/main/resources/webapp-preview/.prettierrc
Outdated
Show resolved
Hide resolved
2505cf1
to
4240906
Compare
I've applied some small fixes and going to merge this soon. |
@koszti here you go :) |
Description
Core components and layout for the preview UI. Partially addressing and proposing technical solutions for #22697
It uses Material UI and features a look and feel similar to the Trino website and documentation, including a comparable color palette. The code also draws inspiration from the ideas and structure of Trino Gateway.
Additional context and related issues
Components added by this PR:
Screenshots:
Light Theme:
Dark Theme:
Snackbar (failure message example):
Release notes
(x) 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.
( ) Release notes are required, with the following suggested text: