Open fflorent opened 9 years ago
@janodvarko What do you think of the above patch? Is there a cleaner way than this hack for the inspector panel?
Florent
Yep, good call, we need to fix this (not sure about the alpha blocker though).
@janodvarko What do you think of the above patch? Is there a cleaner way than this hack for the inspector panel?
Yeah, it looks hacky. I have already landed some platform API that should help us to implement this properly. See issue #88 and this platform bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1072208
There are new events fired by ToolSidebar object:
Some goals/comments:
The patch:
Honza
Some goals/comments:
Right, thanks for the hints!
Our goal should be to have the ToolSidbar in every panel to avoid set of hacks for other panels (can take a time and that's why I am not sure if we want to have this as a blocker)
Sorry, I don't understand this part.
- The button is updated upon new "side-panel-loaded" event. I think it's wrong since that event is fired when side bar panel is loaded while the button should be updated when the side bar itself is opened.
Yeah... Do you have an event in mind that should be used instead? (perhaps "show"?)
- You register an event handler for that event using 'once' and then using 'off' to remove. Note that 'once' causes the listener to be executed just once then the listener is auto-removed.
Yes, but the event can be not handled when destroying the toolbox...
Florent
Sorry, I don't understand this part.
Not every built in panel is using the ToolSidebar widget. Some panels are re-implementing the side panels UI again and again, which makes life for extensions hard since we need to use different ways to overlay various implementations of the side bar. Of course things would get a lot easier if ToolSidebar is used by every panel and all APIs are nice and consistent. Extensions can use the same way for every panel.
It'll take a time to get these nice APIs. I also told Sebastian he can file some Bugzilla bugs about it (you might be interested in fixing them).
We should start with panels that use the ToolSidebar since it's the way to go and we can learn how to do things properly.
Yeah... Do you have an event in mind that should be used instead? (perhaps "show"?)
The button update should not be based on events fired by individual panels. It should use events fired by the sidebar itself, i.e. the show
and hide
events described above.
Yes, but the event can be not handled when destroying the toolbox...
Not sure what you mean by "can be not handled", but as mentioned above the event is coming from a side panel (and btw. can fire multiple times if there are multiple side panels) and not the side bar itself, so this part should be removed anyway.
Honza
May I continue working on it? (maybe more important than the unit-test of issue #143?)
Florent
Finishing the test should have higher priority atm. (but then you can definitely continue on this one!)
Honza
Right. Continuing right now (I am in vacation this day ;) ).
Florent
(I am in vacation this day ;) ).
Ah, you are one lucky Frenchman :-)
Honza
It's not a rumor that it happens the French work :).
Florent
The button is always displayed as if the side-panel was expanded.
Florent