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
Improve user experience when creating new projects #3018
Conversation
At the moment, when creating a project, the user is greeted with the dialog containing: 1. Name 2. Filename 3. Base path The user is expected to type the name of the project into (1), and then, Geany tries to guess the base path and file name. The guess simply takes the project directory specified in settings and appends the name. When the project is located anywhere else than in the projects directory, the guessed values are wrong and have to be entered manually which is quite annoying. In addition, the dialog doesn't make it clear that the user should start with (1), when he starts with (2) or (3), he has to fill in all 3 values manually. I think we can do better - instead of entering the project name and guessing base path based on that, we can go the other way round; first, get the base path and then, from the base path provided by the user, set the project name and project file. With this approach, Project->New: a. First pops up a open directory dialog to specify base path b. After that, opens the (currently used) New Project dialog which is pre-filled in the following way: 1. Name: The last directory in base_path 2. Filename: depending on "store project file inside the project base directory" settings either in base_path/(1).geany or projects_dir/(1).geany 3. Base path: path specified in (a) This way, in most cases, the user will only have to select the base directory in the first step and use the pre-filled values without any modification no matter whether the project is stored in the projects directory or not.
After creating a project, the first thing the user wants to do is to configure the project (e.g. setting file patterns, build commands, etc.). We can open the dialog automatically when the project is created and save this extra step to the user.
Project files are, by default, stored inside the configured "projects" directory. The problem is that for new users of Geany, the default ~/projects most probably points to a non-existent directory and then, the project creation experience is not quite optimal. In addition, this is what most editors do and most Geany newcomers will expect this behavior.
I totally agree the "new project" dialog is dodgy and confuses people.
This approach seems better than the existing confusion.
Can I suggest instead of serial popups, have a single popup with base path at the top with focus on it and the other entries insensitive. When the base path is entered fill the other entries as described and set sensitive for users to twiddle as needed.
Personally I usually do this anyway, what do other people think? |
Same here. Actually all of what @techee described sounds as if he was looking over my shoulder when I was creating a project. And it happens every single time, I fill the name, have to correct the paths and then open settings. |
That would be possible but it actually requires an extra click from the user to open the directory dialog anyway plus there has to be some initial value in the base path entry like Basically, the way I see the project creation process is: project creation = opening the directory with the project. This is the first step this pull request does, the second dialog is just the possibility of further customization but in most cases can just be confirmed. |
I've been keeping project files together, outside of the project folders. To switch to something else, I can double click the relevant project file without having to do much navigation in the file manager. To access the contents of the project folder with the file manager or terminal, I use a keybinding with geany/geany-plugins#1126.
|
Just to be clear, this pull request just changes the defaults for the option "General->Miscellaneous->Store project file inside the project base directory" and your use case is still preserved. |
What about a "wizard" interface? A single dialog that indicates progress through some number of steps? Does GTK have a standard wizard system? (Personally, I don't like wizards dialogs, but I like multiple popups even less.) |
That's good to know... I had seen a previous pull request that didn't (appear to) preserve it. |
If the project file could be renamed/moved from the Project Properties dialog... you could add a new menu item to the Project menu: "New (from Folder)..." When clicked, the user would select a folder. Then the Project Properties would be opened with everything filled in with defaults. The filename could be highlighted to indicate that it can be edited. The user would be able to change other options as desired. (I'm assuming most people would want to edit preferences and properties after creating a project. So this would save several clicks.) |
Its a pity we can't change the name of the open dialog to "Select project base directory" and go straight there, or maybe we can if a FileChooserWidget is embedded in the first dialog?
|
No Wizards just Assistants, never tried it, don't know how applicable it is. |
For the wizard to make some sense, all the dialogs would have to be embedded in the wizard - otherwise the wizard would mean just more clicking around to open the other dialogs. Then it means to have embedded folder chooser (not sure if it's possible) but worse, the project properties dialog. I just don't think this is worth the extra effort.
The problem with configurable project file name is that once you allow that, you allow moving projects to different directories and things start breaking when users use relative base path or
This is exactly what the patch does, it's just called "Select project base path".
I wouldn't skip the "New Project" dialog personally. This is the only chance to change the location of Geany's project file and the suggested path derived from the base path may not suit everyone (e.g. someone wants to have the Geany project file inside a subdirectory of the base path). |
You could... Check whether the path is relative and convert to absolute paths if needed. This should be better to keep things working than if the user moves files around in a file manager. |
Well, yeah, one could do anything, it's just a matter what's a realistic amount of work for such a minor feature - this would be a lot of work and a lot of refactoring to do (just check |
OK, forget about that, |
Based on the code in your other PR, the checks and conversion for relative/absolute paths are just a dozen or so lines, most of it declarations and cleanup. Then maybe another dozen or so lines of GUI code.
It looks like you've been working on variations of this for 7-8 years.
Update the paths and save/close the project. Move and reload the file. |
Exactly, and it never got merged. So the current strategy is to write
Renaming project file may be useful for someone but it's something I personally don't find essential, don't know other editors that would do that and don't feel very motivated to do that myself. It could be another PR if someone is interested to do it. I don't think it's an improvement of user experience with creating projects either - yes, one dialog could be eliminated but at the cost that the project file is created at a place where the user didn't want to have it (e.g. because the "set project file inside the project directory" is set to something different than he expects) and will have to change it manually afterwards (if he actually notices). |
Agree that it would be better as a separate PR.
This PR changes the project creation workflow. Here's an approach that would minimize changes to the current workflow:
|
@xiota How does this help? What you suggest is more or less how project creation works (or rather doesn't work) now. So for instance, assume that the preselected values are
and I want to open a project I just downloaded from the Internet which is in the
This is what you get automatically with this patch when you select base path first (2a or 2b depend on the project location settings). Now without the open dialog at the beginning, as a normal user I don't know that I should start with (3) first and select the base path in the first step to get (1) and (2) filled in. If I start with (1) first, there's no chance to fill in (2) and (3) because Geany doesn't know I want to open something in Downloads. If I start with (2) first, Geany doesn't know where the project itself is stored, the project file can be stored elsewhere. So once again, what this patch does is that it makes project creation as simple as opening a directory with sensible values filled in. This directory is selected in the very first step, otherwise no good guesses can be made about the other form values. |
Maybe, as mentioned in #2245, we could rename "Project -> New..." to "Project -> New from folder..." so it's clear what the initial directory selection dialog is. |
As I understand, this PR changes the current New Project behavior to:
What I dislike about this new method.
My workflow has been:
So this PR is not "compatible with [all] existing user's workflow". |
I am against renaming and changing the behavior of the existing menu item. Users should not be required to select the folder first. There are cases where the folder may not be known at the time of project creation (eg, has not been cloned from git yet). I suggested adding a new menu item earlier. |
Currently, users can change the fields in any order they want. It is your personal preference to start with folder first. Other users should not be forced to conform to your personal preference.
That is not all this PR does. It also breaks any workflow that does not conform to your personal preference of filling in the folder first. It adds extra steps for anyone who doesn't want to use your preferred defaults. |
See #3022 |
What (technically) prevents this PR from being implemented as a plugin? |
@xiota I'm not sure I'll have time to continue in this discussion which doesn't seem to lead anywhere and I'll leave space for discussion for others. Ultimately it won't be up to you or me if this pull request gets merged and our opinions are known now - it would be nice to get feedback from others too so I'd encourage everyone to try and decide for himself. A few random notes:
I think I'm an experienced user of Geany and the current experience of opening projects is terrible. @dolik-rce agrees, the guys in #2245 agree, other guys I talked with in person agree. I respect your opinion but if it's just a matter of doing things in a different order, you'll just have to get used to a slightly different workflow but nothing will be dropped.
It's not a personal preference - it's a necessity if you want to set the other 2 values correctly. But again, this is how other editors work and what people in #2245 suggested - open project as if it were a directory. And newcomers will be used to that much more than the tedious project creation Geany has now - in every editor you just have to specify in which directory your project is.
It doesn't. If you press cancel in the first dialog or select a whatever directory, you can customize everything in the second dialog. But I think once you get used to it, I'll actually be happy when everything is pre-filled for you.
It's just a matter of doing things in a different order - if you don't have a folder with a project, you don't need the Geany project and its creation can wait until the moment you have your sources. When you know project opening works this way, you'll just create the folder first. But again, as stated before, you still have your option to customize everything in the second dialog. Other editors won't allow you to create a project without having a directory for sources and I doubt anyone has ever complained about that.
Geany API doesn't contain a function to open project and I don't think this function should be added. I definitely won't create a plugin just for this. To be clear about some things:
|
I'm not saying the current experience is great/can't be improved. The issue is that Geany currently allows new-project workflows that this PR completely eliminates. I've made suggestions that would avoid that problem.
Setting project basepath first is not a "necessity".
Other editors doing things a certain way doesn't mean Geany must also. Geany does lots of things differently from other editors. If other editors are so great, why use Geany in the first place?
#2245 (and #1171) suggest opening folders as if they were projects. This PR is not close to doing that. For instance, what happens if a user drag/drops a folder into Geany? What happens if a user runs
That is not obvious at all. Cancel usually aborts a process entirely. So another strike against this PR. Users who start the new project creation process have to cancel twice to truly cancel the process.
Why not? It could be useful for some project-based plugin, like Workbench.
New menu item (Project / New from folder...) plus no second dialog after folder selection is preferable to the implementation of this PR. |
I think it makes most sense if the open directory dialog pops up first. Here are my two cents on why: All other solutions IMHO have the risk to be overwhelming, and the risk to suggest this might be a "classic monolithic IDE with overcomplicated settings" scenario again. By having just a simple directory open dialog show immediately & as first thing, the user is kind of primed this is a more modern workflow, and then when a follow-up settings thing shows up but with everything already filled out it is way more obvious that touching anything else is optional, and that geany is quite happy to proceed without me bothering with more than just having specified the folder. I think that would not be obvious if I was greeted with a base folder + name + whatever dialog to start with, with nothing filled in yet.
I find this one a good point however. But I don't see why canceling picking a folder couldn't just fully back out. For a new project with no folder yet, if the folder picker has a "New Folder" button I think it would be fairly obvious for most users to just use that and to pick the new empty folder then.
Fwiw, I think that also sounds like fairly intuitive to use to me while providing some more obvious flexibility. So maybe that'd be a good middle-ground? Edit: or I guess |
IMO opening file chooser automatically gives the false impression that a base directory is strictly necessary (it isn't). Also, it immediately hides the actual project creation dialog which seems awkward. So I would rather like to see a button to open the file chooser next to base diectory text entry (which I agree should be moved to the top). Then, one can leave that empty (or enter a non-existant path) and chose project file, or one uses the file chooser to select a base directory, in which case the other 2 fields are filed automatically. I don't necessarily agree with turning on "Store project file inside the project base directory". I don't feel very strong about it but it seems out of place for this PR and should be discussed separately. I don't see that it's a required for improving the project creation dialog itself. The same goes for automatically opening the project configuration. It could just as well turn out to be annoying so let's discuss that separately. |
Both of these could be fixed however with a separate Edit: a quick question on:
Where are they stored right now? In other modern IDEs with the folder-as-a-project concept, they're usually somewhere in that folder (either at the root or in a subfolder), since a VCS/repo base is often expected to be at the project folder level, too - inside that project folder, not its parent. So if they're outside right now, I think that change would make sense, especially as just an option people can use if they want. |
Just wondering, is the project actually usable for anything if the base path isn't specified? (Well, maybe really just as a named session.)
Like @ell1e I think this is what basically every other editor does and will be the more standard (I'm not saying better, it's a matter of personal preference) behavior. The impact of this on the project opening experience is that this is independent of whether the user configured the projects directory settings to something valid or not so it will work out of the box. I'm now leaning towards to what @ell1e suggested - keeping the "Project->New" dialog or slightly improving it and in addition having "Project->New from directory" that skips the second dialog and uses the default values I described in my first post. Again, it would be better to have defaults to store the project into the project directory because this would skip further configuration of the location of the project completely and users might be surprised where the project file got stored.
Let's discuss it separately then. |
It can be anywhere you wish - the "base path" inside the project file defines the actual project directory. From my previous attempts to do something about projects I learned there are passionate lovers of this feature so it has to stay as an option. |
IMHO more options in an IDE are usually good, if the defaults are ok. I think putting the project files inside the project folder might be a reasonable default at least. Regarding the naming of |
Perhaps this would allow removing the pref altogether. So basically your initial proposal under a separate button while also improving the creation process for current usages. "Store project file inside the project base directory" would be untouched (or even deprecated/removed). @ell1e "open" is a separate functionality (that already exists). Also since there may be more than one project.geany file in a directory re-purposing "New from folder" for "Open" could become complicated. |
How about making it a checkbox in the project creation dialog, and for "New" it would default to inside |
I have no problem with the double-dialog thing and I actually prefer this for more flexibility and clarity about where the project gets stored - I just thought it was something that was generally disliked here. From playing with it myself it feels quite natural and this is really just one click without any extra filling.
But here I don't see a reason why not respect user's preference for the location of the project file when we have such a configuration option and people seem to use it. I think both "external project storer" and "internal project storer" type of people could benefit from this feature alike without having to modify the project file location manually. If the second dialog for confirmation stays there, the defaults for "Store project file inside the project base directory" wouldn't be so critical though I would still prefer defaulting to something that behaves in a similar way like other editors (plus there's no requirement for setting the "project files" directory to something valid first). So my current proposal would be the original proposal (minus opening the project configuration) under "Project->New from folder" while keeping "Project->New" untouched and defaulting to "Store project file inside the project base directory" enabled.
Yeah, the whole trouble with Geany projects is their (IMO) excessive flexibility but people are already used to the various ways how Geany projects can be stored and it's up to us to keep things compatible with existing use cases. I guess if I were to create Geany projects from scratch, I would just create a (possibly hidden) subdirectory in the project directory with various configuration files. Opening/creating a project would be just one thing - either a project is found and opened or it is created. The session split would be a non-issue because we could have as many files in the config directory as we would wish without any consequences. But we have to live with the situation that users have possibly multiple project files in the project base directory under different names or these files are stored somewhere outside the project. |
It would be possible to have such a button but it would have to affect the path that was already pre-filled with something based on this preference set inside the preferences dialog. Checking/unchecking should probably modify the path to the corresponding value. The question is whether this modification should happen even if the user manually started typing some another path. This might be a source of extra confusion. |
I TL;DRed much of the above, sorry if I repeat anything.
Another reference point is that Vscode asks for a directory first for where to find code for the project, and put its In the case of both of these I am in the position of being a new user, and my reactions seem to pretty much mirror new users of Geany, basically "I just want to do my work, not fiddle with your IDE". And can say the Vscode method is fast and easy for the single file C++ things I am using it for, and Eclipse is annoying to set up but then seems to support complex projects pretty much automatically from then.
Yes, (AFAICT) having BOTH project files in users home and project files in the project directory are used, maybe even by the same user (me) for different "projects". Supporting that by having "Project->New" that defaults to something user specific as the project file location and has no base directory by default, and "Project New from directory" that opens the file dialog at the directory of the current file and sets both location of project file and project base directory seems a better way than making the process more complex by trying to combine them. |
I just did this in #3042 and I'm closing this pull request in favor of the mentioned pull request. |
At the moment, when creating a project, the user is greeted with the
dialog containing:
The user is expected to type the name of the project into (1), and then,
Geany tries to guess the base path and file name. The guess simply takes
the project directory specified in settings and appends the name. When the
project is located anywhere else than in the projects directory,
the guessed values are wrong and have to be entered manually which is
quite annoying. In addition, the dialog doesn't make it clear that the
user should start with (1), when he starts with (2) or (3), he has to
fill in all 3 values manually.
I think we can do better - instead of entering the project name and
guessing base path based on that, we can go the other way round; first,
get the base path and then, from the base path provided by the user,
set the project name and project file.
With this approach, Project->New:
a. First pops up a open directory dialog to specify base path
b. After that, opens the (currently used) New Project dialog which
is pre-filled in the following way:
directory" settings either in base_path/(1).geany or projects_dir/(1).geany
This way, in most cases, the user will only have to select the base
directory in the first step and use the pre-filled values without
any modification no matter whether the project is stored in the projects
directory or not.
The other 2 patches:
For more description of these 2 patches, see the commit messages.