Open Bug 877339 Opened 11 years ago Updated 2 years ago

Allow createWidget to create different types of widgets

Categories

(Firefox :: Toolbars and Customization, defect)

x86
All
defect

Tracking

()

People

(Reporter: zer0, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:M-])

As far as I know, currently `createWidget` takes only two `type`: "button" and "view". This is not enough, especially for jetpack, if we want to use the new API for the new UI Components.

As Unfocused said here:

https://bugzilla.mozilla.org/show_bug.cgi?id=870897#c3

It would be nice having also "toggle button" and a "custom" type at least, so that we can cover all our needs.

Also, in according to UX mockup, the createWidget API should be able to create a Widget with a "badge" (see https://github.com/mozilla/addon-sdk/wiki/JEP-Navbar-Buttons#badge), where should be possible change text and (background) color. In future iteration, we'll have a "preset" of images too.

Currently, I'm adding the following structure in the toolbar:

  <toolbaritem>
    <stack>
      <toolbarbutton />
      <label top="-6" right="-6">
    </stack>
  </toolbaritem>

Not sure if there is a better way. If the "badge API" can't be added in `createWidget`, the "custom" type should be at least provide a nice way to create such component.
Whiteboard: [Australis:M?]
OS: Mac OS X → All
Pre-emptively marking this non-blocking, as nothing is broken by not having this yet. Also, it's a lot of work, so better a longer-term goal.

Bug 870897 will be implementing a "custom" type, at least.
Whiteboard: [Australis:M?] → [Australis:M-]
"custom" type should be enough on the short / medium term.
Whiteboard: [Australis:M-] → [Australis:M-][Australis:P?]
Whiteboard: [Australis:M-][Australis:P?] → [Australis:M-][Australis:P5]
Whiteboard: [Australis:M-][Australis:P5] → [Australis:M-]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.