-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Reconsider default temporary database, use on-disk database instead #126
Comments
I still like opening CSV files in a temporary in-memory database, since that avoids the import step and means that if you use the app to explore hundreds of CSV files you don't end up with a database with hundreds of duplicate tables. But... I think the app should open with a default on-disk database which you can then start importing data into. This will avoid confusion when people use tools like I can maybe have a If a user detaches that database it doesn't need to come back. |
Creating a I think what I'll do instead is add a very prominent "Create your first database" CTA to the index page which, when clicked, prompts the user to save a It looks like https://www.electronjs.org/docs/api/dialog#dialogshowsavedialogbrowserwindow-options lets me set a Lines 875 to 881 in a0fe7ad
It would be good if I could come up with a mechanism where by the That's going to be a bit tricky to design from a UI perspective though, since the mental model it needs to communicate is quite complex. |
Maybe I need some core principles to help guide this?
|
FWIW, I like the idea of a default in-memory database for datasette — a kind of scratchpad. But I take your point that users could be put off by its disappearance. Maybe the same thing can be achieved by creating a default on-disk database, and giving people tools to split tables off from it when they want to stop exploring and make a particular set of tables (database) more permanent and distinct. |
Yeah I agree - I think the key thing to figure out here is how to help users who are looking at an in-memory table "promote" that to on-disk status. |
An API method for copying a table from memory to disk might help here, maybe something like this:
|
Sorry — you meant to essentially "export" tables you want to move from memory to disk. That works. I'm not sure it solves the question of what to do with the in-memory tables/database. Persist to next launch? That's saving to disk. Delete on exit? That gets back to the value of autosave and the risk of surprising users. My original comment (not sure of the protocol here): I mean, there's an ancient mechanism for this ... a save button. 😱 But given where you started here (users not understanding files/folders), that seems dangerous. And let's face it, autosave is a good thing. |
Based on the revelations from this Twitter thread, regular humans don't really think in terms of files any more - they expect data to mostly live inside the application that was used to create it.
On that basis, I'm rethinking the way Datasette Desktop starts out with a "temporary" in-memory database which is used for opening CSV files but which resets when the application is restarted.
The text was updated successfully, but these errors were encountered: