Closed
Bug 1219788
Opened 8 years ago
Closed 8 years ago
Show bookmarks toolbar when adding a bookmark to the bookmarks toolbar folder
Categories
(Firefox :: Bookmarks & History, defect, P3)
Tracking
()
VERIFIED
FIXED
Firefox 49
Tracking | Status | |
---|---|---|
firefox49 | --- | verified |
People
(Reporter: verdi, Assigned: dao)
References
(Depends on 1 open bug)
Details
(Whiteboard: [Onboarding])
Attachments
(1 file, 4 obsolete files)
3.96 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
If someone imports their bookmarks from another browser on first run and bookmarks are added to the toolbar folder we automatically show the toolbar folder for them. This is nice. However, those that don't have the bookmarks toolbar shown and then later file a bookmark in the bookmarks toolbar folder are surprised to find that we don't automatically show the toolbar. In tests, people have found this and the process of showing the toolbar confusing. We should automatically show the bookmarks toolbar if someone adds a bookmark to the toolbar folder and they don't already have the toolbar shown.
Updated•8 years ago
|
Priority: -- → P2
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → dao
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8699447 -
Flags: review?(mak77)
Comment 2•8 years ago
|
||
Comment on attachment 8699447 [details] [diff] [review] patch Review of attachment 8699447 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/base/content/browser-places.js @@ +1826,5 @@ > }; > + > +var AutoShowBookmarksToolbar = { > + init() { > + PlacesUtils.bookmarks.addObserver(this, false); This enforces initialization of the bookmarks service, ideally in the startup path we try to initialize it only when it's strictly needed (like if bookmarks work is about to happen) You can use PlacesUtils.add/RemoveLazyBookmarkObserver instead It would also be nice if we could observe only if the toolbar is not visible... each added observer adds a cost to bookmarks notifications. Can we merge this into PlacesToolbarHelper and use its knowledge to observe only when the toolbar was not initialized? @@ +1832,5 @@ > + uninit() { > + PlacesUtils.bookmarks.removeObserver(this); > + }, > + onItemAdded(aItemId, aParentId, aIndex, aItemType, aURI, aTitle) { > + this._autoshow(aParentId); I'd prefer if this would use aParentGuid and compare with PlacesUtils.toolbarGUID (ids are sort-of deprecated) @@ +1840,5 @@ > + onItemRemoved() {}, > + onItemChanged() {}, > + onItemVisited() {}, > + onItemMoved(aItemId, aOldFolderId, aOldIndex, aNewFolderId, aNewIndex, aItemType) { > + this._autoshow(aNewFolderId); ditto ::: browser/base/content/browser.js @@ +1472,5 @@ > > PlacesToolbarHelper.uninit(); > > BookmarkingUI.uninit(); > + AutoShowBookmarksToolbar.uninit(); nit: both of these should actually happen in the } else { branch of onUnload, since they are inited in delayedStartup (
Attachment #8699447 -
Flags: review?(mak77)
Comment 3•8 years ago
|
||
ehr sorry, PlacesUtils.bookmarks.toolbarGuid
Assignee | ||
Comment 4•8 years ago
|
||
This doesn't work reliably... e.g. when I show the toolbar, open a second window, hide the toolbar and add a bookmark, the toolbar is only made visible in the first window and the second one never seems to get the observer callback. Maybe you can spot if I did something wrong, otherwise I guess PlacesUtils.addLazyBookmarkObserver is just broken.
Attachment #8699447 -
Attachment is obsolete: true
Attachment #8702875 -
Flags: feedback?(mak77)
Assignee | ||
Comment 5•8 years ago
|
||
This always adds the lazy observer right away. It's simpler and works.
Attachment #8702876 -
Flags: review?(mak77)
Comment 6•8 years ago
|
||
Comment on attachment 8702876 [details] [diff] [review] autoshow.diff Review of attachment 8702876 [details] [diff] [review]: ----------------------------------------------------------------- Considered the most common case should be an hidden toolbar (the default) and considering there are better alternatives to avoid the tiny perf hit (in future we could unify some ui bookmarks observers into a single dispatcher) I think this is fine. There is only one thing that worries me, the fact this could cause us to show the toolbar in mochitest-browser tests that add a bookmark to the toolbar, next tests could not expect the toolbar. Did you already check this on the Try server?
Attachment #8702876 -
Flags: review?(mak77) → review+
Comment 7•8 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #4) > This doesn't work reliably... e.g. when I show the toolbar, open a second > window, hide the toolbar and add a bookmark, the toolbar is only made > visible in the first window and the second one never seems to get the > observer callback I'm not sure, but the fact toolbar changes happen in all the windows but each window has an handler and tracks whether it should observe separately sounds like complex enough to cause bugs. So let's just take the simpler path and move on.
Updated•8 years ago
|
Attachment #8702875 -
Attachment is obsolete: true
Attachment #8702875 -
Flags: feedback?(mak77)
Assignee | ||
Comment 8•8 years ago
|
||
(In reply to Marco Bonardo [::mak] from comment #6) > There is only one thing that worries me, the fact this could cause us to > show the toolbar in mochitest-browser tests that add a bookmark to the > toolbar, next tests could not expect the toolbar. Did you already check this > on the Try server? all green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f622a0df261
Assignee | ||
Updated•8 years ago
|
Flags: qe-verify+
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4e9389db3a5a
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Comment 11•8 years ago
|
||
Had to back this out after realizing it caused M(JP) LSAN permaleaks that were being starred under the guise of an old intermittent. https://treeherder.mozilla.org/logviewer.html#?job_id=6386467&repo=fx-team https://hg.mozilla.org/mozilla-central/rev/ce643acfab14
Status: RESOLVED → REOPENED
status-firefox46:
fixed → ---
Resolution: FIXED → ---
Target Milestone: Firefox 46 → ---
Assignee | ||
Comment 12•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a640ab7f2457 Looks like moving BookmarkingUI.uninit to the "right" place caused the leak. I'm gonna reland without that change.
Comment 14•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/44f79bbe2b51
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Assignee | ||
Comment 15•8 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #12) > https://treeherder.mozilla.org/#/jobs?repo=try&revision=a640ab7f2457 > > Looks like moving BookmarkingUI.uninit to the "right" place caused the leak. > I'm gonna reland without that change. Filed bug 1237569 on this.
Reporter | ||
Updated•8 years ago
|
Priority: P2 → --
Reporter | ||
Updated•8 years ago
|
Whiteboard: [Onboarding]
Comment 16•8 years ago
|
||
I was able to reproduce this issue on Firefox 44.0a1(2015-10-01) and on Windows 7 x64. This issue is no longer reproducible on Firefox 46.0a1 (2016-01-25) across platforms[1]. [1] - Windows 7 x64, Mac OS X 10.9.5, Ubuntu 12.04 x86
Status: RESOLVED → VERIFIED
Comment 17•8 years ago
|
||
The visibility of the bookmarks toolbar can be improved but I don't think this is the right way to go about it. 1. It doesn't respect the user's choice to hide the toolbar. 2. Users that choose to show the toolbar only when necessary will have to fight against it. 3. When the user saves a bookmark they are unlikely to be interested in other bookmarks at that time. 4. Simply rearranging bookmarks in the sidebar or library that belong to the "Bookmarks Toolbar" group is enough to autoshow the toolbar. 5. Extensions that save bookmarks to the "Bookmarks Toolbar" group will cause the toolbar to autoshow. 6. When the toolbar autoshows it moves everything down, if this happens unexpectedly the user can lose their place or perform an action on the wrong item. 7. There is no obvious/easy way to hide the toolbar (eg close button, context menu (Bug 1003364) or hotkey (Bug 403956)), only several indirect methods that are either obscure or require significant mousing (navbar context menu, menubar, bookmarks menu button or Customize). 8. The only opt-out is to move "Bookmark Toolbar Items" out of the toolbar (which is non-obvious) or not save bookmarks to the toolbar at all which sacrifices its convenience. 9. Chrome users are used to not having a bookmarks toolbar visible by default (they also have a context menu and hotkey to easily hide it) and there seems to be a widespread preference to minimize browser chrome as much as possible. I think it makes more sense to show the bookmarks toolbar for new tabs (Bug 1244649) as this is where it is most likely needed and doesn't interfere so much with user preference.
Comment 18•8 years ago
|
||
Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/4c296a2008eb
Comment 19•8 years ago
|
||
Backed out: https://hg.mozilla.org/integration/mozilla-inbound/rev/4c296a2008eb https://hg.mozilla.org/releases/mozilla-aurora/rev/eac694075b3f Carrying over some discussion from bug 1242756 and IRC with Marco: Bug 1242756 was filed as a regression involving an obscure JS pref (probably changing some timing of how things run, as a result), and earlier today blassey reported also having his bookmarks toolbar mysteriously reappear on his systems (without that pref). From discussion with Marco, the patch here isn't actually quite right. The somewhat subtle issue is that we only want to show the bookmark toolbar when the *user* adds a bookmark there, as a result of a user action. The current code will trigger whenever anything using Places adds a bookmark to the toolbar, which may or may not be a result of immediate user action. In particular, Marco says using Sync could trigger this... A sync'd bookmark coming over from another device shouldn't trigger showing the toolbar at some random time. Bug 1242756 comment 10 suggests handling this in the UI (add bookmark panel), so that when the user adds a bookmark and explicitly files it into the toolbar, the code tells Places to add a bookmark there and separately shows the toolbar.
Updated•8 years ago
|
Target Milestone: Firefox 46 → ---
Comment 20•8 years ago
|
||
Verdi: can you respond to the issues in comment 17? I think at least some of them will be fixed or adequately addressed by implementing this as intended, but there are some other concerns too.
Flags: needinfo?(mverdi)
Updated•8 years ago
|
Priority: -- → P3
Reporter | ||
Comment 21•8 years ago
|
||
(In reply to Kestrel from comment #17) > The visibility of the bookmarks toolbar can be improved but I don't think > this is the right way to go about it. > > 1. It doesn't respect the user's choice to hide the toolbar. We do respect the user's choice. The toolbar is hidden by default (unless you import toolbar bookmarks when doing a new install). If you don't intend to use it and don't file bookmarks there, you'll never see it. > 2. Users that choose to show the toolbar only when necessary will have to > fight against it. I don't believe this is a use-case we're designing for. We have other features that cover this - bookmarks in awesome bar searches and top sites on the new tab (which you can pin). > 3. When the user saves a bookmark they are unlikely to be interested in > other bookmarks at that time. > 4. Simply rearranging bookmarks in the sidebar or library that belong to the > "Bookmarks Toolbar" group is enough to autoshow the toolbar. If someone is intentionally saving a bookmark in the bookmarks toolbar, I believe that's a good indication that they intend to use the toolbar. Not showing it in this case is confusing (this has been observed in user testing). And for the case where someone accidentally files a bookmark here, exposing the toolbar makes that obvious and thus easier to correct. > 5. Extensions that save bookmarks to the "Bookmarks Toolbar" group will > cause the toolbar to autoshow. That's fine. > 6. When the toolbar autoshows it moves everything down, if this happens > unexpectedly the user can lose their place or perform an action on the wrong > item. I don't think this will be a big issue. When you are filing a bookmark you aren't looking at the content so you'll have to relocate your place in a document anyway. > 7. There is no obvious/easy way to hide the toolbar (eg close button, > context menu (Bug 1003364) or hotkey (Bug 403956)), only several indirect > methods that are either obscure or require significant mousing (navbar > context menu, menubar, bookmarks menu button or Customize). That's true though showing and hiding the bookmarks toolbar is not common task. > 8. The only opt-out is to move "Bookmark Toolbar Items" out of the toolbar > (which is non-obvious) or not save bookmarks to the toolbar at all which > sacrifices its convenience. I think that's fine. If you want to use the toolbar is should be visible. If you don't use (don't have bookmarks in it) it won't be visible. > 9. Chrome users are used to not having a bookmarks toolbar visible by > default (they also have a context menu and hotkey to easily hide it) and > there seems to be a widespread preference to minimize browser chrome as much > as possible. > Firefox's bookmarks toolbar is not visible by default. Most people will never see it. It's only when you explicitly file bookmarks there that you'll see it. This solves the problem of filing things there and then having to additionally figure out how to display the toolbar. > I think it makes more sense to show the bookmarks toolbar for new tabs (Bug > 1244649) as this is where it is most likely needed and doesn't interfere so > much with user preference. This doesn't make sense for the people who don't use the bookmarks toolbar.
Flags: needinfo?(mverdi)
Assignee | ||
Comment 22•8 years ago
|
||
<mak> dao: I think the points where we do new PlacesCreateBookmarkTransaction, both in browser-places.js and in bookmarkProperties.js.. and then there is the case where we move the bookmark to the toolbar (cause when you star it doesn't go there) http://mxr.mozilla.org/mozilla-central/source/browser/components/places/content/editBookmarkOverlay.js#739 <mak> dao: so effectively the only way to add to the toolbar is moving from the star panel (editBookmarkOverlay.js) and bookmarkProperties.js... probably there is no need to touch browser-places <mak> bookmarkProperties is used when you right click on the toolbar )from the menu button) and choose new folder/bookmark and so on <mak> I don't know if this is a case we care about, cause in this case the user may WANT to keep the toolbar hidden <mak> so it's likely the only case to handle is editBookmarkOverlay.js moving a bookmark to the toolbar <mak> alternatively, we could add a parentGuid to gEditItemOverlay, and when the panel closes you could check gEditItemOverlay.parentGuid
Assignee | ||
Comment 23•8 years ago
|
||
Attachment #8702876 -
Attachment is obsolete: true
Attachment #8753313 -
Flags: review?(mak77)
Assignee | ||
Comment 24•8 years ago
|
||
the removeObserver call was broken
Attachment #8753313 -
Attachment is obsolete: true
Attachment #8753313 -
Flags: review?(mak77)
Attachment #8753355 -
Flags: review?(mak77)
Assignee | ||
Comment 25•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2b51d32ea41f
Comment 26•8 years ago
|
||
Comment on attachment 8753355 [details] [diff] [review] patch Review of attachment 8753355 [details] [diff] [review]: ----------------------------------------------------------------- It looks good as a first try to do this for UI actions, let's see users reaction.
Attachment #8753355 -
Flags: review?(mak77) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 27•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/54ebf85e8731
Keywords: checkin-needed
![]() |
||
Comment 28•8 years ago
|
||
Backed for many failing mochitests on Linux: https://hg.mozilla.org/integration/fx-team/rev/b7756d054ba8 Push with failures: https://treeherder.mozilla.org/#/jobs?repo=fx-team&revision=54ebf85e87313800ab3b4412861a9d49cef7e2ff
Flags: needinfo?(dao+bmo)
Assignee | ||
Comment 29•8 years ago
|
||
(In reply to Sebastian H. [:aryx][:archaeopteryx] from comment #28) > Backed for many failing mochitests on Linux: > https://hg.mozilla.org/integration/fx-team/rev/b7756d054ba8 > > Push with failures: > https://treeherder.mozilla.org/#/jobs?repo=fx- > team&revision=54ebf85e87313800ab3b4412861a9d49cef7e2ff That leak was caused by me moving BookmarkingUI.uninit() to the "right" place. I've now removed that from my patch. https://hg.mozilla.org/integration/fx-team/rev/9caf438f4b91
Flags: needinfo?(dao+bmo)
Assignee | ||
Comment 30•8 years ago
|
||
... as happened before (comment 12), I just forgot about it.
Comment 31•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9caf438f4b91
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Comment 32•7 years ago
|
||
I've reproduced the initial issue on Nightly 44.0a1 (2015-10-01) on Windows 7 x64. Verified fixed on Windows 7 x64, Ubuntu 14.04 x64 and Mac OSX 10.11.6 using Firefox 49 RC build 3 (buildID: 20160912134115).
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•