Can't close a project
Needs design @maria-komarova
I added a menu item for this (not yet implemented). We will definitely need context menus but I haven't tried that yet. I'd like a design for context menus when right clicking in the project area or in the text area.
What would be inside those context menus? Other than closing a project?
Here are examples from Atom.
@jackpot51 revisiting this: We have this notion of closing a project, but do we have an idea of what that does as well as what that looks like from a UX standpoint?
I ask because I can see a few behaviours for closing a project with active, unsaved changes in multiple files. Does closing a project just remove it from the file viewer, or does it also close all the files in that project that have been opened through that project?
Having talked to a handful of people I know in the computer-science/developer space, I had some very consistent conversations.
After showing them cosmic-edit and how they can open projects and open files from within projects in the file-viewer, I asked the following question:
If you have a project open and two of that project's files have unsaved changes, and then you close the project, what happens?
I asked three people. Two software engineers and a network admin. All three ultimately answered the following (with minor variations):
- The editor should move to the first unsaved document, and ask you to save or discard. The document should then be closed.
- The editor should move through every document until all unsaved changes are either saved or discarded.
- Once all documents with outstanding changes are decided and closed, the project should be closed and removed from the file-viewer.
There are a couple of things this highlighted. First, I should acknowledge that the initial question is a leading question. It implies that the project "owns" the documents opened through it. But each of the three people I talked to was surprised when I suggested that closing the project might just remove the project from the file viewer and do nothing to the files opened with it. As such, it seemed they saw opening a file through a project not as opening file.txt but as opening project/file.txt. The other part was that there was an immediate (probably unsurprising) desire for quite fine-grained control.
To me, though, this seems like it could be cumbersome. Especially if working across a large number of files. I asked if the following would also make sense: A prompt with a check list allowing you to save selected files (defaults to all selected) and then options to discard all or to cancel.
All three people were receptive to the concept (Which I described by comparing it to the "restore session" page in Firefox) Naturally, that would require a lot more work (file-type icons, more clearly defined checkboxes, etc.) but it also seems kind of compact as a solution too.