The default bug view has changed. See this FAQ.

[devtb] Add a DevTools menu to the developer toolbar

RESOLVED FIXED in Firefox 17

Status

()

Firefox
Developer Tools
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: paul, Assigned: paul)

Tracking

Trunk
Firefox 17
x86
All
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 8 obsolete attachments)

(Assignee)

Description

5 years ago
We need a dropdown menu with the tools that are not present in the toolbar.
(Assignee)

Updated

5 years ago
Blocks: 745773

Comment 1

5 years ago
Early mockups of the toolbar had a star (or some icon like that), which I believe was also the idea for Firefox's own "20%" features (limi's term for the stuff used 20% of the time/or by 20% of the users).

I'm curious what presentation you have in mind now. I'm thinking it's probably not literally a "DevTools" menu as listed in the summary of this bug.
(Assignee)

Comment 2

5 years ago
I haven't done anything yet for this bug, and I need to think about the UI.

I was thinking about a menu like the Bookmark menu.

My plan is to use the same button that we use to list the scripts in the debugger, but instead of text, I'll use a "tool" icon.

This is the simplest way to get all the tools in the devtb at the moment. But I am open to any suggestion.

Comment 3

5 years ago
(In reply to Paul Rouget [:paul] from comment #2)
> My plan is to use the same button that we use to list the scripts in the
> debugger, but instead of text, I'll use a "tool" icon.

Sounds good. Simple to start works for me!
(Assignee)

Comment 4

5 years ago
Created attachment 636750 [details] [diff] [review]
v1
(Assignee)

Updated

5 years ago
Depends on: 764555
(Assignee)

Comment 5

5 years ago
Created attachment 636767 [details] [diff] [review]
v1.1
(Assignee)

Updated

5 years ago
Attachment #636750 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Attachment #636767 - Flags: review?(dcamp)
(Assignee)

Comment 6

5 years ago
Created attachment 636814 [details] [diff] [review]
v1.2

better position for the popup
(Assignee)

Updated

5 years ago
Attachment #636767 - Attachment is obsolete: true
Attachment #636767 - Flags: review?(dcamp)
No longer blocks: 745773
(Assignee)

Comment 7

5 years ago
Created attachment 640219 [details] [diff] [review]
v1.3
(Assignee)

Updated

5 years ago
Attachment #636814 - Attachment is obsolete: true
(Assignee)

Comment 8

5 years ago
Created attachment 640268 [details] [diff] [review]
v1.5
(Assignee)

Updated

5 years ago
Attachment #640219 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Attachment #640268 - Flags: review?(dao)
(Assignee)

Updated

5 years ago
Blocks: 759102
Comment on attachment 640268 [details] [diff] [review]
v1.5

>+          <toolbarbutton id="developer-toolbar-menu"

I'd prefer a more meaningful id such as "developer-toolbar-other-tools".

>+                         label="&devToolbarMenuButton.label;">

ditto

>+  let reference = this._doc.getElementById("menuWebDeveloperPopup");
>+  let popup = this._doc.getElementById("developer-toolbar-menu").firstChild;
>+  for (let item of reference.childNodes) {
>+    let command = item.getAttribute("command");
>+
>+    if (command) {
>+      let selector = "#developer-toolbar > toolbarbutton[command=\"" + command + "\"]";
>+      let button = this._doc.querySelector(selector);
>+      let isInToolbar = button && !button.hidden;
>+      if (isInToolbar) {
>+        continue;
>+      }
>+    }
>+
>+    popup.appendChild(item.cloneNode());
>+  }

This clones menuWebDeveloperPopup's children including their id, so we end up with duplicate ids in the document.
Attachment #640268 - Flags: review?(dao) → review-

Comment 10

5 years ago
Would it make more sense to just reparent the menu on popup, and then put it back after it closes?
(Assignee)

Comment 11

5 years ago
(In reply to Dave Camp (:dcamp) from comment #10)
> Would it make more sense to just reparent the menu on popup, and then put it
> back after it closes?

But then you'll see the elements that are hidden in the toolbar.

We could just remove the id. Maybe while cloning, or better, directly from original menuitems.
Or we could just put the wanted menu items directly in the markup.
(Assignee)

Comment 13

5 years ago
(In reply to Dão Gottwald [:dao] from comment #12)
> Or we could just put the wanted menu items directly in the markup.

ok
(Assignee)

Comment 14

5 years ago
We are reproducing the same code (menu popup) in 3 different places (appmenu, menubar, devtb menu) and maybe 4 (bug 754481).

We can't use the same popups (because the content is not exactly the same), so I think we should code via some broadcasters.
(Assignee)

Comment 15

5 years ago
s/should code/should share code/
(Assignee)

Comment 16

5 years ago
Created attachment 641489 [details] [diff] [review]
v2
(Assignee)

Updated

5 years ago
Attachment #640268 - Attachment is obsolete: true
(Assignee)

Comment 17

5 years ago
Comment on attachment 641489 [details] [diff] [review]
v2

Forgot to ask for the review… dumb me.
Attachment #641489 - Flags: review?(dao)
(Assignee)

Comment 18

5 years ago
Created attachment 641780 [details] [diff] [review]
v2.1

forgot to remove some debug stuff
(Assignee)

Updated

5 years ago
Attachment #641489 - Attachment is obsolete: true
Attachment #641489 - Flags: review?(dao)
(Assignee)

Updated

5 years ago
Attachment #641780 - Flags: review?(dao)
(Assignee)

Comment 19

5 years ago
Dao, if you think you can't review this patch in time for the Aurora merge, I can write a simpler patch without this XUL refactoring.
(Assignee)

Comment 20

5 years ago
review ping
Comment on attachment 641780 [details] [diff] [review]
v2.1

>+<!ENTITY devToolbarOtherToolsButton.label  "More tools">

"More Tools"

Please rename all broadcaster:Tools:Foo instances to devtoolsMenuBroadcaster_Foo.

r=me with that
Attachment #641780 - Flags: review?(dao) → review+
(Assignee)

Comment 22

5 years ago
Created attachment 642629 [details] [diff] [review]
v2.2
(Assignee)

Updated

5 years ago
Attachment #641780 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Whiteboard: [land-in-fx-team]
(Assignee)

Updated

5 years ago
Blocks: 754481
https://hg.mozilla.org/integration/fx-team/rev/486fd8f6d29d
Assignee: nobody → paul
Status: NEW → ASSIGNED
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Backed out:
https://hg.mozilla.org/integration/fx-team/rev/7b3b0c5c9933

Apparently it breaks browser_bug616836.js on Linux:
https://tbpl.mozilla.org/?tree=Fx-Team&rev=564ed4fde8ab
Whiteboard: [fixed-in-fx-team]
Also on Windows:
https://tbpl.mozilla.org/php/getParsedLog.php?id=13640840&tree=Fx-Team
(Assignee)

Comment 26

5 years ago
https://tbpl.mozilla.org/?tree=Try&rev=2d1ee962a1e0
(Assignee)

Comment 27

5 years ago
Created attachment 644079 [details] [diff] [review]
v2.3

removed the accesskey for the error console and page source
(Assignee)

Updated

5 years ago
Attachment #642629 - Attachment is obsolete: true
(Assignee)

Comment 28

5 years ago
https://tbpl.mozilla.org/?tree=Fx-Team&rev=b658834ae434
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/b658834ae434
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 17

Updated

5 years ago
Depends on: 776254

Comment 30

5 years ago
Created attachment 644743 [details]
More Tools: checkmarks are not treated equally

The checkmarks of the More Tools menu are not treated equally.
Only Developer Toolbar, Responsive Design View and Style Editor get a checkmark, the others not. Those with checkmark can also close the corresponding window/dialog, but the others not.

It would be much nicer if all these windows can be opened and closed in the same way.
(Assignee)

Comment 31

5 years ago
(In reply to Alfred Kayser from comment #30)
> Created attachment 644743 [details]
> More Tools: checkmarks are not treated equally
> 
> The checkmarks of the More Tools menu are not treated equally.
> Only Developer Toolbar, Responsive Design View and Style Editor get a
> checkmark, the others not. Those with checkmark can also close the
> corresponding window/dialog, but the others not.
> 
> It would be much nicer if all these windows can be opened and closed in the
> same way.

Could you file a bug for that?
You need to log in before you can comment on or make changes to this bug.