Closed Bug 870471 Opened 12 years ago Closed 12 years ago

Contextual menu in Australis Customization toolbar and menu panel

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: zfang, Assigned: Gijs)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [Australis:M6])

Attachments

(2 files, 2 obsolete files)

Add contextual menu based on the mock-up.
Attached image Mock-up
No longer blocks: 770135
Whiteboard: [Australis:M6]
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attached patch Patch (obsolete) — Splinter Review
This should essentially work and match the spec, I believe. I needed to pull the contextmenu into the panel to make the selected mode not flicker on hover the time (see eg. bug 492960 comment 20 for another report of this from Paolo). I added contextmenu event listeners to avoid the (disabled) contextmenu firing when you right click while already in customize mode. I added ellipsis for entering customize mode, and made the string for the panel's context menu say "Add more items..." (note the s). This implementation has one known bug: the normal context menu in the toolbar stops working if you move the button to the panel and back (until you restart, and only for that window). This is a core issue which I've filed as bug 877669. I'll try and come up with a fix for that, which I think shouldn't be toooo hard. Alternatively, we can workaround in two different ways: we can manually assign the same contextmenu item for things in the existing toolbox as exists on the toolbar; or we could not use the attributes and do manual contextmenu event listening + opening everywhere. I don't much like the idea of the latter option, I have to say, and I'd say the impact here is minimal and the chances of a proper fix high, hence me doing nothing so far. Finally, I might add that these context menus are normal context menus and therefore don't match the look and feel as shown on the mockup, but rather match the ordinary platform context menus. I assume that won't be a problem.
Attachment #756006 - Flags: review?(mconley)
Ah, one more thing: I guess I haven't tested this patch with an overflowing navbar. UX-wise, I guess we should show the button before the overflow (possibly nudging another existing item into the overflow) if people add a button to the toolbar. Does the overflowable toolbar expose an API to let us do that?
Comment on attachment 756006 [details] [diff] [review] Patch >+ <menupopup id="customizationContextMenu"> >+ <menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)" >+ label="&customizeMenu.addToToolbar.label;"/> >+ <menuitem oncommand="gCustomizeMode.removeFromPanel(document.popupNode)" >+ label="&customizeMenu.removeFromMenu.label;"/> >+ <menuseparator/> >+ <menuitem command="cmd_CustomizeToolbars" >+ label="&viewCustomizeToolbar.label;"/> >+ </menupopup> >+ >+ <menupopup id="customizationPanelContextMenu"> >+ <menuitem command="cmd_CustomizeToolbars" >+ label="&customizeMenu.addMoreItems.label;"/> >+ </menupopup> Lacks access keys.
(In reply to Dão Gottwald [:dao] from comment #4) > Comment on attachment 756006 [details] [diff] [review] > Patch > > >+ <menupopup id="customizationContextMenu"> > >+ <menuitem oncommand="gCustomizeMode.addToToolbar(document.popupNode)" > >+ label="&customizeMenu.addToToolbar.label;"/> > >+ <menuitem oncommand="gCustomizeMode.removeFromPanel(document.popupNode)" > >+ label="&customizeMenu.removeFromMenu.label;"/> > >+ <menuseparator/> > >+ <menuitem command="cmd_CustomizeToolbars" > >+ label="&viewCustomizeToolbar.label;"/> > >+ </menupopup> > >+ > >+ <menupopup id="customizationPanelContextMenu"> > >+ <menuitem command="cmd_CustomizeToolbars" > >+ label="&customizeMenu.addMoreItems.label;"/> > >+ </menupopup> > > Lacks access keys. Yes, because the menubutton isn't keyboard accessible in the first place, as far as I can tell...
That doesn't really matter for context menu. For instance, you can't open the toolbar context menu for toggling toolbars with the keyboard, but the items in the menu are still keyboard accessible.
Attached patch Patch v1.1 (obsolete) — Splinter Review
This patch adds accesskeys. :-)
Attachment #756006 - Attachment is obsolete: true
Attachment #756006 - Flags: review?(mconley)
Attachment #756018 - Flags: review?(dao)
Attached patch Patch v1.2Splinter Review
So it looks like in bug 877669 we won't change the behaviour of context="" or contextmenu="" because we have existing code (and possibly add-ons) that depend on that working. Removing the attribute outright ought to work, though.
Attachment #756018 - Attachment is obsolete: true
Attachment #756018 - Flags: review?(dao)
Attachment #756470 - Flags: review?(dao)
Depends on: 877669
Attachment #756470 - Flags: review?(jaws)
Comment on attachment 756470 [details] [diff] [review] Patch v1.2 >+<!ENTITY customizeMenu.addToToolbar.label "Add to Toolbar"> >+<!ENTITY customizeMenu.addToToolbar.accesskey "A"> >+<!ENTITY customizeMenu.removeFromMenu.label "Remove from Menu"> >+<!ENTITY customizeMenu.removeFromMenu.accesskey "R"> >+<!ENTITY customizeMenu.addMoreItems.label "Add more itemsâ¦"> Should be "Add More Items" (mind the caps) I'm not familiar with the CustomizableUI.jsm code, so that's best reviewed by somebody else.
Attachment #756470 - Flags: review?(dao)
Just a note that this patch is likely bitrotted by bug 873867.
Comment on attachment 756470 [details] [diff] [review] Patch v1.2 Review of attachment 756470 [details] [diff] [review]: ----------------------------------------------------------------- What comment 9 said.
Attachment #756470 - Flags: review?(jaws) → review+
Whiteboard: [Australis:M6] → [Australis:M6][fixed-in-ux]
I am using a windows 32 bit UX 24.0a1 (2013-06-06) build on Windows 7 64-bit, with the latest patch before build being 788d4dc9aaca. The context menu works, but for some buttons it consistently closes the panel on right click. The buttons affected are Preferences, Add-ons and Private Browsing. I haven't tested all available buttons thought.
What happens when addons that have their own custom right-click menus are placed in the panel? Is this menu overridden?
(In reply to uy2251+bugzilla from comment #14) > What happens when addons that have their own custom right-click menus are > placed in the panel? Is this menu overridden? We *should* append these new menuitems to the bottom of the custom context menu that the add-on provided. Can you please file a new bug for this?
Would it not make more sense to have the add-on menuitems first? Surely in that case the add-on menuitems would be the primary interaction and customization a secondary interaction?
(In reply to uy2251+bugzilla from comment #16) > Would it not make more sense to have the add-on menuitems first? Surely in > that case the add-on menuitems would be the primary interaction and > customization a secondary interaction? Yes, that is what I meant :)
Just re-read your comment and realized I need to read these things properly. I've never filed a bug report before. How would I go about it?
(In reply to uy2251+bugzilla from comment #18) > Just re-read your comment and realized I need to read these things properly. > I've never filed a bug report before. How would I go about it? Go here: https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=Toolbars%20and%20Customization And fill in something sensible for the "Summary" and "Description" fields that matches what you think the bug should be about. There's a field called "Blocks" (bottom-ish right). Please add the bug number of this bug in there. For bonus points, put [Australis:M?] in the whiteboard field. Thank you very much for helping us improve the UX builds! If you have any issues, no worries, one of us can do it too, just let us know. :-)
Depends on: 892463
Depends on: 924314
Blocks: 880164
OS: Mac OS X → All
Hardware: x86 → All
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M6][fixed-in-ux] → [Australis:M6]
Target Milestone: --- → Firefox 28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: