Create a Proton-specific "More Tools" panel
Categories
(Firefox :: Menus, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | verified |
People
(Reporter: mconley, Assigned: mtigley)
References
(Blocks 1 open bug)
Details
(Whiteboard: [proton-hamburger-menu])
Attachments
(1 file)
The Proton AppMenu has a "More Tools" subview that's currently pointing at appmenu-moreView
, defined here.
We should create a new panel, with the ID appmenu-moreTools
, and it should contain the following items:
Customize Toolbar…
<separator>
Browser Tools <section header>
<items from Web Developer menu>
We'll not be updating the original appmenu-moreView
.
Things to do:
- Create the
appmenu-moreTools
panelview element somewhere near here - Add a new string "appmenu-customizetoolbar" to appmenu.ftl, and insert the first toolbarbutton of the new panel to use it, and have it resemble this. The old string can then be removed.
- Getting the panel to insert the Web Developer items is going to involve mucking about in here: https://searchfox.org/mozilla-central/rev/b2433a832c250c55255e0ee37d05192d04f20427/devtools/startup/DevToolsStartup.jsm#564-590. This is tricky - that panelview is shared between the Developer Tools button and the non-Proton Web Developer subview. We might need to duplicate what's going on in DevToolsStartup.jsm to populate the new section of the new panel being added (or update DevToolsStartup.jsm to know how to do it). This might require some consultation with the DevTools team on the best way forward.
Remember that this new panel should not be available when Proton is disabled, and the old non-Proton "More Tools" menu should remain untouched.
Assignee | ||
Comment 1•4 years ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) (Catching up on needinfos) from comment #0)
- Getting the panel to insert the Web Developer items is going to involve mucking about in here: https://searchfox.org/mozilla-central/rev/b2433a832c250c55255e0ee37d05192d04f20427/devtools/startup/DevToolsStartup.jsm#564-590. This is tricky - that panelview is shared between the Developer Tools button and the non-Proton Web Developer subview. We might need to duplicate what's going on in DevToolsStartup.jsm to populate the new section of the new panel being added (or update DevToolsStartup.jsm to know how to do it). This might require some consultation with the DevTools team on the best way forward.
We're getting the initial list of "Web Developer" items from the browser menu popup (Tools > Web Developer). These items are getting inserted at https://searchfox.org/mozilla-central/source/devtools/client/menus.js and contain the necessary information we need for keyboard shortcuts, localization, etc. But because we're cutting down on what items we show for Proton (see Bug 1690340) it's going to be interesting to see how we balance between showing all the web developer items for this "More Tools" submenu and only a subset of them in the browser menu popup and toolbar button.
I think we can try extracting this out into a helper that can be called separately for the appmenu-moreTools
submenu when its shown: https://searchfox.org/mozilla-central/rev/b2433a832c250c55255e0ee37d05192d04f20427/devtools/startup/DevToolsStartup.jsm#570-588. If Proton is enabled, then this helper appends the extra menu items if the event target is the moreTools sub view.
Julian, perhaps you could weigh on this approach in case I'm missing any details or even on the wrong path here.
Reporter | ||
Comment 2•4 years ago
|
||
it's going to be interesting to see how we balance between showing all the web developer items for this "More Tools" submenu and only a subset of them in the browser menu popup and toolbar button.
Oh, to be clear, the DevTools listed in the "More Tools" menu here should match the list of DevTools listed in the Developer Tools menu. Does that ease the complication somewhat?
Assignee | ||
Comment 3•4 years ago
•
|
||
(In reply to Mike Conley (:mconley) (:⚙️) (Catching up on needinfos) from comment #2)
it's going to be interesting to see how we balance between showing all the web developer items for this "More Tools" submenu and only a subset of them in the browser menu popup and toolbar button.
Oh, to be clear, the DevTools listed in the "More Tools" menu here should match the list of DevTools listed in the Developer Tools menu. Does that ease the complication somewhat?
Yes that helps! Thanks for clarifying this.
Adjusting my initial approach, we'd just have to figure out showing the contents of PanelUI-developer
in its own section under in the appmenu-moreTools
panelview.
I think the easiest approach is to get all the menu items under menuWebDeveloperPopup
and append these items to the "More Tools" panel view as shown in https://searchfox.org/mozilla-central/rev/b2433a832c250c55255e0ee37d05192d04f20427/devtools/startup/DevToolsStartup.jsm#570-583.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Reporter | ||
Updated•4 years ago
|
Comment 6•4 years ago
|
||
bugherder |
Comment 7•4 years ago
|
||
Verified - Fixed in Beta 87.0b4 and latest Nightly 88.0a1 (2021-03-01) using Win10, MacOS 10.15 and Ubuntu 18.04 with Proton pref enabled.
Description
•