Closed Bug 1690351 Opened 3 years ago Closed 3 years ago

Create a Proton-specific "More Tools" panel

Categories

(Firefox :: Menus, task, P1)

task

Tracking

()

VERIFIED FIXED
87 Branch
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:

  1. Create the appmenu-moreTools panelview element somewhere near here
  2. 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.
  3. 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.

Depends on: 1690388
No longer depends on: 1690388

(In reply to Mike Conley (:mconley) (:⚙️) (Catching up on needinfos) from comment #0)

  1. 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.

Flags: needinfo?(jdescottes)
See Also: → 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.

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?

Flags: needinfo?(mtigley)

(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: nobody → mtigley
Status: NEW → ASSIGNED
Flags: needinfo?(mtigley)
Flags: needinfo?(jdescottes)
Severity: -- → N/A
Priority: -- → P1
Pushed by mtigley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/93aab6a4a920
Create a Proton-specific More Tools panel. r=jdescottes,mconley,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Regressions: 1694700
No longer regressions: 1694700

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.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: