-
I very often find myself falling down the rabbit hole with custom SQL queries on a new and interesting table. When I make a mistake in my custom SQL query in Datasette (which is often, especially when accessing Datasette on my phone), I often find that the "Back" button on my browser doesn't always restore the SQL code I was working on, resulting in lost work. I'm not sure what circumstances lead to the bad SQL being restored or not, but it does not seem consistent across browsers (mostly been using Chrome, but on different versions of Windows and Android). It would be nice to have a link on the "Invalid SQL" page that brought me back to the previous page but with my SQL code (however erroneous) restored. The bad SQL is still in the address bar, so I know it's still available, I just can't rely on my web browser to restore it correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
Right now the SQL in that box is just handled like any normal textarea box by your browser. Some browsers, in some situations, can hold onto the old state of the textarea box and sometimes it won't. This isn't a a Datasette problem, per-se, it's just browser behavior. A work around would be to use a plugin like datasette-saved-queries or write one yourself that listens for input on that box and saves it someway (LocalStorage, etc). |
Beta Was this translation helpful? Give feedback.
-
This is a long-standing horrible user experience bug - I've had an issue open since November 2019 for it! #619 It's weirdly difficult to fix (I really need to refactor how that part of the code works entirely) but it's also a big pain point, so it may be worth me diving in and figuring out an unpleasant fix rather than waiting for the refactor. |
Beta Was this translation helpful? Give feedback.
-
Beautiful! Thank you very much for this. I can now make endless syntax
errors without worrying about losing my work 👍
Thanks again,
Luc
…On Wed, Jun 2, 2021, 12:31 AM Brandon Roberts ***@***.***> wrote:
Oh Snap this is such a huge UX improvement!!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1334 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK4OJ3RO5PKQDM2Q4KBWT5LTQWX2BANCNFSM45CWOP4Q>
.
|
Beta Was this translation helpful? Give feedback.
-
This is now released in Datasette 0.57! |
Beta Was this translation helpful? Give feedback.
-
Great, thanks!
Luc
…On Sun, Jun 6, 2021, 1:33 PM Simon Willison ***@***.***> wrote:
This is now released in Datasette 0.57!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1334 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK4OJ3R7DI2BWI53H4FRP2DTROWPPANCNFSM45CWOP4Q>
.
|
Beta Was this translation helpful? Give feedback.
This is now released in Datasette 0.57!