Because this does much more than simply reset the security slider and privacy settings visible in the window, the button is confusing. It's also unclear to the user what settings "Restore Defaults" will restore -- all Firefox prefs are not restored; only some select ones hardcoded in torbutton.
So I can think of a few alternative designs:
Make "Restore Defaults" apply only to the Security Slider and privacy checkboxes in the Privacy and Security Settings window.
Move "Restore Defaults" to the main torbutton menu, to avoid confusing it with the Privacy and Security settings. (We could also consider restoring ALL prefs to default, instead of an arbitrary few.)
Remove the "Restore Defaults" button altogether.
I lean toward option 2.
If we do retain the "Restore Defaults" button, we should probably show a confirm dialog. We should also add a tooltip explaining exactly what the button does.
reset_defaults mutated to "Restore Defaults", but it is usually used in Save/Restore pair.
"Clear" means make empty/""/0/NULL, so the comments are really scary.
"Clear browser proxy settings" is not expected by users.
About Options:
As of 1b41636c9351b46bbcb2094a65c65a4407b60a37 (the fix for #15852 (moved)), the browser proxy preferences are not reset. I guess the "2. Clear browser proxy settings" should have been replaced with "2. Reset some browser preferences" (or with a comment that more accurately describes what torbutton_reset_browser_prefs() does).
I do not know the history of "Restore Defaults" and I am not sure how the list of preferences that is hard-coded into torbutton_reset_browser_prefs() was generated, but I agree that if we are going to change more settings that those that are controlled from that dialog we should remove the button and make this feature accessible from somewhere else.
Do we need this feature? I wonder how many people need it? Or as bugzilla suggests, maybe we should we fix #19135 (moved) instead? Note that "Refresh Tor Browser" may work correctly on OSX now that we have moved the browser profile out of the .app area and made it so the browser can create a working profile during startup.
Trac: Cc: arthuredelstein to arthuredelstein, brade, mcs
Note that "Refresh Tor Browser" may work correctly on OSX now that we have moved the browser profile out of the .app area and made it so the browser can create a working profile during startup.
A quick test on OSX shows that clicking "Refresh Tor Browser" on the about:support page appears to work OK, but we should take a closer look to be sure.
Kathy and I reviewed this and have a few comments:
The implementation of torbutton_reset_browser_prefs() should be removed since that function is no longer used.
You need to pass document to the revised torbutton_prefs_reset_defaults() function.
Normally, when the user tries to check or uncheck the torbutton_blockDisk checkbox, a "Restart Tor Browser?" prompt is displayed. If "Restore Defaults" modifies that pref, the same prompt should be displayed. I think this problem exists without your changes though.
(For 1. and 2., maybe you just forgot to include your preferences.xul and torbutton.js changes).
Here's my proposed new version that simply removes the "Restore Defaults" button. It only makes sense if #20244 (moved) fixes are used. In this situation, we have no checkboxes, so to "restore defaults" the user only needs to drag the security slider back to the position labeled Low (Default), or possibly uncheck the "Custom Values" box.
Of course this needs to be critically evaluated to decide both (a) if the approach makes sense from a usability standpoint, and (b) if the code changes are correct.
Replying to arthuredelstein:
It's really great to see how you've started to go step by step into the right direction of redesigning UI, so that it's now a real "Torbutton UI flow improvement"!
uncheck the "Custom Values" box.
Hint: it's better to replace this checkbox with a new Security Slider position "Expert" above High, especially for mobile UX, which will have the same settings as High for the first time (so text to the right will be the same), and text will disappear when custom settings will have been made (and this position will preserve (!) custom settings while switching back and forth from other positions!)
(b) if the code changes are correct.
It depends on whether all settings you want could be restored without "Restore Defaults".
The changes look okay to me (I did not try to run with them applied).
Since most users simply discard their entire browser or their entire data directory when they want to restore to a known state, I do not think Restore Defaults will be missed.
It's really great to see how you've started to go step by step into the right direction of redesigning UI, so that it's now a real "Torbutton UI flow improvement"!
Thanks!
Hint: it's better to replace this checkbox with a new Security Slider position "Expert" above High, especially for mobile UX, which will have the same settings as High for the first time (so text to the right will be the same), and text will disappear when custom settings will have been made (and this position will preserve (!) custom settings while switching back and forth from other positions!)
That's an interesting suggestion. I opened #20347 (moved).