Closed Bug 1098350 Opened 10 years ago Closed 9 years ago

Need to refactor SeaMonkey Preferences and UI because Bug 530209 replaced the browser.urlbar.default.behavior preference with a more flexible scheme.

Categories

(SeaMonkey :: Preferences, defect)

defect
Not set
normal

Tracking

(seamonkey2.33 affected, seamonkey2.34 affected, seamonkey2.35 fixed, seamonkey2.36 fixed)

RESOLVED FIXED
seamonkey2.38
Tracking Status
seamonkey2.33 --- affected
seamonkey2.34 --- affected
seamonkey2.35 --- fixed
seamonkey2.36 --- fixed

People

(Reporter: philip.chee, Assigned: neil)

References

Details

User Story

(From Bug 530209 comment #0)
> Currently, the UI for changing what should be suggested in the location bar
> results is a dropdown menu with the following items: History and Bookmarks,
> History, Bookmarks, Nothing.
> 
> Unfortunately, this makes adding additional items (and therefore
> combinations of items) very awkward.
> 
> For example, bug 480350 adds tab matches to the location bar results. If
> this were to be added to the current prefs UI, the drop would have to
> include:
> 
> * History and Bookmarks and Tabs
> * History and Bookmarks
> * Bookmarks and Tabs
> * History and Tabs
> * History
> * Bookmarks
> * Tabs
> * Nothing
> 
> This is not friendly, and is likely to result in someone's head exploding.
> 
> Rather than a dropdown menu listing every possible combination, a series of
> checkboxes could be used - a checkbox for each item, enabling or disabling
> that type of result.

................
From: https://hg.mozilla.org/mozilla-central/rev/af22db534027
>  // The default behavior for the urlbar can be configured to use any combination
> -// of the restrict or match filters with each additional filter restricting
> -// more (intersection). Add the following values to set the behavior as the
> -// default: 1: history, 2: bookmark, 4: tag, 8: title, 16: url, 32: typed,
> -//          64: javascript, 128: tabs
> -// E.g., 0 = show all results (no filtering), 1 = only visited pages in history,
> -// 2 = only bookmarks, 3 = visited bookmarks, 1+16 = history matching in the url
> -pref("browser.urlbar.default.behavior", 0);
> +// of the match filters with each additional filter adding more results (union).
> +pref("browser.urlbar.suggest.history",              true);
> +pref("browser.urlbar.suggest.bookmark",             true);
> +pref("browser.urlbar.suggest.openpage",             true);
> +
> +// Restrictions to current suggestions can also be applied (intersection).
> +// Typed suggestion works only if history is set to true.
> +pref("browser.urlbar.suggest.history.onlyTyped",    false);


Note: This redesign effectively unblocks (or obsoletes) SM Bug 618619 - Add support for more browser.urlbar.default.behavior values (History and Bookmarks) to Location Bar Autocomplete.

Firefox bug references:
Bug 1041743 - Add ability to turn on/off Search Suggestions in preferences
Bug 1094580 - Sync the new browser.urlbar.suggest.* preferences (followup from bug 530209) 
[Meta] Bug 995091 - (UnifiedComplete) Enable Unified Autocomplete

Attachments

(2 files, 1 obsolete file)

(From Bug 530209 comment #0)
> Currently, the UI for changing what should be suggested in the location bar
> results is a dropdown menu with the following items: History and Bookmarks,
> History, Bookmarks, Nothing.
> 
> Unfortunately, this makes adding additional items (and therefore
> combinations of items) very awkward.
> 
> For example, bug 480350 adds tab matches to the location bar results. If
> this were to be added to the current prefs UI, the drop would have to
> include:
> 
> * History and Bookmarks and Tabs
> * History and Bookmarks
> * Bookmarks and Tabs
> * History and Tabs
> * History
> * Bookmarks
> * Tabs
> * Nothing
> 
> This is not friendly, and is likely to result in someone's head exploding.
> 
> Rather than a dropdown menu listing every possible combination, a series of
> checkboxes could be used - a checkbox for each item, enabling or disabling
> that type of result.
................
From: https://hg.mozilla.org/mozilla-central/rev/af22db534027
>  // The default behavior for the urlbar can be configured to use any combination
> -// of the restrict or match filters with each additional filter restricting
> -// more (intersection). Add the following values to set the behavior as the
> -// default: 1: history, 2: bookmark, 4: tag, 8: title, 16: url, 32: typed,
> -//          64: javascript, 128: tabs
> -// E.g., 0 = show all results (no filtering), 1 = only visited pages in history,
> -// 2 = only bookmarks, 3 = visited bookmarks, 1+16 = history matching in the url
> -pref("browser.urlbar.default.behavior", 0);
> +// of the match filters with each additional filter adding more results (union).
> +pref("browser.urlbar.suggest.history",              true);
> +pref("browser.urlbar.suggest.bookmark",             true);
> +pref("browser.urlbar.suggest.openpage",             true);
> +
> +// Restrictions to current suggestions can also be applied (intersection).
> +// Typed suggestion works only if history is set to true.
> +pref("browser.urlbar.suggest.history.onlyTyped",    false);

Note: This redesign effectively unblocks (or obsoletes) SM Bug 618619 - Add support for more browser.urlbar.default.behavior values (History and Bookmarks) to Location Bar Autocomplete.
User Story: (updated)
Depends on: 530209
(In reply to Philip Chee from comment #0)
> Note: This redesign effectively unblocks (or obsoletes) SM Bug 618619 - Add
> support for more browser.urlbar.default.behavior values (History and
> Bookmarks) to Location Bar Autocomplete.

It was never blocked, the issue was that the old behavior was restrictive, so that if you choose bookmarks and history you would only get visited bookmarks.

The new behaviour is inclusive, so you can choose bookmarks or history or both. (But if you choose history then you can limit it to typed pages.) Unfortunately this means that we have to remove some UI.
I'll do the string removals separately once this gets review.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #8570224 - Flags: review?(iann_bugzilla)
Comment on attachment 8570224 [details] [diff] [review]
Branch-safe patch

I presume we're not looking to expose the other prefs that we support?
Attachment #8570224 - Flags: review?(iann_bugzilla) → review+
(In reply to Ian Neal from comment #4)
> Comment on attachment 8570224 [details] [diff] [review]
> Branch-safe patch
> 
> I presume we're not looking to expose the other prefs that we support?

It wasn't my idea to duplicate 618619 to this bug.
Pushed comm-central changeset 4d339705ffc0.

Leaving open to remove the strings and maybe add support for the other prefs.
Comment on attachment 8570224 [details] [diff] [review]
Branch-safe patch

[Approval Request Comment]
Regression caused by (bug #): 530209
User impact if declined: Some history preferences don't work.
Testing completed (on m-c, etc.): Landed on c-c
String changes made by this patch: None
Attachment #8570224 - Flags: approval-comm-beta?
Attachment #8570224 - Flags: approval-comm-aurora?
Comment on attachment 8570224 [details] [diff] [review]
Branch-safe patch

a=me comm-aurora and comm-beta
Attachment #8570224 - Flags: approval-comm-beta?
Attachment #8570224 - Flags: approval-comm-beta+
Attachment #8570224 - Flags: approval-comm-aurora?
Attachment #8570224 - Flags: approval-comm-aurora+
Attached patch Add UI for new prefs (obsolete) — Splinter Review
Attachment #8588145 - Flags: review?(iann_bugzilla)
If you untick and then tick "Automatically suggest websites as you type", both History and Bookmarks automagically become ticked. I don't think this is correct.
Flags: needinfo?(neil)
(In reply to Ian Neal from comment #10)
> If you untick and then tick "Automatically suggest websites as you type",
> both History and Bookmarks automagically become ticked. I don't think this
> is correct.

Aargh, they only went and made the "enabled" pref automatically toggle the "suggest" prefs. This sucks.
Flags: needinfo?(neil)
I removed updateMatchPrefs as it would have been too complicated.
Attachment #8588145 - Attachment is obsolete: true
Attachment #8588145 - Flags: review?(iann_bugzilla)
Attachment #8594346 - Flags: review?(iann_bugzilla)
This already got uplifted to aurora in the mean time, so I can only land on beta. (I guess it could land on release if there was a chance of us releasing from it.)

https://hg.mozilla.org/releases/comm-beta/rev/61279de5ae37
https://hg.mozilla.org/releases/comm-beta/rev/b8ca02cdc580
(Backing out unrelated change that I pushed by mistake.)
(In reply to neil@parkwaycc.co.uk from comment #12)
> Created attachment 8594346 [details] [diff] [review]
> Add UI for new prefs
> 
> I removed updateMatchPrefs as it would have been too complicated.

Not sure this is correct. The match only and match drop downs both disable when you untick the history box, leaving "Automatically suggest Bookmarks" enabled inbetween them.
Not sure the wording "Automatically suggest Bookmarks" is correct.
(In reply to Ian Neal from comment #14)
> Not sure this is correct. The match only and match drop downs both disable
> when you untick the history box, leaving "Automatically suggest Bookmarks"
> enabled inbetween them.
Yes, that is correct. "Match only websites you've typed previously" only applies to matching from history, and is disabled if you're not matching from history. The other match options also apply to matching from bookmarks, so ticking "Automatically suggest Bookmarks" will enable them.

> Not sure the wording "Automatically suggest Bookmarks" is correct.
"Automatically suggested Bookmarked pages" perhaps?
(In reply to neil@parkwaycc.co.uk from comment #15)
> (In reply to Ian Neal from comment #14)
> > Not sure this is correct. The match only and match drop downs both disable
> > when you untick the history box, leaving "Automatically suggest Bookmarks"
> > enabled inbetween them.
> Yes, that is correct. "Match only websites you've typed previously" only
> applies to matching from history, and is disabled if you're not matching
> from history. The other match options also apply to matching from bookmarks,
> so ticking "Automatically suggest Bookmarks" will enable them.
Yeah, not sure there is a way of making it less awkward with the space there is.
> 
> > Not sure the wording "Automatically suggest Bookmarks" is correct.
> "Automatically suggested Bookmarked pages" perhaps?
"Automatically suggest websites from Bookmarks" or "Automatically suggest Bookmarked pages"
Attachment #8594346 - Flags: review?(iann_bugzilla) → review+
(In reply to Ian Neal from comment #16)
> (In reply to comment #15)
> > (In reply to Ian Neal from comment #14)
> > > Not sure the wording "Automatically suggest Bookmarks" is correct.
> > "Automatically suggested Bookmarked pages" perhaps?
> "Automatically suggest websites from Bookmarks" or "Automatically suggest
> Bookmarked pages"
"Automatically suggest websites from Bookmarks" it is.

Pushed comm-central changeset aa4d087d7c63.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.38
Bug 1146323 is WONTFIX (Re-introduce preference and UI for "Only match locations, not website titles" in location bar suggestions)
You need to log in before you can comment on or make changes to this bug.