Closed Bug 940826 Opened 11 years ago Closed 11 years ago

Jetpack menuitems library doesn't work on Australis

Categories

(DevTools :: General, defect)

28 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ram, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:P3])

Attachments

(1 file)

Attached image bug.png
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20131119030202

Steps to reproduce:

I am testing Australis on nightly [28.0a1 (2013-11-19)]. I wanted to use Firefox OS Simulator. For that I added 'Developers' into 'Customize and control nightly' block. And then I was able to see Firefox OS Simulator option there.


Actual results:

When clicked on Firefox OS Simulator, It did not do anything.


Expected results:

It should have open Firefox OS Simulator.
With DOM Inspector I'm seeing that this toolbarbutton has disabled="false", which prevents it from getting the hover styling on Windows. I'm pretty sure we use a [disabled] selector to prevent the styling, so even though disabled is set to false, this selector is matching.

After removing the disabled="false", clicking on Firefox OS Simulator does nothing and there are no messages in the Browser Console. There is no oncommand attribute on the toolbarbutton, so that's probably why nothing is happening.

Nothing happens either if I go to the Tools > Web Developer > Firefox OS Simulator using the menubar.

Myk, can you look in to this?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(myk)
Oh, the menuitem did do something, it opened the simulator tab but in a background window. However this doesn't happen for the menuitem in the Developer Tools when placed in the "Control and Customize" menu.
Component: Untriaged → Developer Tools
(In reply to Jared Wein [:jaws] from comment #1)
> With DOM Inspector I'm seeing that this toolbarbutton has disabled="false",
> which prevents it from getting the hover styling on Windows. I'm pretty sure
> we use a [disabled] selector to prevent the styling, so even though disabled
> is set to false, this selector is matching.
> 
> After removing the disabled="false", clicking on Firefox OS Simulator does
> nothing and there are no messages in the Browser Console. There is no
> oncommand attribute on the toolbarbutton, so that's probably why nothing is
> happening.
> 
> Nothing happens either if I go to the Tools > Web Developer > Firefox OS
> Simulator using the menubar.
> 
> Myk, can you look in to this?

There is another report (bug 941244) about this because some people add stuff to the help menu as well. Our menu mirrorring code doesn't copy event handlers. We could either fix the Simulator code to use an attribute, or start copying event handlers in some way... not sure if that's easily possible, though.
Whiteboard: [Australis:P5]
The classic Firefox OS Simulator, which we've renamed to Firefox OS 1.1 Simulator, isn't actually compatible with newer versions of Firefox (26+), because the Developer Tools APIs have changed significantly since B2G18, on which Firefox OS 1.1 Simulator is based.  We've replaced it with App Manager and the Firefox OS 1.2 Simulator, which doesn't add a menu item to any of the menus.

So this is not worth fixing for the sake of the classic Simulator, although it uses the menuitems module <https://github.com/mykmelez/menuitems-jplib>, which other addons may use, so it may be worth fixing for their sakes.  But even then, it isn't clear whether the fix should be in Australis or the menuitems module itself.

cc: evold, who wrote the module originally; wbamberg, who created the copy I forked; \n, who may also be using the module; and ochameau of the App Tools team (and formerly the Jetpack team) for their thoughts.
Flags: needinfo?(myk)
I can't reproduce in OSX 10.8.5 , FF 28 build 11/22/13.
The new simulator can be started from the App Manager: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_App_Manager

We also plan to add a button to start the simulator from the tools menu: bug 940976
This would be a WONTFIX for the simulator addon, this one:
  https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
As myk said, it only works up to Firefox 25.

Newer version of Firefox (26+) uses:
  https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/
That one doesn't add any menu item.

Also, as Myk said, various jetpack addons uses this SDK module to add menuitems and should be fixed:
  https://github.com/mykmelez/menuitems-jplib
So I'm morphing this bug to no longer target the simulator, but this library.

To take a look at this, you need to checkout some git repos:

  cd /tmp
  git clone git@github.com:mozilla/addon-sdk.git
  cd addon-sdk
  source bin/activate
  cd ..
  git clone https://github.com/mykmelez/menuitems-jplib.git
  cd menuitems-jplib
  mkdir packages
  cd packages
  git clone https://github.com/mykmelez/vold-utils-jplib.git
  cd ..
  cfx test -v -b /path/to/australis/firefox-bin
Summary: Can't open Firefox OS Simulator with Australis UI → Jetpack menuitems library doesn't work on Australis
OS: Windows 8 → All
Hardware: x86_64 → All
Whiteboard: [Australis:P5] → [Australis:P3]
(In reply to Alexandre Poirot (:ochameau) from comment #7)
> This would be a WONTFIX for the simulator addon, this one:
>   https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
> As myk said, it only works up to Firefox 25.
> 
> Newer version of Firefox (26+) uses:
>   https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/
> That one doesn't add any menu item.
> 
> Also, as Myk said, various jetpack addons uses this SDK module to add
> menuitems and should be fixed:
>   https://github.com/mykmelez/menuitems-jplib
> So I'm morphing this bug to no longer target the simulator, but this library.
> 
> To take a look at this, you need to checkout some git repos:
> 
>   cd /tmp
>   git clone git@github.com:mozilla/addon-sdk.git
>   cd addon-sdk
>   source bin/activate
>   cd ..
>   git clone https://github.com/mykmelez/menuitems-jplib.git
>   cd menuitems-jplib
>   mkdir packages
>   cd packages
>   git clone https://github.com/mykmelez/vold-utils-jplib.git
>   cd ..
>   cfx test -v -b /path/to/australis/firefox-bin

Against current fx-team on OS X I get:

35 of 35 tests passed.
Total time: 2.188460 seconds
Program terminated successfully.

Can you update the STR or close this bug if it no longer applies?
Flags: needinfo?(vaishnav.rd)
Needinfo'ing the right person this time, see comment #8
Flags: needinfo?(vaishnav.rd) → needinfo?(poirot.alex)
Yep, it works fine with today's nightly.

Thanks for having looked at this!
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(poirot.alex)
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 ID:20131231030203 CSet: c71b40e7fab8

Still now working on my computer :(
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: