Skip to content
This repository has been archived by the owner on Dec 3, 2017. It is now read-only.

Button sizes aren't perfect on install, after restart, and after moving the button #12

Open
evanj opened this issue Feb 20, 2014 · 8 comments
Labels

Comments

@evanj
Copy link

evanj commented Feb 20, 2014

This is a minor imperfection. Doing these tests with Pinterest's extension (which is an old-style extension that requires a restart) doesn't cause any button weirdness. Tested this on Firefox Mac 28.0 (Beta channel). Here is what I did:

  1. Created a new extension with cfx init.
  2. Imported browser-action-jplib and toolbarwidget-jplib
  3. Created a primitive main.js:
var badge = require('browserAction').BrowserAction({
  default_icon: 'mitro_logo-32.png',
});
  1. cfx xpi and install it from file. The initial size of the toolbar button is way too small:

screen shot 2014-02-20 at 10 52 58

  1. Open a new Window, and the button looks correct (on the new window, not the original window)

screen shot 2014-02-20 at 10 54 14

  1. Customize and drag the button to the add-on bar or the palette then back again:

screen shot 2014-02-20 at 10 55 10

  1. Open a new window. The new window is correct, but this icon is 1 pixel too high:

screen shot 2014-02-20 at 10 56 19

  1. Quit and restart the browser. The icon is still 1 pixel too high (see above). Its correct on new windows.

You can get the source code for my primitive extension here: https://github.com/evanj/ff-toolbar-bug

@Rob--W
Copy link
Owner

Rob--W commented Feb 20, 2014

You can get the source code for my primitive extension here:

Where?

@Rob--W Rob--W added the bug label Feb 20, 2014
@evanj
Copy link
Author

evanj commented Feb 20, 2014

Oops, forgot to copy and paste. Added link.

@Rob--W
Copy link
Owner

Rob--W commented Feb 20, 2014

Cannot reproduce on ArchLinux using:

What I did:

cd /tmp
git clone https://github.com/evanj/ff-toolbar-bug.git
cd ff-toolbar-bug
# To load dependencies in packages/
git submodule init
git submodule update
# Activate Addon SDK and create XPI file
addon-sdk
cfx xpi
# Launch Firefox
mkdir /tmp/nightlyprof
firefox-nightly - profile /tmp/nightlyprof --no-remote /tmp/ff-toolbar-bug/
# When Firefox has been opened, click on the XPI file
# Follow the steps-to-reproduce from issue 12

Can you retry with Firefox Nightly and a new Firefox profile?

@evanj
Copy link
Author

evanj commented Feb 20, 2014

Sure, so that seems to "work", although I need to hack the HTML to make it look more like Firefox's buttons. The default result has the button border, so I can't tell if it is aligned correctly or not:

screen shot 2014-02-20 at 11 49 14

I supposed I can probably hack the browserAction.html to remove the button tag; although my quick attempt to do that didn't seem to work.

At any rate: It seems fine to me to say "I don't care because this will eventually fix itself", which is true. Although its going to be many months before that happens. Thanks.

@Rob--W
Copy link
Owner

Rob--W commented Feb 20, 2014

Can't reproduce with Firefox 28.0b4 either, on Linux and Windows.

Did it "work" because you tested with Nighly, or did switching to a new Firefox profile solve your issue?

@evanj
Copy link
Author

evanj commented Feb 20, 2014

Oh, good point. I tried with Firefox Beta 28.0 b4 with a totally new profile: firefox-bin -profile /Users/ej/wtf and I got the same result as above. However, I also tried it on Windows 8 and Linux (Ubuntu), and it seems like it is a platform-specific bug. Translation: If this only happens on Mac OS X, it really is a "who cares" bug. I can deal with the few pixels being off.

Details:

On windows, there is a minor difference in appearance but not enough to care. The extension button on hover:

bug-windows-ext-button

The native button on hover:

big-windows-actual-button

On Windows, I was able to get the "small" icon thing to happen after dragging the button to the toolbar palette and back into the toolbar (on hover). Just like on Mac, opening a new window fixes it:

big-windows-small

On Linux, it doesn't look like I can get the bugs to happen, but I was able to get the focus "stuck" on the extension button. Click on the button to get the "pressed" state, then move the mouse off of it and release the button. The button remains looking like this:

bug-linux-stuck-focus

@Rob--W
Copy link
Owner

Rob--W commented Feb 20, 2014

The extension button is always a square, hence the size of the button might be different from the other buttons (esp. when these are rectangles).

The other bugs are really minor. I will not fix them, but if anyone sends a PR with an acceptable fix, I will review and merge it.

@evanj
Copy link
Author

evanj commented Feb 20, 2014

I agree with you: these are minor, and will go away with the new Firefox UI in 6 months time.

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

No branches or pull requests

2 participants