Page MenuHomePhabricator

Add a "You've not saved your changes" dialogue
Closed, ResolvedPublic

Description

Right now if you change your preferences and try to navigate away to another page, you're not presented with a dialogue warning you your changes haven't been saved. It'd be best if we cleared that up by adding a dialogue warning people to save their changes, similar to the one we have for when you try to navigate away in the middle of an edit.

Jared suggested the following text for the dialogue: "You've made changes to your preferences that have not been saved yet." with two buttons, "Discard Changes" and "Save Changes".


Version: 1.22.0
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=56561

Details

Reference
bz55966

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:21 AM
bzimport set Reference to bz55966.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

Jared suggested the following text for the dialogue: "You've made changes to
your preferences that have not been saved yet." with two buttons, "Discard
Changes" and "Save Changes".

As far as I know there is only one way to do this. And with that method, it's not possible to customize the dialog at all in Firefox and only minimally in other browsers: the message displayed would be identical to that for the page edit feature mentioned, with the possibility of including a different message in place of [[MediaWiki:editwarning-warning]] for browsers other than Firefox (note that these other browsers may include additional text that cannot be overridden).

If that's fine with Jared, then it would be relatively simple to implement, just by following the example of resources/mediawiki.action/mediawiki.action.edit.editWarning.js.

@Brad, What do the unchangeable button defaults look like? and What text do browsers add that we can't change

Created attachment 13533
Screenshots

You should ask about getting on the WMF Browserstack account.

In all screenshots, the text "Leaving this page may cause you to lose any changes you have made. If you are logged in, you can disable this warning in the "Editing" section of your preferences." is what could be customized.

Also note that even in IOS 7, the feature was not present when editing the desktop site. I didn't try the mobile site, mainly because I couldn't be bothered to log in and try it.

Attached:

g3517.png (618×781 px, 341 KB)

(In reply to comment #3)

In all screenshots, the text "Leaving this page may cause you to lose any
changes you have made. If you are logged in, you can disable this warning in
the "Editing" section of your preferences." is what could be customized.

Jared, in light of that, what text would you recommend we use that's good for both the editing window and preferences?

(In reply to comment #4)

Jared, in light of that, what text would you recommend we use that's good for
both the editing window and preferences?

We can have different text on the editing window and on the preferences. Except for Firefox, where we can't control the text at all.

After talking with Brad a bit more, I think this is as good as we can get, given all of the different limitations per browser. I think we won't really solve this until we can save user prefs without hitting the save button.

"You've made changes to your preferences that have not been saved yet. If you leave this page without clicking Save your preferences will not be updated."

Change 92677 had a related patch set uploaded by Anomie:
Add "unsaved changes" warning to Special:Preferences

https://gerrit.wikimedia.org/r/92677

Please don't. Preferences are not critical in any way and additional confirmation like this will be just an annoyance.

(In reply to comment #8)

Please don't. Preferences are not critical in any way and additional
confirmation like this will be just an annoyance.

This is one option, the other is to autosave changes (my preferences)

Yes, autosave would not be that bad too. I usually change 1 or 2 settings at once (skin, gadgets) and rarely having a whole bunch of things unsaved. But while javascripting this please keep in mind users of browsers like w3m (one my favourites) that do not do any Javascript.

I see that this originated by watching lots of different browsers: I think that having inconsistent behaviour accross browsers is not necessarily a bad thing; once I am using some browser most of the time I know how to dismiss dialogs permanently (if I can). I actually prefer to have the browser windows because it is the same across DIFFERENT WEBSITES, and I am usually unhappy if some website takes over some browser capabilities because its developers KNOW better.
Imagine this would have happened with things like SSL - every website offering they own version of the padlock and certificate display (I am speaking about usability here, not about actual security).

Btw. I leave browser dialogs on by default for more important reason - unsaved changes in the editing interface; that's much more important.

Change 92677 merged by jenkins-bot:
Add "unsaved changes" warning to Special:Preferences

https://gerrit.wikimedia.org/r/92677

(In reply to Marcin Cieślak from comment #8)

Please don't. Preferences are not critical in any way and additional
confirmation like this will be just an annoyance.

We've actually had a fair number of issues where people say "Feature X isn't working!!" and the issue was they'd left preferences without saving, because, they assume, like most sites these days that preferences are autosaved. So while I'd prefer we autosave preferences (linked bug) I think this is an acceptable mid-term fix.