Closed Bug 76525 Opened 24 years ago Closed 18 years ago

Tree in File Bookmark dialog should not show twisties for empty folders

Categories

(Core :: XUL, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: sfraser_bugs, Assigned: enndeakin)

References

Details

Attachments

(1 file, 2 obsolete files)

The tree in the Add Bookmarks dialog is confusing to use, for two reasons: 1. There is no 'root' folder, so I can't easily tell how to append the new bookmark at the end of the list. 2. Folders which contain only bookmarks, not other folders, still show twisties, and they should not (since opening them doesn't have any effect).
stephen: 2 should be easy, want to try?
I almost never want to add something to the root folder, and I'd dislike having to dig through an extra layer to get to the other folders every time, so if a root folder is added, it should be open by default, and the top level of folders inside that should be open as they are now (Single click to file into any of the folders on my personal toolbar rocks). With that much pre-expanded tree on view, I think the dialog will have to be made larger... (um, seperate bug?)
The dialog is resizable, and should persist its size. I always want to add items to the root (because I'm lazy), and would like to see some kind of default selection in the tree view that shows this.
No, I'm in "crunch time" with mail/news, I'd better stick to my regular tasks.
I think the expandability-of-empty-folders issue is duplicate of WONTFIX bug 38728 But the need for a root-node bookmark folder is still valid (bugs really ought not try to cover more than one different issue)
this is not a dupe of 38728, it speaks to a more specific instance. Technically, these folders aren't empty, they just don't contain any folders and for the purposes of this dialog, might as well be. The twisties simply take up space and add to an alreeady confusing dialog.
OS: Mac System 8.5 → All
Status: NEW → ASSIGNED
Priority: -- → P4
Target Milestone: --- → mozilla1.0
Paul Chen is now taking Bookmarks bugs. For your convenience, you can filter email notifications caused by this by searching for 'ilikegoats'.
Assignee: ben → pchen
Status: ASSIGNED → NEW
Maybe fixed by outliner conversion? Marking mozilla0.9.8
Target Milestone: mozilla1.0 → mozilla0.9.8
Assuming this gets fixed by outliner conversion, marking mozilla1.1
Target Milestone: mozilla0.9.8 → mozilla1.1
*** Bug 113661 has been marked as a duplicate of this bug. ***
*** Bug 118007 has been marked as a duplicate of this bug. ***
mass reassign of pchen bookmark bugs to ben
Assignee: pchen → ben
Status: NEW → ASSIGNED
Target Milestone: mozilla1.1 → Future
*** Bug 125116 has been marked as a duplicate of this bug. ***
Summary: Tree in Add Bookmarks dialog should not show twisties for empty folders → Tree in File Bookmark dialog should not show twisties for empty folders
nsbeta1+ per Nav triage team. Double-click shouldn't 'open' the leaf folders either. Should be okay to fix by displaying only the fully expanded tree, and not allowing any collapsing.
Keywords: nsbeta1nsbeta1+
Target Milestone: Future → ---
I don't like trudelle's proposed solution, "displaying only the fully expanded tree, and not allowing any collapsing". That would be worse than this bug.
Mass move of nsbeta1+ bugs that didn't have a valid MachV milestone to mozilla1.0.
Target Milestone: --- → mozilla1.0
this is an rdfliner/template builder bug. -> waterson
Assignee: ben → waterson
Status: ASSIGNED → NEW
And waterson's on sabbatical till April. Who should get this, if it's to be fixed by 1.0? /be
nsXULTemplateBuilder::IsContainerEmpty needs to check for the existence of an iscontainer="true" rule and then ensure that any children are containers, I think. But nsXULTemplateBuilder is a bit too scary for me to try to delve into right now. Unfortunately, I don't know if anyone but waterson understands it all. I hope waterson isn't getting too comfortable away from work, because we can't let him quit. Ever.
Erk. With my (severely limited) knowledge of this code, this seems like it might be hard. I'm still not sure if it's possible to make the change Blake suggests without breaking another user of iscontainer that wouldn't want this behavior -- I'm not even sure if it's a distinction that can be made without extending the syntax. (There may be some way to do it with a non-simple rule.) Plane tickets are cheap; maybe I'll fly to california and hang around on the beach disguised as a surfer until Waterson shows up. n.b. IsContainerEmpty is actually an nsXULOutlinerBuilder method. cc'ing Jan, who knows outliners.
Check the XUL rules for the Mail window's folder pane. It has XUL <template> rules that do similiar things. I'm recalling something like an isEmpty="true" attribute.
There is an isempty attribute. I thought of that but don't see how that will help us here.
Reassigning to rjc - the other owner of rdf. Blake take if you have this covered.
Assignee: waterson → rjc
Hmm... I believe that adding flags="dont-build-content" (which was added a while ago) does the trick for <trees> now. Marking WORKSFORME.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
I'm not sure if this is really fixed, I'm still seeing this bug. That's not complaint, just letting you know.
This isn't fixed.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Yes, the problem still exists, as well as in Address Book. Taking and changing Component.
Component: Bookmarks → XP Toolkit/Widgets: Trees
Oops, forget to change the assignee.
Assignee: rjc → kyle.yuan
Status: REOPENED → NEW
Attached patch proposed patch (obsolete) — Splinter Review
The changes made in nsXULContentBuilder.cpp: It will fix the problem in Address Book. (I believe that was a typo of waterson.:) The changes made in nsXULTreeBuilder.cpp: It will fix other trees that have flags="dont-build-content" attribute.
Keywords: patch, review
After discussion with Jan, I found I was misunderstanding the original problem. I'll make a new patch soon.
Keywords: patch, review
Attachment #92194 - Attachment is obsolete: true
This is the safest way to solve the problem, but it may not the best. Still looking for a better way. My previous patch fixed such problem: 1) Open "Manage Bookmark" window; 2) Create a folder "A"; 3) Create a folder "B" under "A", then "A" has a twisty now; 4) Delete "B", "A" still has a twisty.
really want waterson to take a look.
This patch looks sort of like it's performing surgery with a sledge hammer. If we have to re-run rule propagation every time we CheckContainer() just to weed out false positives, it seems we're just masking whatever is causing CheckContainer() to be untrustworthy -- like an update to the datasource being missed somehow. But then, I may just be misinterpreting what's going on here. I'd have to go through this with a debugger to know for sure.
Chase, you are partly right, but I'm still trying to explain how can I do that. Firstly, the <rule> of the <tree> in "File Bookmark" has an iscontainer="true" attribute. nsXULTemplateBuilder::CompileSimpleRule() is the only place that take care of this attribute, and it constructs a nsRDFConInstanceTestNode object that honored "iscontainer" and "isempty". Then, those two attributes are only used by nsRDFConInstanceTestNode::FilterInstantiations(). There are two functions called FilterInstantiations() -- TestNode::Propagate() and TestNode::Constrain (). I have no idea about what Constrain() does, but maybe Propagate() is the right function we are looking for. Therefore, in current code structure, as far as I know, RootNode::Propagate() is the only entrance to let iscontainer="true" attribute take effect. Changing the current rule network algorithm goes beyond my knowledge of such code.
I looked at this some last night, and I think the problem may be that nsRDFConInstanceTestNode::Retract() is stubbed out. Unfortunately, I haven't yet figured out how to write it correctly -- there's no assertion of container emptiness in RDF that the XUL code can sniff; instead it has to be inferred from other things. I wonder if it's possible to do this by catching a specific change to rdf:nextVal in the CanPropogate() code, but that would also catch the case of container initialization... I'm going to try to hack together a proof-of-concept of this approach tonight to see if I'm just deluded.
Update: I have code that will trap the emptying of a container in Retract() code, but I'm doing something bad to the conflict set. I'm going to keep investigating. I'd be interested to hear what waterson had to say about the patch.
=> Chase Tingley
Assignee: kyle.yuan → tingley
*** Bug 176046 has been marked as a duplicate of this bug. ***
*** Bug 176230 has been marked as a duplicate of this bug. ***
Target Milestone: mozilla1.0 → ---
what is the status of this bug, with the new bookmark implementation?
This is not bookmarks specific, although it is only visible in file bookmark dialog at the moment. It is general RDF tree builder problem.
*** Bug 247713 has been marked as a duplicate of this bug. ***
*** Bug 242452 has been marked as a duplicate of this bug. ***
*** Bug 253021 has been marked as a duplicate of this bug. ***
Flags: blocking-aviary1.0?
Aside from identifying numerous duplicates - which indicates that the bug is causing concern to many users - is there any plan to resolve this before 1.0? The current behavior of the Bookmarks tree may be considered as acceptable for some, but it really gives the impression of an unfinished feature, certainly inadequate for a 1.0 release.
Flags: blocking-aviary1.0? → blocking-aviary1.0-
*** Bug 264279 has been marked as a duplicate of this bug. ***
*** Bug 264739 has been marked as a duplicate of this bug. ***
*** Bug 254514 has been marked as a duplicate of this bug. ***
I think the last patch is correct, I'm using it and it works fine. The additional code in the patch is actually copied from OpenSubtreeOf() method that creates children for a container. CheckContainer() (this method is currently used to test if a container is empty) only checks containment properties and if an *RDF* container is empty. The problem is that there may be rules that filter out all children of this RDF container. The performance shouldn't be affected much, because the final result is cached in mContainerFill. Neil, could you take a look?
*** Bug 205751 has been marked as a duplicate of this bug. ***
This bug looks fixed on trunk :) Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a8pre) Gecko/2007081205 Minefield/3.0a8pre
Indeed, and I think bug 285631 fixed it.
Assignee: tingley → Jan.Varga
Depends on: 285631
QA Contact: claudius → xptoolkit.trees
Target Milestone: --- → mozilla1.9alpha1
Status: NEW → RESOLVED
Closed: 23 years ago18 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: xptoolkit.trees → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: