mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

Feature: No warning if forget to save after editing lyrics #765

Open sharmanr opened 1 year ago

sharmanr commented 1 year ago

If you edit lyrics but don't click "Save" or "Save As..." and then switch to a different song or exit the program, the changes are lost.

Could there be a warning? Perhaps a popup "Lyrics are not saved, save or discard?" with two buttons; the "save" would take you back to the lyrics editor (instead of switching songs or exiting), the other choice would just proceed as normal.

(The alternative of always saving when exiting the lyrics page would not allow cancelling an undesired or unintentional change; it would require a third "Cancel Changes"button after the Save or Save As.)

mpogue2 commented 1 year ago

I think that would be a Good Thing to have.

We currently have such a dialog for unsaved playlists (with the standard Mac OS UI for such dialog boxes, I think). It's in maybeSave() in mainwindow.cpp L2874. There are Save, Discard, and Cancel buttons.

Note that there is an explicit way to back out of cuesheet changes: Lyrics > Revert Edits, which I do remember to use sometimes (note that I do NOT remember that choosing a different song will discard edits, too, so I think that argues that your proposal for a dialog box is in fact needed.)

Given all that, I am kinda leaning to something like the existing "playlist has been modified" dialog, but for lyrics, and with Save and Discard buttons (maybe a Cancel button too?). Seems like a good idea, and would save some accidentally-thrown-away work otherwise.

danlyke commented 1 year ago

I'm still trying to pay the occasional attention and get the Linux port working, but I would also be super happy with some sort of auto-save mechanism and versioning mechanism. Do away with "save" altogether.

In fact, does git ship by default on Mac? Maybe do a VMS style ; or similar extension thing on Windows, and on Mac and Linux just put the HTML cue sheets in Git and version them that way...

mpogue2 commented 1 year ago

@danlyke I believe that MacOS has a built in versioning mechanism. I've never used it, because the UX for it is kinda wonky. I'm not sure that Qt supports it either, but at least for MacOS, it might be worthwhile to look at what it does under the covers.

sharmanr commented 1 year ago

Personally I don't think version control for lyrics would be very useful. How often would one want to go back to an older version, and if so how would one find which one? I think the "save as" is very handy because I'll often add to the title extra stuff, such as the level or a featured call. For example

AA-123 - hello.html 
AA-123 - hello,ferris.html 
AA-123 - hello,plus.html

and SquareDesk allows choosing which one (and nicely defaults to the last one selected!).

mpogue2 commented 1 year ago

Oh hey, I just had a couple of ideas on this, so I looked it up!