Cannot programmatically show or hide toolbar after its been created

RESOLVED INCOMPLETE

Status

Add-on SDK
General
P2
normal
RESOLVED INCOMPLETE
3 years ago
9 months ago

People

(Reporter: bobbyrne01, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20150125222008

Steps to reproduce:

I've created a toolbar within addon ..

var toolbar = Toolbar({
  title: Localisation.getString("addonName_title"),
  items: [playButton, previous, stop, next]
});

But i cannot programmatically show or hide it. 
Should methods exist for this functionality?
Developer could configure hotkeys to show/hide particular toolbars.


Actual results:

There is no api for this functionality.


Expected results:

Ability to do something like ..

if (showHotkey){
  toolbar.show();
}
	
if (hideHotkey){
  toolbar.hide();
}
(Reporter)

Comment 1

3 years ago
this is the api i'm referring to:
https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_toolbar
Flags: needinfo?(rFobic)
API intentionally was designed this way to make firefox user in charge of this decision like what toolbars should be shown and what should not. Please not that only one toolbar can be displayed at a time which is partially why show / hide was intentionally not part of API.

That being said I think it may make sense to allow providing a keyboard shortcut to toolbar so users could use them instead of manually clicking items in the menu. Similar providing a button may make sense but that's probably something UX needs to make calls on.
Flags: needinfo?(rFobic)
Priority: -- → P2
https://bugzilla.mozilla.org/show_bug.cgi?id=1399562
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.