[Feature Request] Improving the UI experience
Some thoughts:
- Output cannot be copied with the caret, we have to copy all of it and then clip ourselves
- If the page reloads for some reason the queries and outputs are lost. Query history in the local storage would be fitting addition (and on that, a query history/saved queries would be helpful - thinking of GraphQL experience with saved queries)
- Persist query option should be
onby default - Whatever hack was used for Select autocompletion (without implementing the LSP) should also be used for other operations, because frankly it's pretty good. It's not always the autocompletion that matters, but referring to the correct/existing types, and it seems the current hack don't need the LSP with Select most of the time
- The resulting RHS
inputshould be collapsable, because if the query is long, to see the output we have to scroll down every single time (i.e., input and output should be collapse separately)
Output cannot be copied with the caret, we have to copy all of it and then clip ourselves
We're going to be adjusting the UI to implement better copying experience. We'll ship a new 2.x EdgeDB with it improved in the next week or two.
Persist query option should be on by default
We'll start memorizing the preference in local storage in the next update. That should fix it for you.
because frankly it's pretty good.
@jaclarke James will take a look if we can make it work with INSERT/UPDATE too. But no guarantees here, the current implementation is pretty hacky.
If the page reloads for some reason the queries and outputs are lost.
This is a heavier change, we'll likely have to wait until 3.0 (where we actually redesign the UI to make it more logical and address your other points about persist query and long output). But James and I will discuss it next week, maybe we can backport some of the local storage fixes to 2.x.
more ideas: ( I will be updating my thoughts for improvements in this issue, because more and more people will be using the UI, with the new type-safe EdgeQL connections to clients, and practically every EdgeDB user when LSP lands 😋)
- formatting option
- query timing: https://github.com/edgedb/edgedb-ui/issues/66
- output becomes collapsed and one has to click too many times especially when retrieve was nested (which is the EdgeQL ethos!). Quick solution: may become non-collapsed if the screen is big enough (i.e., responsive)? Or better - collapse all / expand all option? (though this should apply to all nested objects)
This is a heavier change, we'll likely have to wait until 3.0 (where we actually redesign the UI to make it more logical and address your other points about persist query and long output). But James and I will discuss it next week, maybe we can backport some of the local storage fixes to 2.x.
I just realized that we can traverse through the history with cmd+ {up, down} arrows. So the history is already saved in the local?, so persisting that after the page refresh shouldn't be subject to a redesign?
more ideas:
- Schema does not show the fields in the order I wrote them (e.g., required fields are not at the top as I wrote them)
- Schema and REPL should be openable at the same time; since there is no LSP, we have to look at it a lot
- If one selects the 'show in the graph' option in the schema, that graph may mark the required fields with font bold or asterisk, or something similar.
- Ability to hit cmd+enter in 'parameters' section and make the query run is a much needed feature IMO
- Also, the
filterin UI is freaky good. If it's easy, cmd+enter to run may be added there, too - Ability to save queries (I think the benchmark here is a GQL Client called Altair, where it saves anything you do in local and facilitates saving queries to a great degree)
- If you implement something like a query explorer (look at Graphiql (old version) , Apollo Studio or Hasura from GQL domain) where you can pick fields by clicking to them, then with the additional marking of required fields this would greatly help users before LSP lands. (e.g., https://cloud.hasura.io/public/graphiql?header=content-type:application/json&endpoint=https://api.spacex.land/graphql)
- copy button near all fields in the
Data Explorer - currently the error prompt in UI does not show the line number, since line numbers don't exist. It's hard work to find a red underline on a single character in a say 150 line query
Currently AFAI experienced we cannot stop queries after being run. When I close the tab in the browser it continues to run. A query of mine never returns, and takes up a single core of the CPU fully. I have to go to the activity monitor on MacOS to find its PID and kill it myself.