Closed Bug 192624 Opened 22 years ago Closed 20 years ago

Empty bookmark folders should show '(Empty)'

Categories

(Firefox :: Bookmarks & History, defect, P3)

x86
All
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: Lil46john, Assigned: vlad)

References

Details

(Keywords: fixed-aviary1.0, polish)

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030209 Phoenix/0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030209 Phoenix/0.5

I empty all the bookmarks from what you give me and when I go over the
folder(Bookmarks.Bookmarks Toolbar Folder.) it gives out a tiny squished square.
I remember one of the other folders, called Mozilla and Phoenix Information,
whenever I highlighted it, it was a transparent "(empty ***)

Reproducible: Always

Steps to Reproduce:
1. Go to Bookmarks in the top toolbar.
2. Highlight an empty folder(bookmark toolbar folder)
3.

Actual Results:  
See a squished square

Expected Results:  
Said Empty with ghostly text, or a normal box.
Attached image Bookmarks screenshot
Confirming. I've seen this problem for a long time now, but I thought it was
already reported.

(Note: If this is a Mozilla bug, this is most certainly a duplicate. Is the
Bookmark service forked?)
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
David: phoenix and mozilla have very little in common with respect of bookmarks.
the best would be not to dupe against mozilla bugs.

Btw, this bug is likely a duplicate of bug 192624: the bookmark toolbar is horked.
> Btw, this bug is likely a duplicate of bug 192624: the bookmark toolbar is horked.

THIS is 192624! :)
ooopps! :)

*** This bug has been marked as a duplicate of 191637 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Slap me if I'm wrong, but this is NOT a dupe of 191637. That bug was some sort
of a regressen that happened at the same time as when the new Options window was
checked in by Ben.

This bug is about the fact that an empty sub-folder in the Bookmarks menu should
display something like "(Empty)" (disabled) when popping up, and not just a tiny
square. 

This bug has been there ever since Phoenix 0.1. Bug 191637 is very recent.
Reopening.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
re-ooops... Thanks!
updating summary
Summary: Empty bookmark folders looked squashed. → Empty bookmark folders should show '(Empty)'
i hope you have not worked on this bug yet :)

P.S. how to make the (Empty) string localizable? use something like
&empty.label; in setAttribute()? does it work?
taking QA contact, sorry about the bugspam
QA Contact: asa → mconnor
Attachment #121176 - Flags: review?(chanial)
Comment on attachment 121176 [details] [diff] [review]
patch with hardcoded string

>+  /////////////////////////////////////////////////////////////////////////////
>+  // show an empty item if the menu is empty
>+  showEmptyItem: function (aTarget)
>+  {
>+    if(aTarget.hasChildNodes())
>+      return;
>+
>+    var emptyElement = document.createElementNS(XUL_NS, "menuitem");
>+    emptyElement.setAttribute("id", "empty-menuitem");
>+    emptyElement.setAttribute("label", "(Empty)");
>+    emptyElement.setAttribute("disabled", "true");
>+
>+    aTarget.appendChild(emptyElement);
>+  },

needs to be localized

http://lxr.mozilla.org/mozilla/source/browser/base/locale/browser.properties
would be the right file.  Create say, emptyDirectory in that .properties file,
then you can use the following code snippet to get this working.

var gNavigatorBundle = document.getElementById("bundle_browser");
var EmptyMsg = gNavigatorBundle.getString("emptyDirectory");

then use EmptyMsg in place of the hardcoded string:
 emptyElement.setAttribute("label", EmptyMsg);

haven't looked at the rest of the patch yet, but this needs to be fixed before
formal review.
Attachment #121176 - Flags: review?(chanial) → review-
This localizes Chu Alan "sprite"'s patch as well as updates it to the current
trunk.
*** Bug 224982 has been marked as a duplicate of this bug. ***
*** Bug 232005 has been marked as a duplicate of this bug. ***
Flags: blocking0.9?
Comment on attachment 132285 [details] [diff] [review]
adds localization and updates patch 

>diff -u -r1.12 bookmarks.properties
>--- components/bookmarks/locale/bookmarks.properties	6 Aug 2003 09:14:03 -0000	1.12
>+++ components/bookmarks/locale/bookmarks.properties	28 Sep 2003 03:29:34 -0000
>@@ -104,3 +104,4 @@
> 
> search_button_label = Find
> 
>+emptyDirectory = Empty


shouldn't have the extra space there, string should be (Empty)
This happens to me in Mozilla 1.7b, and Netscape 7.1 (in other words, everything...)
This is a minor polish bug. It certainly shouldn't block Firefox 0.9 which is a
feature-driven release.
Flags: blocking0.9? → blocking0.9-
Keywords: polish
Flags: blocking1.0?
+ since there is a patch
Flags: blocking1.0? → blocking1.0+
Comment on attachment 132285 [details] [diff] [review]
adds localization and updates patch 

I need to review this at some point
Attachment #132285 - Flags: review?(mconnor)
Note that when you reload ffox, you correctly get the "Empty" item from the
appropriate bookmarks-template rule.  The template builder doesn't switch which
rule it applies once the container transitions from isempty=false ->
isempty=true, or the other way around -- if you reload ffox so that you get the
"Empty" menu item, and then add a bookmark to that folder, you'll get "Empty"
followed by the bookmark.
Assignee: p_ch → vladimir
Status: REOPENED → NEW
Flags: blocking-aviary1.0RC1+
I'd suggest also removing the isempty="true" rules from bookmarks-template in
browser-menubar.inc, so that the "Empty" menu item gets inserted in one place
only (showEmptyItem).  (Fixing this issue in the template builder ended up being
very non-trivial, so the patch here is probably the best approach, IMO.)
Comment on attachment 132285 [details] [diff] [review]
adds localization and updates patch 

minusing based on vlad's comments.  Vlad, I expect after favicons, this one is
easier? :)
Attachment #132285 - Flags: review?(mconnor) → review-
Updated version of Andrew's patch, basically changes the item to (Empty) and
removes the special-handling for empty elements from the template builder. 
(This means we can also get rid of the livemark special-handling, since they
just get treated like normal containers.)
Comment on attachment 152667 [details] [diff] [review]
bookmarks-empty-folders-1.patch

cleanup nit:

emptyItem.label can be removed from
http://lxr.mozilla.org/aviarybranch/source/browser/locales/en-US/chrome/browser
/bookmarks/bookmarks.dtd#95  and
http://lxr.mozilla.org/aviarybranch/source/browser/locales/en-US/chrome/browser
/browser.dtd#72 since you're removing the only two references to that (and I
don't know why its in both files, but neither is needed, so please remove both)

also, why the newline at the end of bookmarks.properties?

with those nits addressed, r=mconnor@myrealbox.com
Attachment #152667 - Flags: review?(mconnor) → review+
in on aviary, in my queue for trunk.
Status: NEW → RESOLVED
Closed: 22 years ago20 years ago
Resolution: --- → FIXED
You should try hiding the menu item in the onDrop function the same way that the
'open in tabs' menu item is hidden. This results in a nice deletion of the
'(Empty)' item as soon as a bookmark is added to the folder. 
setting fixed-aviary1.0 for bugfixes checked into branch
Keywords: fixed-aviary1.0
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs, filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: