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
[pprzcenter] save conf confirmation on quit #1591
Conversation
👍 from me |
This "solution" is of course an improvement, because it will make the backup-msgbox appear less often. However, there are a couple of things amiss here:
I vote for complete removal of both these msgboxes, and the notion of manual saving your conf (i.e. remove the save menu item). Instead of manual saving: always autosave to current_conf.xml but never overwrite. Instead move the old current_conf.xml to conf.old_[time]. That way, no user interaction is required and users can never accidentally remove changes. Ideally, there would be a file watcher running on conf.xml in center that automatically detects outside changes and asks the user immediately whether to discard or load those changes. (the user is concerned with those changes right at that moment, as he is causing them right at that moment) |
I'm not in favour of completely removing the manual save or forcing autosave on quit: |
Maybe an enhancement could be a "autosave" checkbox/menu entry and that setting remembered to leave that choice to the user... |
I'm sorry to say, but you are not an example of a typical user :). IMHO with my plan, in general, users will benefit. Adding extra options just to make the program work for the developers is a dangerous GUI design pattern. |
Personally I HATE autosave, and I turn it of in all editors, etc. I use... |
Forced Autosave is not a good idea. |
I'm really seeing some good arguments here ;) Center is, by the way, not an editor... Rather compare it with an IDE. Visual studio autosaves which property boxes are turned on, where they are etc etc... Why do you think that is? |
Editor (or IDE) or not... the point is that not everyone likes autosave... |
I don't believe that is your point. You, HATER of autosave, are maybe using it in several programs to satisfaction right now, but you don't recognize it as such because the workflow is setup different. I don't know which software you use, otherwise I would try to name examples. Are you using a browser? An IDE? Matlab? Google docs? Virtual Box? Blender? All these things are riddled with forced autosave. Props for the persuasion tactic on "forced" autosave though. Because, you know, if it is FORCED it must be bad. I think your point is that changing your workflow is painful. This is a valid point. If we can agree to that, we can move forward. |
Hate might have been a bit too strong of a word, but my point IS that not everyone likes autosave in all cases. It's also really not about my workflow (since the confs I use are almost always committed). Also to be clear what this PR does: Maybe all this talk about saving and autosave is also misleading:
So to sum up, I think that the possibility to decide at the end if you want to keep the changes you just made or go back to the previous version (or view the difference) is useful. Especially for normal users who don't have their conf under version control. |
I LOVE autosave. I HATE dialogs. You could ask are you sure after every action. Are you sure you want to merge this? |
ccfd64b
to
7d6c462
Compare
With the latest changes the
The only case when you will still have a A checkbox in that message (or the menu) to allow to remember the choice to always keep would still be nice. |
@EwoudSmeur I'm also not a fan of dialogs, but I LOVE to have the choice to enable/disable "autosave" features. |
So to sum up: For me the pain point is the stupid dialog at startup, which also appeared way too often because If we combine this with a "always keep changes (save)" option that will be remembered, I think we will have the best of both worlds. |
Hey all, In short, don't auto delete the conf.xml~ but replace the popup window with an option in the drop down menu. This may be a bit different than what was previously mentioned but that's my 2 cents. |
@kirkscheper adding a "review changes" entry could of course be added to the menu...
I don't quite understand what you mean... if you "(auto)save" the config, all it does is delete conf.xml~ |
and always delete backup conf/conf.xml~ if it doesn't differ (e.g. it was created when you changed something, but then you reversed that change again)
and then delete the backup file. If conf.xml is actually a symlink, simply renaming the file will remove the symlink.
Added checkboxes to "always keep changes"... |
Looks like everybody can be happy with this. |
@gautierhattenberger after wrestling with lablgtk a bit, I managed to do what I wanted (add checkbox to the message dialog as well). IMHO we have two choices:
|
I like better to option to choose if you want confirmation box or always keep the latest changes |
@kevindehecker @martinmm @EwoudSmeur @kirkscheper your feedback on this would be appreciated... |
I'm looking for time to react to this, hopefully in the weekend. |
|
Curious when you still get the original startup msgbox? It should only be the case if you forcibly closed pprz center... A lot of end-users don't really put their conf.xml under version control ;-( At least that is my impression from the mailing list and the chat... |
You also get it from external changes (e.g. when checking out another git branch), or did that change in this PR (sorry don't have the time to analyse all the commits) ? |
You only get the msgbox if |
If there are unsaved changes, ask if you want to save them on quit of Paparazzi Center.
This solves the "problem" of #1567 if you work on a local conf not under revision, but otherwise, you can still have changes due to checkout, so the startup confirmation will show up.