Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icon bug on firefox nightly #55

Closed
lychichem opened this issue Apr 15, 2015 · 36 comments
Closed

icon bug on firefox nightly #55

lychichem opened this issue Apr 15, 2015 · 36 comments

Comments

@lychichem
Copy link

default
With this capture I think I don't need to say anything. The platform is Firefox nightly x64 edition running on Windows 7.

@Betsy25
Copy link

Betsy25 commented Apr 15, 2015

same here.

FF nightly v40, Win7

Might be related to this FF commit from yesterday :
#1153243 [Firefox:Theme]-Badged SDK button icons aren't sized correctly [All]

@gorhill
Copy link
Owner

gorhill commented Apr 15, 2015

Oops, I see, I need to remap the world to 16px, I didn't see this with FF 37.

@harshanvn
Copy link

Yes, FF37 works fine.

@hairycactus
Copy link

Related icon bug issue for uBlock₀ (v 0.9.4.3) in FF stable (32-bit). I had updated from v 0.9.4.1, whose icon size was fine.

  1. uBlock₀ icon is not "resizing" to FF's add-on's bar height, because the numeral is not overlapping the icon. The entire row is taller as a result.

  2. uBlock₀ icon as displayed on the add-ons bar retains the old design, while the icon displayed on the Dashboard tab has the latest shield design.

Screenshot: http://i.imgur.com/CaBYRN8.png

@gorhill
Copy link
Owner

gorhill commented Apr 15, 2015

Try first:

  • Uninstall uBlock
  • Quit Firefox
  • Re-install uBlock

@hairycactus
Copy link

Outcome:-

  1. Icon as displayed on FF's add-ons bar & Dashboard tab now both reflect the new shield design. Status: Resolved.

  2. But the icon's numeral is still extended outside (ie. not overlapping) the icon on the add-ons bar, hence vertically displacing the entire row & making it taller than default. Screenshot: http://i.imgur.com/ildikzA.png

For reference, below is what I did:-

  1. Uninstall uBlock₀ v 0.9.4.3 from FF.

  2. Use Preferences Monitor add-on's eCleaner utility to scan for & remove leftovers, namely:
    about:config » extensions.uBlock0@raymondhill.net.install-event-fired

c) Quit & restart FF.
d) Install uBlock₀ v 0.9.4.3 again.

@gorhill
Copy link
Owner

gorhill commented Apr 15, 2015

But the icon's numeral is still extended outside

You have a theme installed?

@hairycactus
Copy link

@gorhill — I've been using NASA Night Launch dark theme out of the box since 2014, & uBlock₀ (gorhill)/ uBlock (gorhill) since late Mar 2015.

Below are my findings after further testing:-

  1. uBlock₀ 0.9.4.3 is apparently "incompatible" with all versions of NASA Night Launch. I re-trialled the latest 5 versions of NASA Night Launch, but uBlock₀ 0.9.4.3 icon's notification-numeral is displaced downwards & leftwards by a few pixels, thus vertically distending the entire row in Firefox (ref: previous screenshots).
  2. No icon-display issues for uBlock₀ 0.9.4.1 & earlier versions when used in conjunction with NASA Night Launch (all versions).
  3. NASA Night Launch (all versions) is not conflicting with any other add-on (UI display & functions), or Firefox itself.

Shall I consult NASA Night Launch's developer ? The uBlock₀ icon issue only pertains specifically to uBlock₀ 0.9.4.3 & nothing else (including earlier versions of uBlock₀).

Version timeline as follows:-

uBlock₀ /uBlock (gorhill):

  • uBlock₀ 0.9.4.3 (15 Apr 2015) ⇒ icon problem started
  • uBlock₀ 0.9.4.2 (15 Apr 2015) ⇒ did not try this version
  • uBlock₀ 0.9.4.1 (12 Apr 2015)
  • uBlock₀ 0.9.4.0 (11 Apr 2015)
  • uBlock 0.9.3.0 (03 Apr 2015)
  • uBlock 0.9.2.3 (26 Mar 2015)
  • uBlock 0.9.2.1 (22 Mar 2015)
  • uBlock 0.9.2.0 (22 Mar 2015) ⇒ first installed uBlock

NASA Night Launch (dark theme):
https://addons.mozilla.org/en-US/firefox/addon/nasa-night-launch/versions

  • 0.6.20150406 (06 Apr 2015)
  • 0.6.20150330 (30 Mar 2015)
  • 0.6.20150319 (23 Mar 2015)
  • 0.6.20150212 (13 Feb 2015)
  • 0.6.20150204 (04 Feb 2015)
  • etc.

