Closed Bug 1130184 Opened 9 years ago Closed 7 years ago

Cannot programmatically show or hide toolbar after its been created

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: bobbyrne01, Unassigned)

Details

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();
}
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
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.