PopupNotifications look bad of labels too long




Notifications and Alerts
6 years ago
3 years ago


(Reporter: Axel Nennker, Unassigned)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: [doorhanger][bugday-2011-05-27])


(4 attachments, 1 obsolete attachment)



6 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 openid
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

if the labels are too long (>32) the dropdown menu looks bad.
The popupnotification grows to accommodate the long labels but the dropdown menu is not right aligned animore. It moves to to the left it appears and moves over the popupnotification icon cluttering it.

Reproducible: Always

Steps to Reproduce:
1. Create a Popupnotification with long labels and show it

Actual Results:  
see Details

Expected Results:  
The popupnotification window should grow and the dropdown should be right aligned in this window.

Comment 1

6 years ago
Created attachment 534270 [details]
A picture of the popupnotification
Is your Issue reproducible in Safe-Mode?
Version: unspecified → 4.0 Branch

Comment 3

6 years ago
I need an addon to generate the long labels; so safe-mode is not an option I think.
Do you know a way to generate a popupnotification with long labels in the secondary options?

I use my addon "openid for firefox". After I used this openids "yahoo.com" and "https://www.google.com/accounts/o8/id" at an openid consumer e.g. http://wiki.idcommons.net/Special:OpenIDLogin the addon stored the long openid returned be the openid providers yahoo and google.
Then I ctrl-click the openid icon in the urlbar.
This makes the ugly popupnotification appear.

Although it is not impossible that "openid for firefox" is the culprit I guess that long labels just weren't ever tested.
"openid for firefox" is here https://addons.mozilla.org/en-US/firefox/addon/openid-for-firefox/ .
I'll attach my current version to this bug report.

Comment 4

6 years ago
Created attachment 534299 [details]
The developement version of openid for firefox
Ah yes. Indeed I'd guess that the Labels were designed to offer short texted Choices only.
Blocks: 398776
OS: Windows XP → All
Hardware: x86 → All
Whiteboard: [doorhanger]
Version: 4.0 Branch → Trunk

Comment 6

6 years ago
The window/popup is getting wider to the right but the drop-down menu is too much to the left. Don't know how the position of the drop-down menu is computed.

Anyways, if the width of the labels is constraint then there should be a crop option I think.
OS: All → Windows XP
Hardware: All → x86
Version: Trunk → 4.0 Branch
OS: Windows XP → All
Hardware: x86 → All
Version: 4.0 Branch → Trunk

Comment 7

6 years ago
My guess is that the error is here:

Do the attributes 'pack="end" align="center"' make sense on a hbox with exactly one child element the button?
These attributes force the children in the box to be packed to the right but not the box itself.
Maybe this hbox needs to be inside an additional hbox which has 'pack="end"'.

Comment 8

6 years ago
Can I test this if I do not have an OpenID created?
Component: General → XP Toolkit/Widgets: Menus
Product: Firefox → Core
QA Contact: general → xptoolkit.menus
Whiteboard: [doorhanger] → [doorhanger][bugday-2011-05-27]

Comment 9

6 years ago
To test this you need a way to create a PopupNotification with long labels. 
This can be done with any addon. 
If you use openid.xpi to test this then you need an openid e.g. a google profile or an Yahoo! account. 
Here is a list of openid providers: https://openid.net/get-an-openid/ where you can get openids for you.

A script to test this might look similar to the following code. 
But maybe this bug's behavior only shows when there are secondary options?! 
Don't knot yet.

file bug658842.js:
Components.utils.import("resource://gre/modules/PopupNotifications.jsm", tmp);
var pop = new tmp.PopupNotifications(gBrowser,
var anchorId = "openid-nascar-url-bar-image";
pop.show(gBrowser.selectedBrowser, "org-openinfocard-openid",
  "This popup shows a long label",
    label: "This is a long label that helps you see what this bug 658842 is all about",
    accessKey: "S",
    callback: function() {
      alert("The callbacks should have the menuitem as a parameter. Change Request!");
  null,  /* secondary action */
  null   /* options */

file style.css:
#notification-popup-box[anchorid="openid-nascar-url-bar-image"] > #openid-notification-icon {
        display: -moz-box;
#openid-notification-icon {
  list-style-image: url(chrome://openidnascar/content/openid-16x16.gif);

.popup-notification-icon[popupid="org-openinfocard-openid"] {
  list-style-image: url(chrome://openidnascar/content/openid-icon-100x100.png);

Would be nice if we had a minimal xpi to show this bug. This would then possibly show that I did every right in the attached openid.xpi.
So I think it would be best if not I write that bug658842.xul, bug658842.js etc

Yesterday I removed Popupnotifications from my code because of this bug and now I use my own panel to show the openids.
I will upload this version to AMO soon.

Comment 10

6 years ago
Whould it be possible for you to make an addon that works without any OpenID? Addon that just opens the notification with some random long string?

Comment 11

6 years ago
Created attachment 535849 [details]
primary option of PopupNotification is always long

The image was produced using the openid.xpi that I will upload in a minute.
Cntrl-clicking the openid icon in the urlbar will produce the bad popup.

Comment 12

6 years ago
Created attachment 535851 [details]
This produces the bug without the tester having an openid

Comment 13

6 years ago
Created attachment 535853 [details]
screenshot of the notification with the test addon

Confirming with the test addon.


6 years ago
Attachment #534299 - Attachment is obsolete: true


6 years ago
Ever confirmed: true
Mass-move to Toolkit::Notifications and Alerts

Filter on notifications-and-alerts-component.
Component: XP Toolkit/Widgets: Menus → Notifications and Alerts
Product: Core → Toolkit
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.