Closed Bug 630307 Opened 13 years ago Closed 13 years ago

Widgets cannot be temporarily hidden (while maintaining location)

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nightgunner5, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b11pre) Gecko/20110130 Firefox/4.0b11pre
Build Identifier: Built from http://hg.mozilla.org/mozilla-central/rev/336d5906cb0f (via about:buildconfig)

Skip to the last paragraph if you don't want to hear about my add-on.

I made an add-on that does various things about a certain browser-based MMORPG. It needs to be authorized, which consists of clicking a widget, logging into the website for the MMORPG, and clicking the "Authorise" button. That widget can be destroyed and re-created without a problem because it is not something that should show up frequently.

I also want to make a widget that offers advice on what the player should do based on their previous actions. This widget will be hidden most of the time, until the add-on has an idea for the player. It is important that this widget keeps its position as it will be shown and hidden frequently.

I am sure there are other add-ons that would benefit from being able to hide widgets that temporarily have no use while keeping their position on the add-on bar.

Reproducible: Always

Steps to Reproduce:
1. Make a widget using the Add-on SDK
2. Try to find a way to hide it without destroying it
3. Make a ticket listing these three steps
Actual Results:  
There is no way to temporarily hide a widget other than destroying it and recreating it.

Expected Results:  
I believe I have already made myself clear.
OS: Windows XP → All
Hardware: x86 → All
Just to mention that this bug is fixed by this pull request:
  https://github.com/mozilla/addon-sdk/pull/118

I've added a specific test case for ensuring that position is maintained if we recreate the widget again with the same ID/label.

As lot of widget issues need a widget id property, I'm providing a pull request that first add this internal id handling and then various commit that fix/test these multiples widget bugs.
As pull request 118 landed, this bug is now fixed.
This usecase is explicitly tested there:
https://github.com/mozilla/addon-sdk/commit/e2b1538c0ad4d408affaa2ca37f072af7b07a4c0#L5R94
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.