Last modified: 2014-09-20 00:18:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57966, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55966 - Add a "You've not saved your changes" dialogue
Add a "You've not saved your changes" dialogue
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
1.22.0
All All
: Low enhancement (vote)
: 1.24.0 release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 31882
  Show dependency treegraph
 
Reported: 2013-10-21 14:17 UTC by Dan Garry
Modified: 2014-09-20 00:18 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshots (341.16 KB, image/png)
2013-10-21 18:55 UTC, Brad Jorsch
Details

Description Dan Garry 2013-10-21 14:17:51 UTC
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".
Comment 1 Brad Jorsch 2013-10-21 14:58:15 UTC
(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.
Comment 2 Jared Zimmerman (WMF) 2013-10-21 18:03:40 UTC
@Brad, What do the unchangeable button defaults look like? and What text do browsers add that we can't change
Comment 3 Brad Jorsch 2013-10-21 18:55:16 UTC
Created attachment 13533 [details]
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.
Comment 4 Dan Garry 2013-10-21 20:38:41 UTC
(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?
Comment 5 Brad Jorsch 2013-10-21 20:49:54 UTC
(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.
Comment 6 Jared Zimmerman (WMF) 2013-10-21 21:08:25 UTC
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."
Comment 7 Gerrit Notification Bot 2013-10-30 18:31:00 UTC
Change 92677 had a related patch set uploaded by Anomie:
Add "unsaved changes" warning to Special:Preferences

https://gerrit.wikimedia.org/r/92677
Comment 8 Marcin Cieślak 2013-12-09 18:54:50 UTC
Please don't. Preferences are not critical in any way and additional confirmation like this will be just an annoyance.
Comment 9 Jared Zimmerman (WMF) 2013-12-09 20:07:57 UTC
(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)
Comment 10 Marcin Cieślak 2013-12-10 14:40:27 UTC
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.
Comment 11 Gerrit Notification Bot 2014-09-19 01:19:55 UTC
Change 92677 merged by jenkins-bot:
Add "unsaved changes" warning to Special:Preferences

https://gerrit.wikimedia.org/r/92677
Comment 12 Jared Zimmerman (WMF) 2014-09-19 04:01:23 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links