Closed Bug 318053 Opened 19 years ago Closed 19 years ago

Overflow for Bookmarks Toolbar

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bugs, Assigned: annie.sullivan)

Details

Attachments

(1 file, 1 obsolete file)

Need to overflow into a chevron menu, preserving D&D capabilities into that overflow menu.
Attached patch First pass at chevron menu (obsolete) — Splinter Review
Attachment #204661 - Flags: superreview?(bryner)
Attachment #204661 - Flags: review?(bugs)
Comment on attachment 204661 [details] [diff] [review]
First pass at chevron menu

>+          popup.popupShowingCallback = function() {t.chevronPopupShowing();};
>+          this._chevron.appendChild(popup);

Can't you replace this popupShowingCallback by doing

popup.addEventListener("popupshowing", function(e) { t.chevronPopupShowing(e.target); }, false);

... without requiring a change to menu.xml? (e.target is the popup element)

>+      <method name="getChevronWidth">

You call this function getChevronWidth...

>+          // hack -- collapse all children so that we can get the width of the hbox
>+          // if the buttons didn't stretch it past the edge of the window.
>+          // This still seems to return a minimum of 317 pixels.

Can't you also set overflow on the box in CSS to hidden? That will ensure the children are not used when determining the actual width of the box, but when the preferred width of the box is set to 0 and the flex set to 1 will ensure that clipping never actually happens. 

>+          var chevronWidth = this._chevron.boxObject.width;

... (from above) but then you don't use getChevronWidth to measure the chevron's width ...

>+            spaceLeft -= this.getChevronWidth(child);

... you use it to measure the other kids. Why not call the fn getElementWidth? or getButtonWidth?

One more rev to investigate the questions I made above about addEventListener/overflow.
Attachment #204661 - Flags: review?(bugs) → review-
The event listener I tried to add for popupShowing gets called before the handler in menu.xml fills in the popup menu, so as far as I can tell the callback is necessary.  I set the overflow style to hidden and got rid of my hack, and changed getChevronWidth() to getElementWidth().
Attachment #204661 - Attachment is obsolete: true
Attachment #204716 - Flags: superreview?(bugs)
Attachment #204716 - Flags: review?(bryner)
Attachment #204661 - Flags: superreview?(bryner)
Comment on attachment 204716 [details] [diff] [review]
Second pass at chevron menu

r=ben@mozilla.org

Annie explained the callback needs to execute after popupshowing but before the popup has actually shown.
Attachment #204716 - Flags: superreview?(bugs)
Attachment #204716 - Flags: superreview?(bryner)
Attachment #204716 - Flags: review?(bugs)
Attachment #204716 - Flags: review?(bryner)
Attachment #204716 - Flags: superreview?(bryner) → superreview+
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: