Closed
Bug 527820
Opened 15 years ago
Closed 15 years ago
Checking all prefs except "Site Preferences" shows confusing UI
Categories
(Firefox :: Private Browsing, defect, P2)
Tracking
()
RESOLVED
FIXED
Firefox 3.7a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta4-fixed |
People
(Reporter: marcia, Assigned: ehsan.akhgari)
References
Details
(Keywords: verified1.9.2)
Attachments
(1 file, 3 obsolete files)
5.39 KB,
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
Seen while running Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2b3pre) Gecko/20091110 Namoroka/3.6b3pre
STR:
1. Open Tools | Clear Recent History and have all items checked except "Site Preferences.
2. Note that the UI shows "All history will be cleared. This action cannot be undone."
Bug 488691#c54 indicates that this is not correct
Assignee | ||
Comment 1•15 years ago
|
||
Patch + unit test.
Assignee | ||
Comment 2•15 years ago
|
||
Requesting blocking because bug 488691 was actually a 3.6 blocker, but did not implement the desired behavior 100% correctly.
Flags: blocking-firefox3.6?
Assignee | ||
Comment 3•15 years ago
|
||
Oh, and I should add that the fix is very trivial (actually one line of code change + a method rename) and it comes with an automated test, so it's relatively safe to take.
Updated•15 years ago
|
Flags: blocking-firefox3.6? → blocking-firefox3.6+
Priority: -- → P2
Updated•15 years ago
|
Whiteboard: [has patch][needs review dao]
Comment 4•15 years ago
|
||
Comment on attachment 411846 [details] [diff] [review]
Patch (v1)
I think it's intentional that the list doesn't show when selecting "everything" with the default items selected. Apparently "Site Preferences" have a special role and aren't quite considered history, or something.
You might try to get this ui-reviewed, but r- until then.
Attachment #411846 -
Flags: review?(dao) → review-
Assignee | ||
Updated•15 years ago
|
Attachment #411846 -
Flags: ui-review?(faaborg)
Assignee | ||
Updated•15 years ago
|
Whiteboard: [has patch][needs review dao] → [has patch][needs ui-review faaborg]
Comment 5•15 years ago
|
||
Intended UI described here: https://bugzilla.mozilla.org/show_bug.cgi?id=488691#c16
>I think it's intentional that the list doesn't show when selecting "everything"
>with the default items selected.
That's right, but I actually can't remember if Site Preferences is one of the default selected items.
Ehsan: can you describe the functionality of the patch for a quick ui-review.
Comment 6•15 years ago
|
||
(In reply to comment #5)
> >I think it's intentional that the list doesn't show when selecting "everything"
> >with the default items selected.
>
> That's right, but I actually can't remember if Site Preferences is one of the
> default selected items.
It's not.
Assignee | ||
Comment 7•15 years ago
|
||
Here is an overview of this bug and its fix for ui-r:
In bug 488691, we started showing a prompt in the CRH dialog when the user selected "Everything" in the timeline, and changed the default selection of which items to clear. The prompt was: "All selected items will be cleared".
Please note the difference between what we tell the user in the UI and the logic that we use to display that prompt: we tell the user that all the selected items will be cleared if the selection *is different* with the default selection, not when there any unselected items.
Now, as it turns out, the default for Site Preferences is unchecked, so if the user checks all of the checkboxes, we show the "All history" prompt, not the "All selected items" prompt, which is the wrong behavior.
The problem was that actually the logic that we used to determine whether we need to show the "selected items" prompt was wrong: we should show that prompt when there are unselected items, without regard to the default values of those preferences. This patch fixes that logic to come in sync with the prompt we show in the UI.
Comment 8•15 years ago
|
||
> Now, as it turns out, the default for Site Preferences is unchecked, so if the
> user checks all of the checkboxes, we show the "All history" prompt, not the
> "All selected items" prompt, which is the wrong behavior.
It's quite the opposite.
Comment 9•15 years ago
|
||
Comment on attachment 411846 [details] [diff] [review]
Patch (v1)
(In reply to comment #8)
> > Now, as it turns out, the default for Site Preferences is unchecked, so if the
> > user checks all of the checkboxes, we show the "All history" prompt, not the
> > "All selected items" prompt, which is the wrong behavior.
>
> It's quite the opposite.
Ehsan was saying that his patch makes it so that when the user checks all of the checkboxes, the message is "All history will be cleared", fixing the problem that existed previously.
As Ehsan mentions, the previous dialog is misleading, as it gives the user the impression that their entire history will be cleared, when in fact it will not. I understand that "Site Preferences" aren't considered part of "History", but in that case they should probably be removed from this list or that other bug shouldn't have been fixed.
This fixes things to a point where we're consistent for Firefox 3.6. We can fix otherwise in a future release.
Attachment #411846 -
Flags: ui-review?(faaborg) → ui-review+
Comment 10•15 years ago
|
||
(In reply to comment #5)
> >I think it's intentional that the list doesn't show when selecting "everything"
> >with the default items selected.
>
> That's right,
So changing this is ok?
Assignee | ||
Updated•15 years ago
|
Attachment #411846 -
Flags: review- → review?(dao)
Assignee | ||
Comment 11•15 years ago
|
||
(In reply to comment #10)
> (In reply to comment #5)
> > >I think it's intentional that the list doesn't show when selecting "everything"
> > >with the default items selected.
> >
> > That's right,
>
> So changing this is ok?
Yes, I presented a patched build to him, and he said that this is the right behavior.
Assignee | ||
Updated•15 years ago
|
Whiteboard: [has patch][needs ui-review faaborg] → [has patch][needs r=dao]
Comment 12•15 years ago
|
||
(It's true, I did!)
Comment 13•15 years ago
|
||
Comment on attachment 411846 [details] [diff] [review]
Patch (v1)
> /**
> * Resets the checkboxes to their default state.
> */
> resetCheckboxes: function () {
> var cb = this.win.document.querySelectorAll("#itemList > [preference]");
> ok(cb.length > 1, "found checkboxes for preferences");
> for (var i = 0; i < cb.length; ++i) {
> var pref = this.win.document.getElementById(cb[i].getAttribute("preference"));
>- if (pref.value != pref.defaultValue)
>+ if (!pref.value)
> cb[i].click();
This change looks wrong.
Attachment #411846 -
Flags: review?(dao) → review-
Assignee | ||
Comment 14•15 years ago
|
||
Maybe I should have renamed the function, because its purpose is to make sure that all of the items are checked.
Attachment #411846 -
Attachment is obsolete: true
Attachment #413361 -
Flags: review?(dao)
Comment 15•15 years ago
|
||
Comment on attachment 413361 [details] [diff] [review]
Patch (v2)
> wh.onload = function () {
> // Reset the check boxes and select "Everything"
>- this.resetCheckboxes();
>+ this.checkAllCheckboxes();
You need to adjust that comment as well.
>+ // Modify the Site Preferences item state (bug 527820)
>+ this.checkAllCheckboxes();
>+ this.checkPrefCheckbox("siteSettings", false);
>+ this.acceptDialog();
>+ };
>+ wh.open();
>+ },
>+ function () {
>+ let wh = new WindowHelper();
>+ wh.onload = function () {
>+ // Details should be open because the items selection is not the same
>+ // as the default state.
>+ this.checkDetails(true);
That comment seems wrong... this.checkAllCheckboxes(); and this.checkPrefCheckbox("siteSettings", false); actually makes the selection match the default state.
Assignee | ||
Comment 16•15 years ago
|
||
This patch fixes all the comments in the test to match the new logic.
Attachment #413361 -
Attachment is obsolete: true
Attachment #413368 -
Flags: review?(dao)
Attachment #413361 -
Flags: review?(dao)
Comment 17•15 years ago
|
||
Comment on attachment 413368 [details] [diff] [review]
Fix all comments
>- // Details should remain closed because the items selection is the same
>- // as the default state.
>+ // Details should be open because not all items are checked.
> this.checkDetails(false);
That comment is not in sync with the function call.
Assignee | ||
Comment 18•15 years ago
|
||
Fixed the comment.
Attachment #413368 -
Attachment is obsolete: true
Attachment #413395 -
Flags: review?(dao)
Attachment #413368 -
Flags: review?(dao)
Updated•15 years ago
|
Attachment #413395 -
Flags: review?(dao) → review+
Assignee | ||
Comment 19•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [has patch][needs r=dao]
Target Milestone: --- → Firefox 3.7a1
Updated•15 years ago
|
Whiteboard: [can land 1.9.2]
Assignee | ||
Comment 20•15 years ago
|
||
status1.9.2:
--- → final-fixed
Whiteboard: [can land 1.9.2]
Reporter | ||
Comment 21•15 years ago
|
||
Verified fixed on the 1.9.2 branch using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2b6pre) Gecko/20100104 Namoroka/3.6b6pre. I verified using the STR In Comment 0.
Keywords: verified1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•