Closed Bug 666650 Opened 9 years ago Closed 9 years ago

[highlighter] create a global toolbar for the highlighter

Categories

(DevTools :: General, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 8

People

(Reporter: rcampbell, Assigned: rcampbell)

References

Details

(Whiteboard: [minotaur])

Attachments

(1 file, 2 obsolete files)

The highlighter should have a toolbar for the handling of global functions related to it. For example, an inspect button, a button to toggle the html panel on or off, and a place for other tools to add themselves, e.g., style panel.
Blocks: 663830
Assignee: nobody → rcampbell
Attached patch toolbar (obsolete) — Splinter Review
moving main toolbar out of the HTML panel.
Attachment #542816 - Flags: review?(mihai.sucan)
Status: NEW → ASSIGNED
Blocks: 650794
Depends on: 660606
Comment on attachment 542816 [details] [diff] [review]
toolbar

Review of attachment 542816 [details] [diff] [review]:
-----------------------------------------------------------------

Patch looks good. I like we will have a global Inspector toolbar.

::: browser/base/content/browser-sets.inc
@@ +145,5 @@
>    <commandset id="inspectorCommands">
>      <command id="Inspector:Inspect"
>               oncommand="InspectorUI.toggleInspection();"/>
> +#    <command id="Inspector:HTML"
> +#             oncommand="InspectorUI.toggleHTMLPanel();"/>

I am not sure why you add this here?

::: browser/base/content/browser.xul
@@ +742,5 @@
> +#  <toolbarbutton id="inspector-html-toolbutton"
> +#                 label="HTML"
> +#                 accesskey="H"
> +#                 class="toolbarbutton-text"
> +#                 command="Inspector:HTML"/>

Why do you add this here if it's not used?

::: browser/base/content/inspector.js
@@ +911,5 @@
>        return;
>      }
>  
>      this.closing = true;
> +    this.toolbar.setAttribute("collapsed", true);

Please add:

delete this.toolbar;
Attachment #542816 - Flags: review?(mihai.sucan) → review+
(In reply to comment #2)
> Comment on attachment 542816 [details] [diff] [review] [review]
> toolbar
> 
> Review of attachment 542816 [details] [diff] [review] [review]:
> -----------------------------------------------------------------
> 
> Patch looks good. I like we will have a global Inspector toolbar.
> 
> ::: browser/base/content/browser-sets.inc
> @@ +145,5 @@
> >    <commandset id="inspectorCommands">
> >      <command id="Inspector:Inspect"
> >               oncommand="InspectorUI.toggleInspection();"/>
> > +#    <command id="Inspector:HTML"
> > +#             oncommand="InspectorUI.toggleHTMLPanel();"/>
> 
> I am not sure why you add this here?
> 
> ::: browser/base/content/browser.xul
> @@ +742,5 @@
> > +#  <toolbarbutton id="inspector-html-toolbutton"
> > +#                 label="HTML"
> > +#                 accesskey="H"
> > +#                 class="toolbarbutton-text"
> > +#                 command="Inspector:HTML"/>
> 
> Why do you add this here if it's not used?

mostly as reminders for my next piece of work. I'll remove them.

> ::: browser/base/content/inspector.js
> @@ +911,5 @@
> >        return;
> >      }
> >  
> >      this.closing = true;
> > +    this.toolbar.setAttribute("collapsed", true);
> 
> Please add:
> 
> delete this.toolbar;

ah, good catch. Thank you!
Blocks: 672006
Whiteboard: [minotaur]
Whiteboard: [minotaur] → [minotaur][has-patch][needs-update][needs-review]
Priority: -- → P1
Blocks: 663778
Attached patch toolbar 2 (obsolete) — Splinter Review
updated based on mihai's comments.
Attachment #542816 - Attachment is obsolete: true
Attachment #549192 - Flags: review?(gavin.sharp)
Comment on attachment 549192 [details] [diff] [review]
toolbar 2

canceling review for a second. I want to add a bit to integrate better with the register tools patch.
Attachment #549192 - Flags: review?(gavin.sharp)
updated. Repositioned toolbar to bottom of browser and updated registerTool to use the new location.
Attachment #549192 - Attachment is obsolete: true
Attachment #549205 - Flags: review?(gavin.sharp)
Comment on attachment 549205 [details] [diff] [review]
[in-fx-team] toolbar2.1

>diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul

>   <vbox id="browser-bottombox" layer="true">
>+    <toolbar id="inspector-toolbar"
>+             collapsed="true">

Can you use hidden instead? That'll remove any possible Txul impact from having the toolbar there (though it should be minimal). And you should be able to use .hidden rather than toggling attributes directly.

Should the toolbar keep the nowindowdrag attribute? I'm not sure what behavior makes the most sense.

Does this interact with the findbar and/or sync notification bars decently? Those get added dynamically to the top of the browser-bottombox when they're added, so they'll show up on top of this toolbar. I guess that's OK?

r=me with those addressed.
Attachment #549205 - Flags: review?(gavin.sharp) → review+
(In reply to comment #7)
> Comment on attachment 549205 [details] [diff] [review] [diff] [details] [review]
> toolbar2.1
> 
> >diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul
> 
> >   <vbox id="browser-bottombox" layer="true">
> >+    <toolbar id="inspector-toolbar"
> >+             collapsed="true">
> 
> Can you use hidden instead? That'll remove any possible Txul impact from
> having the toolbar there (though it should be minimal). And you should be
> able to use .hidden rather than toggling attributes directly.

Should be able to. I'll try it and see.

> Should the toolbar keep the nowindowdrag attribute? I'm not sure what
> behavior makes the most sense.

I think so. The idea is that this is soon going to be the top toolbar with a docked HTML panel underneath it (between this toolbar and the addon bar). I think window dragging behavior would be weird there, and I'm toying with the idea of having drag resizing on the toolbar itself or in a splitter like the web console has.

Separate issue, but yes. No window drag. :)

> Does this interact with the findbar and/or sync notification bars decently?
> Those get added dynamically to the top of the browser-bottombox when they're
> added, so they'll show up on top of this toolbar. I guess that's OK?

that's what I think we want here. Would be strange to bring up the findbar with the highlighter active and have it appear below the highlighter toolbar and eventual HTML panel.

> r=me with those addressed.

Thanks, Gavin!

(just verified that hidden works well for the above, so I think this is good to go)
Whiteboard: [minotaur][has-patch][needs-update][needs-review] → [minotaur][has-patch][needs-update]
Whiteboard: [minotaur][has-patch][needs-update] → [minotaur][fixed-in-fx-team]
Target Milestone: --- → Firefox 8
Comment on attachment 549205 [details] [diff] [review]
[in-fx-team] toolbar2.1

http://hg.mozilla.org/integration/fx-team/rev/3d5ba47b14f2
Attachment #549205 - Attachment description: toolbar2.1 → [in-fx-team] toolbar2.1
http://hg.mozilla.org/mozilla-central/rev/3d5ba47b14f2
http://hg.mozilla.org/mozilla-central/rev/56a12277818e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [minotaur][fixed-in-fx-team] → [minotaur]
> http://hg.mozilla.org/mozilla-central/rev/3d5ba47b14f2

nits:
- looks like you forgot to add nowindowdrag="true"
- this.toolbar.hidden = null; <- should be false
augh. I'll push fixes.
Verified Fixed using Mozilla/5.0 (Windows NT 6.1; rv:10.0a1) Gecko/20111006 Firefox/10.0a1.
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.