prql
prql copied to clipboard
feat(playground): add new query button
Preview
Close #3631
Thanks — I think this sort of thing is good.
Rather than interrupting the flow with a popup asking for a query name, how about a button for "Clear query" which clears the query and sets the name to new-N.prql
, where N
is a number that works.
"Clear query" (or something similar) also is clear that it's a destructive event — I can imagine clicking "New query" and not realizing my existing query is about to be deleted if I hadn't saved it...
Rather than interrupting the flow with a popup asking for a query name, how about a button for "Clear query" which clears the query and sets the name to
new-N.prql
, whereN
is a number that works."Clear query" (or something similar) also is clear that it's a destructive event — I can imagine clicking "New query" and not realizing my existing query is about to be deleted if I hadn't saved it...
What about saving the query before clearing the query and notifying the user before that? I think it's a better experience for the user
What about saving the query before clearing the query and notifying the user before that? I think it's a better experience for the user
I don't think we want to get in the way of the user — so we don't want a box popping up asking "Do you want to save??" — instead if the button's actions are obvious, the user can decide whether to save before clicking the button.
So I do think that "Clear query" is better than "New query" in that regard...
I'm sorry for the late response. I'm away from my machine these days. So I hope you'll excuse me.
Anyway. Is "Clear query" really useful? I don't know why we would just put a button to remove queries only. The user can use ctrl
+ a
then click backspace
and all is done. But, The "New Query" button doesn't remove queries only. It's something like creating a new file. In future, We can add something like taps to switch between files to improve the user experience.
Is "Clear query" really useful?
I think it's somewhat useful... :)
Isn't "Clear query" + "Rename" the same as "New Query"?
Minimum surprise is important — and the current "New Query" clears the existing query, which might be surprising...
Isn't "Clear query" + "Rename" the same as "New Query"?
Technically, yes. but the difference is that New Query
will be useful if we add taps
so that the user can switch between them.
Minimum surprise is important — and the current "New Query" clears the existing query, which might be surprising...
To avoid that, I think we should work on taps
Yes, tabs could be good!
(It does seem like a much bigger project, though...)
(It does seem like a much bigger project, though...)
Yeah sure. Next week, I will try to work on it and maybe cancel this PR