Closed Bug 460343 Opened 16 years ago Closed 16 years ago

Add privacy-section prefs to control awesomebar behaviour

Categories

(Firefox :: Settings UI, defect, P2)

defect

Tracking

()

VERIFIED FIXED
Firefox 3.6a1

People

(Reporter: johnath, Assigned: dietrich)

References

()

Details

(Keywords: late-l10n, user-doc-complete, verified1.9.1)

Attachments

(1 file, 5 obsolete files)

Alex mentioned this idea in discussion with mconnor and I but said that there wasn't a bug yet. The mockup in the URL is self-explanatory, the lines to focus on are the location bar behaviour lines, the "Bookmarks and History" combo box and the "private" tag beneath it. Nom'ng wanted - don't think it blocks, but it requires strings, so this would need to happen quickly.
Flags: wanted-firefox3.1?
Assignee: nobody → dietrich
Priority: -- → P2
Target Milestone: --- → Firefox 3.1b2
Attached patch v1 (obsolete) — Splinter Review
two known issues with this patch: - we have prefs for both bookmarks and tags, but the UI simplifies this to just bookmarks, but toggles both in the background. this means that if the user configures, for example, tags to be restricted but not bookmarks, reconfiguring via the UI will overwrite this choice. - we allow user-configuration of the restrict character. reconfiguring via the UI with this patch will return the restrict characters back to the defaults. to do this such that it retains the user-configured characters, we need to keep mirror prefs of those values. (the second issue is another problem with the tri-state approach of these prefs, per the discussion started here: http://groups.google.com/group/mozilla.dev.apps.firefox/browse_thread/thread/fef67b34f807bc68/0d5687e0d54643d6)
Attachment #346624 - Flags: ui-review?
Comment on attachment 346624 [details] [diff] [review] v1 gavin, do you have cycles for review here?
Attachment #346624 - Flags: ui-review?(faaborg+bugzilla)
Attachment #346624 - Flags: ui-review?
Attachment #346624 - Flags: review?(gavin.sharp)
Comment on attachment 346624 [details] [diff] [review] v1 Talked to Dietrich on IRC about getting better backend prefs here to avoid having to mess with the restrict.* prefs, which should simplify this code a lot. We can take this for now to get the strings in and then rework it once the better prefs are added. >diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js >+ this._initSuggestUI(); This means the UI won't properly update if some other code causes the pref to change while this dialog is up, but that's minor and should be fixed once we rework the backend prefs. >+ onSuggestUIChange: function PPP_onSuggestUIChange() { >+ this._urlBarPrefs.history.value = history ? defaults.getCharPref("history") : ""; >+ this._urlBarPrefs.bookmark.value = bookmark ? defaults.getCharPref("bookmark") : ""; >+ this._urlBarPrefs.tag.value = bookmark ? defaults.getCharPref("tag") : ""; You can use pref.reset() here rather than getting the default value yourself. >diff --git a/browser/components/preferences/privacy.xul b/browser/components/preferences/privacy.xul >+ <label id="locationBarSuggestionLabel" >+ control="locationBarSuggestionLabel" This should be locationBarSuggestion, not locationBarSuggestionLabel. >+ <menulist id="locationBarSuggestion" >+ <menuitem label="&history.label;"/> Localizers might not like this string reuse... I suppose it's pretty unlikely that the strings will vary based on the context, but it wouldn't really hurt to use separate strings here. r=me with those.
Attachment #346624 - Flags: review?(gavin.sharp) → review+
Depends on: 463459
Comment on attachment 346624 [details] [diff] [review] v1 Looks good, although hopefully we will get the full reorganization of bug 462041
Attachment #346624 - Flags: ui-review?(faaborg+bugzilla) → ui-review+
Attached patch v2 (obsolete) — Splinter Review
updated to use the pref in bug 463459.
Attachment #346624 - Attachment is obsolete: true
Comment on attachment 346782 [details] [diff] [review] v2 >+function URLBarPrefs() { >+} >+URLBarPrefs.prototype = { >+ get _default() { return document.getElementById("browser.urlbar.default.behavior").value || 0; }, >+ set _default(val) { document.getElementById("browser.urlbar.default.behavior").value = val; }, ... We can reduce all of that code to the above and the following: :) function URLBarPrefs() { const kBits = ["history", "bookmark", "tag", "title", "url"]; for (let i = kBits.length; --i >= 0; ) { let bit = kBits[i]; let mask = 1 << i; this.__defineGetter__(bit, function() this._default & mask); this.__defineSetter__(bit, function(aVal) this._default = aVal ? this._default | mask : this._default & ~mask); } }
Attached patch v3 (obsolete) — Splinter Review
- w/ mardak's comment - using sync attrs
Attachment #346782 - Attachment is obsolete: true
Attachment #346836 - Flags: review?(gavin.sharp)
Attached patch v3.1 (obsolete) — Splinter Review
fix bookmark filter
Attachment #346836 - Attachment is obsolete: true
Attachment #346836 - Flags: review?(gavin.sharp)
Comment on attachment 346853 [details] [diff] [review] v3.1 >diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js >+ writeSuggestionPref: function PPP_writeSuggestionPref() >+ let index = document.getElementById("locationBarSuggestion").selectedIndex; I'd use value instead of selectedIndex (faster to get, too). >+function URLBarPrefs(aDefault) { Having a helper like this is probably a little overkill given that it isn't used that much (it would be simpler to just adjust the bitmask manually I think), but doesn't really matter.
Attachment #346853 - Flags: review+
Comment on attachment 346853 [details] [diff] [review] v3.1 >+ // reset maxRichResults if needed >+ try { >+ resultsEl.reset(); Won't this reset the pref whenever I switch from bookmarks to history or vice versa? Why not reset it only if it's actually 0? Else you risk annoying people who prefer the Firefox 2.0 behavior of actually displaying (almost) all available hits by setting maxRichResults to a fairly large number.
Depends on: 463661
Attached patch v4 (obsolete) — Splinter Review
using the simpler pref from bug 463661.
Attachment #346853 - Attachment is obsolete: true
Attachment #347024 - Flags: review?(gavin.sharp)
Attachment #347024 - Flags: review?(gavin.sharp) → review+
Attachment #347024 - Flags: approval1.9.1b2?
Comment on attachment 347024 [details] [diff] [review] v4 requesting approval for late strings and UI for beta 2.
Axel says no chance to get these strings in for beta 2, but to nominate for late-l10n for RC1. This fix addresses some of the top complaints about the smart location bar in the Firefox 3 release, as well as complementing the privacy-oriented feature set of the 3.1 release, making it worth taking these strings late.
Keywords: late-l10n
l10n-impact comment: Glued together phrases as in this patch are tricky for l10n. Having some bake time to get feedback on how this works in various locales would have been good. This patch does, depending on how long the strings in question are in particular locales, come with a risk of having to resize the preferences dialog, which requires involved testing/patching cycles on all three platforms.
Comment on attachment 347024 [details] [diff] [review] v4 As per l10n feedback, not gonna make b2; perhaps next milestone, I'll do a swing through the minused b2 approvals at that time.
Attachment #347024 - Flags: approval1.9.1b2? → approval1.9.1b2-
Flags: wanted-firefox3.1? → wanted-firefox3.1+
Target Milestone: Firefox 3.1b2 → Firefox 3.1
Comment on attachment 347024 [details] [diff] [review] v4 a191=beltzner, let's get this in. Axel, please let us know if it causes a lot of consternation, l10n-wise, due to the stapled strings. If the reaction is that it would be a lot easier to do this without stapled strings, we can revisit the UI design.
Attachment #347024 - Flags: approval1.9.1? → approval1.9.1+
I think it'd be safer to allow for trailing text, i.e., have <hbox align="center"> <label id="locationBarSuggestionLabel" control="locationBarSuggestion" accesskey="&locbar.pre.accessKey;">&locbar.pre.label;</label> <menulist id="locationBarSuggestion" preference="browser.urlbar.search.sources"> <menupopup> <menuitem label="&locbar.both.label;" value="3"/> <menuitem label="&locbar.history.label;" value="1"/> <menuitem label="&locbar.bookmarks.label;" value="2"/> <menuitem label="&locbar.nothing.label;" value="0"/> </menupopup> </menulist> <label>&locbar.post.label;</label> </hbox> with locbar.post.label being empty in en-US, and probably most languages. That way, languages can, if it makes sense, have text after the dropdown. Reminds me of larry, where we don't have that, and Persian needs it.
(In reply to comment #19) > That way, languages can, if it makes sense, have text after the dropdown. > Reminds me of larry, where we don't have that, and Persian needs it. Yes, in fact I can confirm that Persian *will* need that trailing string here as well. We need a new patch here. Dietrich, if you don't have the time, I can make the required changes to your patch.
Whiteboard: [needs new patch]
Target Milestone: Firefox 3.1 → Firefox 3.1b3
No longer depends on: 463459
Attached patch v4.1Splinter Review
Dietrich, I've updated the patch and it's ready to land by anyone. Should I push it to trunk?
Attachment #347024 - Attachment is obsolete: true
Adding user-doc-needed so we can update helpdoc screenshots and text.
Keywords: user-doc-needed
http://hg.mozilla.org/mozilla-central/rev/eb18fff240df We have a query somewhere to check for pushing to 1.9.1 yeah?
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [needs new patch]
Does "Nothing" here actually mean previously typed URLs? "Nothing" seems misleading here, but I'm not sure what the best wording is given the current options. Another alternative would be three checkboxes instead of radio buttons: When using the location bar, suggest: [x] Bookmarks [x] History [x] Previously typed addresses
Nothing means nothing. At least for me on Vista. With it set as nothing, there is no location bar drop-down at all...nothing is suggested.
So there is no way to revert to the Firefox 2 behavior?
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/6c623d0b6997 (In reply to comment #26) > So there is no way to revert to the Firefox 2 behavior? You can make the location bar match only in the url (default.behavior) and match only at the beginning of the url (matchBehavior)
Keywords: fixed1.9.1
Target Milestone: Firefox 3.1b3 → Firefox 3.2a1
Target Milestone: Firefox 3.2a1 → Firefox 3.1b3
Blocks: 461184
v FIXED in Trunk and 1.9.1.
Status: RESOLVED → VERIFIED
Target Milestone: Firefox 3.1b3 → Firefox 3.6a1
Why did target get changed to 3.6a1 when this has been checked into the trunk and the 1.9.1 branch for 3.5?
Target milestones reflect the first trunk milestone that will contain the fix.
filed follow up bug 485122 about seeing bookmarks after selecting history only.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: