-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Be smarter about remembering which files you were working on after an app restart #54
Comments
Two parts to this: first, add Lines 299 to 301 in 55f63b1
Lines 331 to 333 in 55f63b1
The harder part is to add handling for the app.on("open-file", function (event, filepath) {
console.log(event, filepath);
}); |
https://twitter.com/webology/status/1435471527688953857
|
This is about more than just the "recent files" feature - a general usability problem right now is that it's very easy to quit the app and come back again and have to rebuild state from scratch. Need to do better than that! |
Because Twitter, I started a new database. When I re-opened it, I expected to see it in the list where "temporary" database is, but I had to search for it. I think this was in the same folder as my CSV file, but I'd have to double-check it. |
Related: #42 - "If you open a CSV and then install a plugin the CSV table vanishes" |
I'm a novice trying to get some progress on this issue – and would love some advice – what would be the idiomatic way to persist user-specific details (like a list of recent files) within the Electron app? Right now the most similar functionality I notice is the list of plugins installed, but that's stored and is queried from DatasetteServer itself – or would we want to persist it at the Electron-level using something like this rather than the python level? |
@mnckapilan I'm planning to more-or-less implement https://www.electronjs.org/docs/tutorial/recent-documents - which ties into the operating system's own concept of "recently opened files". I may go a step further than that though, perhaps having the default index page of the app also display that list to help people get back to what they were doing? |
I've made a primitive attempt at addressing this (for recently opened CSVs), though some refactoring is likely necessary to extend this to recent databases and newly created databases. This is my very first attempt at contributing to open-source, so I do apologise if I'm missed something along the way! |
Was looking around for patterns on how different applications deal with recently opened items. VSCode takes an approach of separating their 2 recent types – individual files and folders – and also gives the option of reopening closed workspace. Something similar could be implemented for distinguishing between recently opened CSVs and databases. I've added a file menu option for recently opened CSVs to the #77, yet to extend it to databases. |
I'm going to include part of the list of recent files on the homepage redesign in #91. |
Turns out I couldn't find a way to gain access to that list of recent files in a way that would let me feature them in the hompage, so I left them in the "File -> Open Recent" sub-menu instead. |
Original title: Integrate with recent files menu
The recent files menu shows up when you right click on the Dock icon, and can also integrate with e.g. the history menu. When a file from that list is selected the
open-file
event is sent to the application.The text was updated successfully, but these errors were encountered: