Closed
Bug 880458
Opened 12 years ago
Closed 11 years ago
Find a way to display the SDK Panel associated to an overflowed SDK Widget
Categories
(Firefox :: Toolbars and Customization, defect)
Tracking
()
RESOLVED
FIXED
Firefox 28
People
(Reporter: zer0, Assigned: Gijs)
References
(Blocks 1 open bug)
Details
(Whiteboard: [Australis:M8][Australis:P1])
Attachments
(1 file)
1.60 KB,
patch
|
mconley
:
review+
|
Details | Diff | Splinter Review |
SDK Widget can have (anchored) panel attached to them. We need to figured out how to deal with overflowed SDK Widget when they're clicked – they currently have their own panel, we can't use a `createWidget` with type `view`.
We should have an API that returns the XUL node where to display the anchored panel, e.g. the original Widget XUL Node if is not overflowed, and the chevron if it's overflowed; closing the previous chevron panel.
Reporter | ||
Updated•12 years ago
|
Blocks: australis-cust
Whiteboard: [Australis:M?]
Updated•12 years ago
|
Whiteboard: [Australis:M?] → [Australis:M?][Australis:P1]
Assignee | ||
Comment 1•12 years ago
|
||
I can have a look at this either tonight or tomorrow. Looks like there's already a property for panels to have an anchor, so we'd just need to deal with overflowable toolbars. I'll probably want to refactor some bits of the OverflowableToolbar support so it doesn't depend on hardcoded IDs in CustomizableUI.jsm... Mike, does that sound right to you?
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(mconley)
Comment 2•12 years ago
|
||
So the menu panel has an anchor ID set on it, but I think that's separate (in fact, I'm not sure that's even useful anymore, since I'm not sure we ever want any other panel anchored to the menu panel button...I think that's an old idea that may not have taken off).
For the overflowable items, I think you just need to set the customizableui-anchorid attribute on them when they overflow - and set that to the chevron ID.
That way, the SDK *should* be able to choose the right anchor point simply by doing:
CustomizableUI.getWidget("someWidgetId").forWindow(window).anchor
Flags: needinfo?(mconley)
Assignee | ||
Comment 3•12 years ago
|
||
So if I'm reading you right, this is all that's needed? setLocationAttributes should take care of anything/everything wrt moving the node to/from different locations.
Looking at this code has made me realize... I'm pretty sure our API calls for moving widgets all break down if the overflowable toolbar is, uh, overflowing. :'(
We can't do that in customization mode (because everything gets moved out of the overflowpanel), but it'll affect consumers like the SDK.
I'll file a separate bug for that.
Attachment #773518 -
Flags: review?(mconley)
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #3)
> Looking at this code has made me realize... I'm pretty sure our API calls
> for moving widgets all break down if the overflowable toolbar is, uh,
> overflowing. :'(
>
> We can't do that in customization mode (because everything gets moved out of
> the overflowpanel), but it'll affect consumers like the SDK.
>
> I'll file a separate bug for that.
Hrm. Seems it doesn't actually break, because it just inserts wherever it can. Not ideal, but maybe what we want not to upset too many assumptions?
Comment 5•12 years ago
|
||
Comment on attachment 773518 [details] [diff] [review]
Patch
Review of attachment 773518 [details] [diff] [review]:
-----------------------------------------------------------------
Yes, I think this is right.
Attachment #773518 -
Flags: review?(mconley) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Whiteboard: [Australis:M?][Australis:P1] → [Australis:M8][Australis:P1][fixed-in-ux]
Reporter | ||
Comment 7•12 years ago
|
||
I notice an issue using the feature introduced in this bug: when I installed for the first time an add-on with a widget, the widget is displayed in the navbar, but it has the attribute "customizableui-anchorid" set to "nav-bar-overflow-button" even if is not "overflowed", and there is no overflow menu / chevron displayed.
When I close the browser, and I reopen it, everything works as expected – the attribute is present only if the widget is in the overflow panel or menu panel, with the right value –; so it seems happens only when the widget is added the first time.
Notice that customize the widget and move in the menu panel works as expected, but put the widget back to the navbar still shows the issue; until I restart the browser.
I think it's a bug; I'm expecting a consistent behavior between the first time the widget is added and after the browser is restarted.
Flags: needinfo?(gijskruitbosch+bugs)
Assignee | ||
Comment 8•12 years ago
|
||
(In reply to Matteo Ferretti [:matteo] [:zer0] from comment #7)
> I notice an issue using the feature introduced in this bug: when I installed
> for the first time an add-on with a widget, the widget is displayed in the
> navbar, but it has the attribute "customizableui-anchorid" set to
> "nav-bar-overflow-button" even if is not "overflowed", and there is no
> overflow menu / chevron displayed.
>
> When I close the browser, and I reopen it, everything works as expected –
> the attribute is present only if the widget is in the overflow panel or menu
> panel, with the right value –; so it seems happens only when the widget is
> added the first time.
> Notice that customize the widget and move in the menu panel works as
> expected, but put the widget back to the navbar still shows the issue; until
> I restart the browser.
>
> I think it's a bug; I'm expecting a consistent behavior between the first
> time the widget is added and after the browser is restarted.
Please file a new bug and list the widget specification you used (in particular, defaultArea and so on), and how you add it to the navbar.
Flags: needinfo?(gijskruitbosch+bugs)
Reporter | ||
Comment 9•12 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #8)
> Please file a new bug and list the widget specification you used (in
> particular, defaultArea and so on), and how you add it to the navbar.
This bug was about SDK Widget, so I mentioned "widget" in this meaning, sorry if it wasn't clear enough: so there is no "defaultArea" – I'm not using CustomizableUI API directly.
Anyway, I filed bug 906634, where I put more details about that: it seems that also this is applying to any buttons, when I start the UX build with a fresh profile.
Assignee | ||
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M8][Australis:P1][fixed-in-ux] → [Australis:M8][Australis:P1]
Target Milestone: --- → Firefox 28
You need to log in
before you can comment on or make changes to this bug.
Description
•