@hairycactus
Copy link

@gorhill — Might the positional displacement of the notification numeral observed for uBlock₀ 0.9.4.3 (in my Firefox stable with NASA Night Launch theme) be related to absolute vs. relative positioning of the new shield icon ?

In other words, can uBlock₀'s new icon be styled that it would display correctly across different browsers & browser themes ?

I'm not trained in IT (officially or non-officially), so I hope the below explains what I'm trying to ask. Thanks !

http://stackoverflow.com/questions/5747863/easiest-css-for-facebook-style-red-notifications
http://stackoverflow.com/questions/20192719/absolute-positioning-inside-relative-positioned-div-still-does-not-stay-in-place

@gorhill
Copy link
Owner

gorhill commented Apr 16, 2015

The badge is handled by Firefox's defaults. I think it might be because I saved using Inkscape SVG rather than plain SVG. I am fine tuning the icons for the next releases (they were kind of done in a rush, to fix the Chrome store situation), and I will be cautious this time to use plain SVG. Hopefully that will fix the issue.

@gorhill gorhill reopened this Apr 16, 2015
@gorhill
Copy link
Owner

gorhill commented Apr 16, 2015

@hairycactus this is what I get with v 0.9.4.4:

a

Hopefully this also works on your side.

@hairycactus
Copy link

@gorhill — Thanks for the speedy icon troubleshooting & refinement.

Outcome for uBlock₀ 0.9.4.4 dev.0 (pre-release):
The notification numeral is still displaced downwards & leftwards in Firefox stable with NASA Night Launch dark theme.

Screenshot

The above is regardless of whether I:-

  • Install of v 0.9.4.4 dev.0 over v 0.9.4.3; OR
  • Uninstall v 0.9.4.3, clean up leftover entry in FF's about:config, delete ublock0.sqlite from FF's profile\extension-data sub-folder, restart FF, install v 0.9.4.4 dev.0

Otherwise, I notice that v 0.9.4.4 dev.0's new shield is slightly broader & has more red space, while the "uB" lettering now looks like a conjoined "uo" (ie. same letter heights, denoting "uBlock Origin"). I can't tell from your screenshot because the numeral is blocking part of the lettering.

Other observations for info:-

  1. As opposed to earlier versions, one notable non-UI difference about v 0.9.4.4 dev.0 is that uninstalling this does not leave a leftover entry at FF's about:config » extensions.uBlock0@raymondhill.net.install-event-fired .
  2. However, uninstalling v 0.9.4.4 dev.0 continues to leave behind 1 subfolder & 1 sqlite file within FF's profile folder, namely: [FF profile]\extension-data\ublock0.sqlite. Perhaps this leftover is deliberate (eg. to help users preserve custom settings in case they reinstall uBlock₀).
  3. Uninstalling v 0.9.4.1 & previous versions (uBlock-gorhill) left behind ublock.sqlite in the same sub-folder. Hence, when I upgraded from v 0.9.4.1 to uBlock₀ 0.9.4.3, I ended up with both ublock.sqlite & ublock0.sqlite in the extension-data sub-folder, which appears to be created by & dedicated to uBlock storage.
  4. Not sure if this is relevant ... I notice that some of my installed add-ons write an "extensions.sdk-widget" entry in FF's about:config. Does this SDK badge config help to manage the icon's appearance & real-time function in the add-ons bar ?
    • For instance, Self-Destructing Cookies (whose icon displays real-time colour changes, located on LHS of uBlock₀ icon in my screenshot) writes this about:config entry: extensions.sdk-widget-inserted.widget:jid0-9XfBwUWnvPx4wWsfBWMCm4Jj69E@jetpack-self-destructing-cookies = true

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

@hairycactus I made more changes to the SVG icons. Changes are in 0.9.4.4-dev.1. I am working blind here since I cannot reproduce. So I just want to know if this fix the problem, you don't have to provide more info than you provided already. If this doesn't work, I am going to have to dig deeper.

@hairycactus
Copy link

@gorhill — Tried uBlock₀ 0.9.4.4 dev1 (17 Apr 2015). No change in terms of the icon's numeral displacement. Animated screenshot:

ff-nasaublock0 9 4 4dev1-iconbug-17apr15ani

Perhaps you might be able to reproduce the bug by installing uBlock₀ 0.9.4.1 directly over 0.9.4.3 (or the dev version you are testing), while the NASA Night Launch theme is enabled.

