Last Comment Bug 702081 - Some bookmarks dialogs lost the folder picker, thus making hard to choose their location
: Some bookmarks dialogs lost the folder picker, thus making hard to choose the...
Status: RESOLVED FIXED
: regression
Product: Firefox
Classification: Client Software
Component: Bookmarks & History (show other bugs)
: 10 Branch
: x86 Windows 7
: -- normal (vote)
: Firefox 11
Assigned To: Marco Bonardo [::mak]
:
Mentors:
Depends on:
Blocks: 712533 696159
  Show dependency treegraph
 
Reported: 2011-11-12 21:54 PST by Wong Huong Cheong
Modified: 2014-03-27 02:10 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments
patch v1.0 (12.89 KB, patch)
2011-11-14 07:12 PST, Marco Bonardo [::mak]
dietrich: review+
Details | Diff | Review

Description Wong Huong Cheong 2011-11-12 21:54:52 PST
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0a2) Gecko/20111112 Firefox/10.0a2
Build ID: 20111112042038

Steps to reproduce:

Right click any hyperlink and choose "Bookmark this link"


Actual results:

Not able to choose different bookmark folder


Expected results:

Able to choose different bookmark folder
Comment 1 Alice0775 White 2011-11-13 00:02:56 PST
Regression window(m-i),
Works:
http://hg.mozilla.org/integration/mozilla-inbound/rev/32ab009026d7
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111027 Firefox/10.0a1 ID:20111027020310
Fails:
http://hg.mozilla.org/integration/mozilla-inbound/rev/1f8780bd07ae
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111027 Firefox/10.0a1 ID:20111027023108
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=32ab009026d7&tochange=1f8780bd07ae

Suspected:
1ed8be9fed39	Marco Bonardo — Bug 696159 - Remove some deprecated Places code. r=dietrich sr=rstrong
Comment 2 Marco Bonardo [::mak] 2011-11-14 05:09:45 PST
this should be fixed in FF10, is pretty much annoying.
Comment 3 Marco Bonardo [::mak] 2011-11-14 05:31:00 PST
So, all of this has been caused by the misunderstoodment of minimalUI, my fault  caused by bad initial naming and lack of comments (plus hacks and workarounds on that code).
A dialog opened in minimalUI is supposed to be resizable, thus uses an alternative chrome url to be able to persist a different dialog size.
Which dialogs should be resizable? The ones who show a folder picker, since the hiearchy can easily go out of view in some cases.
I'm going to rename the aMinimalUI argument to aResizable, it's functionality will be the same, but the code will gain in clarity.
Finally I'll poll the dialogs to check we currectly show the folders picker where it's needed, should be easy at that point.
Comment 4 Marco Bonardo [::mak] 2011-11-14 06:35:37 PST
And I think we should backout Bug 696159 from Aurora
Comment 5 Marco Bonardo [::mak] 2011-11-14 07:12:54 PST
Created attachment 574291 [details] [diff] [review]
patch v1.0

The only case where we should hide the folderPicker is when we already know the destination, that is:
- when adding a new item to a view in PlacesController.newItem()
- when editing properties of an item in a view in PlacesController.showBookmarkPropertiesForSelection() 

In all the other cases we don't know where is the bookmark, nor the user, so it should be available.

In the "Add Keyword For this search" case, we should ask minimal information, right now we ask for tags description, when the user just wants to provide a keyword (and he already has to add a name and a location).

When adding a link="rel" bookmark (left click on a "rel=sidebar" link), we should not hide the "load in sidebar" checkbox, nor the location, since this a is possible scam source (load in sidebar should die, btw).

Finally, this clarifies what minimalUI means. Ideally we may make both cases resizeable and just persist the sizes separately, I don't completely understand why we decided to allow resizability only in one case. Dietrich?

PS: I'm not making a test since the matrix of possible cases here is pretty wide, it would likely always miss cases.
PPS: The right long-term fix for this is to completely stop using dialog windows.
Comment 6 Dietrich Ayala (:dietrich) 2011-11-14 12:45:52 PST
Comment on attachment 574291 [details] [diff] [review]
patch v1.0

Review of attachment 574291 [details] [diff] [review]:
-----------------------------------------------------------------

about tests, should add in-litmus? maybe so that we can get coverage that way. in fact, we likely already do have some that way.

::: browser/components/sidebar/src/nsSidebar.js
@@ +109,5 @@
>      win.PlacesUIUtils.showBookmarkDialog({ action: "add"
>                                           , type: "bookmark"
>                                           , hiddenRows: [ "description"
>                                                         , "keyword"
> +                                                       , "location" ]

why making loadInSidebar be visible here?
Comment 7 Marco Bonardo [::mak] 2011-11-14 12:52:16 PST
(In reply to Dietrich Ayala (:dietrich) from comment #6)
> about tests, should add in-litmus? maybe so that we can get coverage that
> way. in fact, we likely already do have some that way.

Probably yes, still the results matrix is complex to check, since we open the dialog from a lot different points. We may add a generic test with what I said above, so:
- if generated from a Bookmarks view, should not show the folder picker
- if generated from something that as as a panel should show loadInSidebar

> ::: browser/components/sidebar/src/nsSidebar.js
> @@ +109,5 @@
> >      win.PlacesUIUtils.showBookmarkDialog({ action: "add"
> >                                           , type: "bookmark"
> >                                           , hiddenRows: [ "description"
> >                                                         , "keyword"
> > +                                                       , "location" ]
> 
> why making loadInSidebar be visible here?

This is the internal implementation of .addPanel(), that is a dumb method we make available to content to allow a page to add a sidebar webpanel. loadInsidebar should be visible because often pages hijack addPanel() to force users to add a bookmark to them, and users are surprised by seeing their bookmark opened in the sidebar rather than in content. Really bug 560305 should be fixed and we should forget this crazy feature.
Comment 9 Ed Morley [:emorley] 2011-11-16 03:14:46 PST
https://hg.mozilla.org/mozilla-central/rev/2a1ec9ca46cd
Comment 10 Alex Keybl [:akeybl] 2012-01-05 13:38:57 PST
This is a regression in 10 - let's get this nominated for approval if deemed low risk.
Comment 11 Marco Bonardo [::mak] 2012-01-06 05:27:29 PST
(In reply to Alex Keybl [:akeybl] from comment #10)
> This is a regression in 10 - let's get this nominated for approval if deemed
> low risk.

the bug causing this regression (bug 696159) has been backed out from 10, so I think there's nothing more to do here.
Comment 12 Alex Keybl [:akeybl] 2012-01-06 16:04:17 PST
Thanks Marco, untracking for 10 in that case.

Note You need to log in before you can comment on or make changes to this bug.