[highlighter] create a global toolbar for the highlighter

VERIFIED FIXED in Firefox 8

Status

defect
P1
normal
VERIFIED FIXED
8 years ago
11 months ago

People

(Reporter: rcampbell, Assigned: rcampbell)

Tracking

unspecified
Firefox 8
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [minotaur])

Attachments

(1 attachment, 2 obsolete attachments)

Assignee

Description

8 years ago
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.
Assignee

Updated

8 years ago
Blocks: 663830
Assignee

Updated

8 years ago
Assignee: nobody → rcampbell
Assignee

Comment 1

8 years ago
Posted patch toolbar (obsolete) — Splinter Review
moving main toolbar out of the HTML panel.
Attachment #542816 - Flags: review?(mihai.sucan)
Assignee

Updated

8 years ago
Status: NEW → ASSIGNED
Assignee

Updated

8 years ago
Blocks: 650794
Assignee

Updated

8 years ago
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+
Assignee

Comment 3

8 years ago
(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!
Assignee

Updated

8 years ago
Blocks: 672006

Updated

8 years ago
Whiteboard: [minotaur]
Assignee

Updated

8 years ago
Whiteboard: [minotaur] → [minotaur][has-patch][needs-update][needs-review]

Updated

8 years ago
Priority: -- → P1

Updated

8 years ago
Blocks: 663778
Assignee

Comment 4

8 years ago
Posted patch toolbar 2 (obsolete) — Splinter Review
updated based on mihai's comments.
Attachment #542816 - Attachment is obsolete: true
Attachment #549192 - Flags: review?(gavin.sharp)
Assignee

Comment 5

8 years ago
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)
Assignee

Comment 6

8 years ago
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+
Assignee

Comment 8

8 years ago
(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)
Assignee

Updated

8 years ago
Whiteboard: [minotaur][has-patch][needs-update][needs-review] → [minotaur][has-patch][needs-update]
Assignee

Updated

8 years ago
Whiteboard: [minotaur][has-patch][needs-update] → [minotaur][fixed-in-fx-team]
Target Milestone: --- → Firefox 8
Assignee

Comment 9

8 years ago
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
Last Resolved: 8 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
Assignee

Comment 13

8 years ago
augh. I'll push fixes.

Comment 16

8 years ago
Verified Fixed using Mozilla/5.0 (Windows NT 6.1; rv:10.0a1) Gecko/20111006 Firefox/10.0a1.
Status: RESOLVED → VERIFIED

Updated

11 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.