Searching further, I found several more "duplicates" of uBlock₀ vs uBlock items hidden deep inside FF's about:config values that are not removed after uninstall. Not sure if there are more (ie. items not explicitly labelled as "ublock" or ublock0"). Maybe my Firefox is confused.

@my-password-is-password

@gorhill If you go to customize,
ublockoriginffcustomize

and drag uBlock₀ back into the "Additional Tools and Featrue", you can see uBlock₀ icon is smaller than the rest. If the uBlock₀ was the same size as the other icon would the badge be placed in the correct place?
ublockoriginfficon

You're using 16x16? Don't know if thats why.

https://developer.mozilla.org/en-US/Add-ons/Install_Manifests#iconURL

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

You're using 16x16? Don't know if thats why

It's SVG, can be scaled to whatever size, cleanly. I originally left it in a 128px2 world, but apparently this led to issue in OP.

But what you show there is odd. At least this I can reproduce, so I will try to find out why it's not properly scaled up.

@my-password-is-password

Here, dbb93ae , says viewBox is 16x16. Is it using that?

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

Yes, just like it was when it was working fine: 1910dfd

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

Actually correction: I have no idea whether it was working fine with the older version for the case you are talking about. Note that if I move the icon in the menu, it is scaled up, and stays scaled up afterward wherever it is moved. (it's more complicated, it stays scaled up if I cause the icon to refresh by forcing the reload of a page somewhere).

@my-password-is-password

@gorhill try this

http://uux3.altervista.org/icon16.svg

It shows up right in the "Additional Tools and Featrue"

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

Yes, but the question is, will it show properly in OP's setup? To me the quirk in "Additional Tools and Features" is completely a Firefox issue, not a uBlock issue. I can get it to use the right size if I send the icon to the menu bar, refresh a page somewhere, then put the icon back in the Tools area. So definitely a Firefox issue.

I could probably get rid of all size issues by using PNGs. But @Deathamns chose SVG originally, and I can see why, this simplifies maintenance: only need one file for all sizes -- present and future.

@my-password-is-password

@gorhill i just tried with his theme and it doesn't fix it. It doesn't work, period. doh

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

@my-password-is-password So you also have a badge misalignment problem?

@my-password-is-password

No, I just tred using the xpi from the releases and it worked fine for me with his theme.

ublockoff

Edit: Dammit, forgot I customized my FF.

So it might be some other addon OP is using that is causing it.

Let me disable everything. Just FF, the theme, and ublock

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

The badge is positioned according to CSS rules, and uBlock uses whatever default rules there is -- it's why it is top right. So it does look to me the CSS style for the badge is being overwritten by something.

@my-password-is-password

Ok, here is FF37, Nasa theme, and uBlock and nothing else.

ublockoff2

Looks good on my side

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

Yes, that's what I got here. So if nobody else has the same issue, there is something specific on @hairycactus' side, we have to find out what.

@hairycactus
Copy link

@gorhill, @my-password-is-password

  1. So far, my uBlock₀ badge stops getting displaced only when NASA Night Launch theme is disabled. And the displacement only started when I updated uBlock₀ from 0.9.4.1 to 0.9.4.3 — the effect was immediate post-installation. Meanwhile, I did not install or uninstall anything else before, during or after the bug started.

Animated overlay showing Only uBlock₀ + NNL theme vs. Only uBlock₀ + FF Default theme, with no other add-on enabled:
ff-nasaublock0 9 4 4dev1-iconbug-18apr15ab-ani

  1. Based on both of your screenshots, is the numeral ("top right") supposed to block almost half of the new uBlock₀ badge, such that "uo" becomes just "u" ?

I thought the new default is where uBlock₀'s numeral is displayed like a bottom-right subscript, ie. as shown in my above overlay-screenshot when NNL theme is disabled. Is this a bug as well ?? To me, it looks much better than having half the uBlock₀ badge blocked by the notification numeral.

@hairycactus
Copy link

In Firefox's Customize & Additional Tools and Features, my uBlock₀ badge is always the same size as the other icons & badges.

But when uBlock₀ is actively blocking something, the displacement occurs as well at Additional Tools and Features, such that the text label "uBlock Origin" gets 99% pushed out of view.

This occurs both during normal usage (ie. other add-ons enabled), as well as when it is just uBlock₀ + NASA Night Launch theme enabled only.

Screenshot:
nasanightlaunch-ublock0-iconbug-18apr15

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

The only CSS rules applied to the badge in uBlock is to make the badge text white on dark gray (default would be white on bright red). Aside that, all else is default. The badge used to be positioned bottom right, but there were endless issues opened about the badge moving around etc., so Deathamns opted rightfully to let the browser decide where to position it, and all has been fine since then. So my guess is that something is adding a CSS style rule that overwrite the browser defaults.

What are the other Addons you have installed? For me to reproduce on my side is really key.

Edit: About this:

better than having half the uBlock₀ badge blocked by the notification numeral

This happens in the NASA theme, not the default theme. It's not unexpected custom themes will add more constraints so that the end result is not always optimal. In the current case, icons in the toolbar sit in a smaller container, so the badge end up covering the icons more than when using default theme.

@hairycactus
Copy link

The badge used to be positioned bottom right

How come I get to see the previous default (pre-Origin uBlock) in uBlock₀ 0.9.4.4 dev1, when NNL theme is disabled ? Is this a symptom that there is still some pre-Origin uBlock config hidden somewhere in my system ?

Below are my enabled add-ons & 1 non-FF theme. All are latest versions automatically updated from AMO, except uBlock₀ (manually install from GitHub).

Add-ons (.XPI):

  • CanvasBlocker
  • Firebug
  • Fireshot
  • Flash & Video Download
  • Force-TLS
  • Referrer Control
  • Self-Destructing Cookies
  • Show Parent Folder
  • uBlock Origin

Theme (.XPI):

  • NASA Night Launch

It doesn't matter though whether I enable or disable the other add-ons. As long as NNL theme is enabled, the uBlock₀ displacement occurs, ie. ever since uBlock₀ 0.9.4.3 (15 Apr 2015).

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

How come I get to see the previous default (pre-Origin uBlock)

Pre-Origin uBlock has also been top-right since a very long time now, so it's not normal to be bottom-right without NNL theme. I will have to try your addons and see if I can get the same result.

For reference: the positioning of the badge was changed to default back in February. I can't make sense of why it still like this for you, and even more so that you are using uBlock Origin, which is a different package then the original one.

@gorhill
Copy link
Owner

gorhill commented Apr 17, 2015

@hairycactus Wait a minute.. I had assumed you were on FF 37, and now I realize I can't find nowhere the version information of your Firefox...

@hairycactus
Copy link

@gorhill — I'm using uBlock₀ with Firefox 33.1.1 (x86) stable (en-US) in Windows 7 SP1 (x64): https://www.mozilla.org/en-US/firefox/33.1.1/releasenotes

the positioning of the badge was changed to default back in February. I can't make sense of why it still like this for you, and even more so that you are using uBlock Origin, which is a different package then the original one.

Thanks for the background history. So what I thought of as "normal" & genuinely looks fine is actually not the default since Feb 2015 !

The thing is: It was only on 22 Mar 2015 that I first installed your uBlock 0.9.2.0 (22 Mar 2015), & have stayed all the way till the current uBlock₀. Before that, I was using Adblock Edge, but disabled this before installing uBlock 0.9.2.0.

Anyway, I came across the following ... no idea what the programmer is saying, but it pertains to the positioning of add-ons' count-indicator at the FF toolbar, & perhaps something about old vs. new icons/ badges. Just in case it is of any relevance to SVG badges as well ...

http://stackoverflow.com/questions/6290705/how-can-i-display-text-over-toolbar-button-for-a-firefox-addon
"Sometimes, on load FF, broken update for image property. Its destroy work of code: 'btn.image = canvas.toDataURL("image/png", "");'. Property has changed, but icon stay old. For this fix you need append after that line this line: 'btn.style.listStyleImage = "url('" + btn.image + "')";' - its fix issue "
– Enyby Nov 9 '14 at 20:50

@gorhill
Copy link
Owner

gorhill commented Apr 18, 2015

Firefox 33.1.1 (x86) stable

There is the explanation. When you said originally "FF stable", I had assumed it was latest sable -- as I am not aware of "Firefox unstable" for older versions.

The badge was displayed differently prior to Firefox 36, and themes will causes this behavior, this is a known issue, this had been reported before.

Here:

Honestly I don't intend to address this issue for older versions of Firefox (35-) + theme.

@gorhill gorhill closed this as completed Apr 18, 2015
@hairycactus
Copy link

Thanks for the explanation. Sorry about the inconvenience caused. I wasn't aware that uBlock₀ does not fully support Firefox pre-35 (... & maybe the most current Firefox ESR whose theme is v 31.6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants