-
Notifications
You must be signed in to change notification settings - Fork 4
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
Research some UI designs for query builder #3
Comments
I'm a big fan of query builder inside of https://www.metabase.com/ They give you the ability to see intermediate steps which makes it easy to create/debug a multi-step pipeline like that found in PQL. |
Snippets could be a very useful feature here. We could code in some of the most used snippets, e.g. 'Add Bitcoin price from CoinGecko', 'Add Bitcoin price from CoinBase', which could be browsed/searched through. In the case of editing JSON in the editor we can export the JSON schema from the backend and validate PQL in the editor on the go. This is already supported by the current Ace editor. Probably could also be used in the query builder setting to validate the input. |
What about that we go totally without JSON editing and fully UX PQL building - like it is introduced in Metabase (https://www.metabase.com/). What I like about their product is the right-side nav in which the user configures the next step of a process. What I would suggest is to keep the right-side nav and as his core use the PQL process (like shown in the picture). It would allow the user to interactively view the intermediate results just by clicking on one any process component. But by clicking on the run button (or final process component) full process would be run. To break it down a bit we would have the next groups in the process:
One awesome thing to have would be draggable operations in the PQL process. Let's use https://github.com/atlassian/react-beautiful-dnd library where the Adding new actions would trigger the configuration process, which would slide over the PQL process as a child component, opening up first action possibilities and after it possibility configuration. Some possibilities are without configurations, like some Aggregations methods (min, max, mean,...). Adding Load actions:
Adding Operation actions:
Aggregation actions:
With this the user would graphically design PQL code, but he would not have the access to modify PQL JSON. About the snippets, I would move them on the page before Query builder and would present them as templates, from which you start writing your PQL statements. Maybe on the same principle as creating the new project on GitLab, which allows you to create a blank project or pick some of the existing templates. What do you think about it? |
How do you imagine such change?
I would always leave the option for editing JSON. Even in Metabase you can change the SQL if needed. The query builder should be an enhancement of editing the JSON only. It does not hurt to make a small button: "Edit JSON" that switches to the current view and be done with it. The mapping between the views does not need to be bidirectional but if it can be, even better when switching. |
A simple example is this :
We could integrate cool other ones ( depending on the need for PQL ). We need to define some spec. Let's use this ticket for this
The text was updated successfully, but these errors were encountered: