Closed Bug 455756 Opened 16 years ago Closed 16 years ago

Add a "new tab" button to the tab bar

Categories

(Firefox :: Tabbed Browser, enhancement)

enhancement
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.1b1

People

(Reporter: dao, Assigned: dao)

References

Details

Attachments

(2 files, 1 obsolete file)

      No description provided.
Attached patch patch (obsolete) — Splinter Review
Attachment #339578 - Flags: review?(gavin.sharp)
IE8, Opera 9.6, Google Chrome have a "new tab" button at the right of most right tab.
This position is comprehensible. 

Why does only Firefox arrange the "new tab" button at the left of "all tabs" button?
I agree that "new tab" button should be just right side of the last tab. But it seems hard to implement in XUL.

<tabs class-"tabbrowser-tabs">
  <stack class="tabs-stack"><!-- anonymous contents of .tabbrowser-tabs -->
    <vbox/><!-- contains tabs-bottom, anonymous contents of .tabbrowser-tabs -->
    <hbox class="tabs-container"><!-- anonymous contents of .tabbrowser-tabs -->
      <arrowscrollbox class="tabbrowser-arrowscrollbox">
        <toolbarbutton class="scrollbutton-up"/><!-- anonymous contents of arrowscrollbox -->
        <scrollbox><!-- anonymous child of scrollbox -->
          <box class="scrollbox-innerbox"><!-- anonymous contents of scrollbox -->
            <tab class="tabbrowser-tab"/>
            <tab class="tabbrowser-tab"/>
            <tab class="tabbrowser-tab"/>
            <box class="tabs-right"><!-- THIS IS REQUIRED, as an anonymous contents of .tabbrowser-arrowscrollbox > scrollbox > .scrollbox-innerbox -->
              <toolbarbutton class="add-tab"/>
            </box>
          </box>
        </scrollbox>
        <toolbarbutton class="scrollbutton-down"/><!-- anonymous contents of arrowscrollbox -->
      </arrowscrollbox>
    </hbox>
  </stack>
</tabs>

In old versions, "tabs-right" was removed from tabbrowser's bindings. I think it is a good decision. However, to add new tab button on the position, we have to get it back undesirably.
(In reply to comment #2)
> IE8, Opera 9.6, Google Chrome have a "new tab" button at the right of most
> right tab.
> This position is comprehensible.

Opera and Chrome don't deal with overflowing tabs. I'm not sure about IE8.
The button needs to be visible regardless of the scroll position, and it seems odd to add it left to the down-scrolling arrow if the button doesn't actually scroll.
what about putting it on the far left since on the right there's already AllTabs (and maybe in future we could add some way to access "last closed tabs" near AllTabs)
i remember there was another bug about this but i can't find it actually :\
If the "new tab" button at the just left side of the "all tabs" button, the person who often uses the "new tab" button doesn't push it easily. Because there are two buttons there. 

Moreover, the shift from other browsers becomes troublesome. 

Example: "myFireFox" and "New Tab Button on Tab Right" method
- usually -> the "new tab" button at the just right side of the last tab
- overflow -> the "new tab" button at the left of the "all tabs" button

myFireFox
https://addons.mozilla.org/firefox/addon/4129
New Tab Button on Tab Right
https://addons.mozilla.org/firefox/addon/5338
Attached image Image
1. Dao's patch
2. Marco's suggestion
3. reverse of 2.
I don't really have an opinion about whether the button should be on the left or the right side, but I don't think we should change the position of the all tabs button.
(In reply to comment #8)
> I don't really have an opinion about whether the button should be on the left
> or the right side, but I don't think we should change the position of the all
> tabs button.

The position of IE7/8 "all tabs" button is in "3." (tabbar start).
http://internet.watch.impress.co.jp/cda/static/image/2008/08/28/ie8_5.jpg
 
I think that the discussion of tabbar arrangement is necessary for us.
Sure. Even though "all tabs" on the left seems illogical to me, stuff like that can always be discussed. Please file a new bug or start a thread in dev.apps.firefox if this one gets fixed as is (which I think it should as a first step, because that's what I've agreed upon with beltzner).
Why not place the "new tab" button at the left end of the tab bar, as in SeaMonkey (trunk, at least) and Konqueror? There it would be in nice symmetry with the "close current tab" button when the latter is fixed at the right end (browser.tabs.closeButtons set to 3 in Firefox, standard in SeaMonkey and Konqueror). (This is a different argument in favour of comment #5)

Though the position of the "all tabs" button is, I think, OT for this bug, I don't care where you place it since my userChrome.css sets it to "display: none !important". I use the Tabs Menu extension instead, which places the equivalent functionality on the menubar, where real estate is more readily available.
the "new tab" button at the left end of the tab bar
- click the "new tab" button, appear the new tab at the just right side of the last tab
- not intuitive (click left -> appear right side)

the "new tab" button at the right end of the tab bar
- click the "new tab" button, appear the new tab at the just right side of the last tab
- intuitive (click right -> appear right side)

the "new tab" button at the just right side of the last tab
- click the "new tab" button, appear the new tab at the clicked place
- very intuitive
- tabs overflow issue

the "all tabs" button
- use the user who opens a lot of tabs -> for heavy user, power user

the "new tab" button
- for beginner, average user

Which the "new tab" button or the "all tabs" button is given to priority?
Priority is the same in Dao's patch. 
- The precaution is necessary for the user who often uses the "new tab" button to click.
(In reply to comment #12)

let's play devil's advocate ;-)

> the "new tab" button at the left end of the tab bar
> - click the "new tab" button, appear the new tab at the just right side of the
> last tab
> - not intuitive (click left -> appear right side)

- intuitive by symmetry (open at left, close at right) when brower.tabs.closeButtons == 3 (which older users like me may have by tradition from Fx 1.0)
- least surprise with SeaMonkey, Konqueror, konsole, ..., which also open at left, close at right.

> 
> the "new tab" button at the right end of the tab bar
> - click the "new tab" button, appear the new tab at the just right side of the
> last tab
> - intuitive (click right -> appear right side)

too near the all-tabs menu (risk getting the one when wanting the other).

> 
> the "new tab" button at the just right side of the last tab
> - click the "new tab" button, appear the new tab at the clicked place
> - very intuitive
> - tabs overflow issue

too near the all-tabs menu

> 
> the "all tabs" button

or menu (on the menubar with Tabs Menu extension)

> - use the user who opens a lot of tabs -> for heavy user, power user
> 
> the "new tab" button
> - for beginner, average user

New Tab button and All Tabs menu are not exclusive. If I use both (and I do) am I a power user or a beginner?

> 
> Which the "new tab" button or the "all tabs" button is given to priority?
> Priority is the same in Dao's patch. 
> - The precaution is necessary for the user who often uses the "new tab" button
> to click.

I suppose it is less necessary when putting the new-tab button at the left end (you can have the all-tabs menu near the right end with no conflict)
Comment on attachment 339578 [details] [diff] [review]
patch

>diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml

>       <handler event="mouseover"><![CDATA[

>+        if (event.originalTarget == this._newTabButton) {
>+          this._newTabButton
>+              .setAttribute("tooltiptext",
>+                            this._newTabButton.getAttribute("tooltipstring"));
>+        }
>+        else
>+          this._newTabButton.removeAttribute("tooltiptext");

This code was only there for the alltabs button to avoid the tooltiptext affecting children in its menu, I think, so it shouldn't be necessary here.

>diff --git a/browser/themes/winstripe/browser/browser.css b/browser/themes/winstripe/browser/browser.css

>+.tabs-newtab-button {
>+  list-style-image: url(chrome://browser/skin/tabbrowser/newtab.png);
>+}
>+
>+.tabs-newtab-button > .toolbarbutton-icon {
>+  list-style-image: url(chrome://browser/skin/tabbrowser/newtab.png);

Why do you need both?
Attachment #339578 - Flags: review?(gavin.sharp) → review+
(In reply to comment #14)
> This code was only there for the alltabs button to avoid the tooltiptext
> affecting children in its menu, I think, so it shouldn't be necessary here.

Right.

> >+.tabs-newtab-button {
> >+  list-style-image: url(chrome://browser/skin/tabbrowser/newtab.png);
> >+}
> >+
> >+.tabs-newtab-button > .toolbarbutton-icon {
> >+  list-style-image: url(chrome://browser/skin/tabbrowser/newtab.png);
> 
> Why do you need both?

Nope, just an oversight.
Attached patch fixed patchSplinter Review
there was another copy&paste mistake: |.tabs-container > stack[chromedir="rtl"] > .tabs-newtab-button| should have been |.tabs-newtab-button[chromedir="rtl"]|.
Attachment #339578 - Attachment is obsolete: true
http://hg.mozilla.org/mozilla-central/rev/bbc07a9bf556
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.1b1
Are your serious?  I don't want a new tab button on the tab bar.  I want the option to put it where I want!!!  GAH!

~B
Blocks: 456984
https://litmus.mozilla.org/show_test.cgi?id=7037 has been added to Litmus to cover this functionality.
Flags: in-litmus+
I prefer to hide the Tab Bar when only one tab is open, so this button will be unavailable then - but this change removed the new tab button I'd put on the Menu Bar. Not cool.
verified fixed using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b1pre) Gecko/20080926021000 Minefield/3.1b1pre and Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b1pre) Gecko/20080926033937 Minefield/3.1b1pre.
Status: RESOLVED → VERIFIED
Is there a way to add the "New Tab" button under the "Customize Toolbar" option? I had my button up by my home button and since the addition of the new Tab Button to the right side I can longer add the old button, which is annoying since I have to go all the way over to the right to open a tab. (Unless I wan to use the Menu system, which is multi clicks since i use the Tiny Menu addon, etc )

Thanks!
(In reply to comment #22)
> which is annoying
> since I have to go all the way over to the right to open a tab.

This would be something to file a bug on. The position of the new "new tab" button isn't set in stone.
(In reply to comment #22)
> Is there a way to add the "New Tab" button under the "Customize Toolbar"
> option? I had my button up by my home button and since the addition of the new
> Tab Button to the right side I can longer add the old button, which is annoying
> since I have to go all the way over to the right to open a tab. (Unless I wan
> to use the Menu system, which is multi clicks since i use the Tiny Menu addon,
> etc )
> 
> Thanks!

see bug 456984
I ended up doing it this way, http://forums.mozillazine.org/viewtopic.php?f=23&p=4580935


It works fine for now.
Beltzner: how do you feel about giving the button a natural mapping to the location of the new tab (similar to Chrome and IE) as opposed to having it appear on the far right?  I'm also worried about overall discoverability.
Yeah, ok, I've tried the new tab button for a while, and it's in the wrong place. I understand the theory about it, but the theory is wrong. It's not a BAD theory, it's just incorrect.

If you're mousing around to the button, you're probably looking to visit a page in that new tab. You're either then going to your home page or Google or a bookmark. So, to go to home or bookmarks, you go all the way to the right, click, then back all the way to the left to click again.
In reply to comment #27:
This bug is FIXED, for better or worse.
Making that button draggable is bug 457187.
Blocks: 457651
Blocks: 457187
No longer blocks: 457187
Depends on: 457187
Just a suggestion:

* Add two flexible/collapsed toolbar containers on both sides of the tab bar, on the outer sides of the tab overflow buttons.
* Change the new tab button to be a normal toolbar button, but place it in the right-side toolbar container of the tab bar (meaning, keep the current location of it)

This would allow people to:

* Move the button to the other side by simply dragging and dropping
* Move the button to the normal navigation toolbar, or wherever they want to have it
* Remove it altogether
* Add other buttons on either side of the tab bar

The tab bar would effectively become an additional toolbar container, and the normal tab strip would be its main content. Similar to how the menu bar works on Windows today: it's just a menu bar, but you _can_ place other stuff there if you want to.

This seems like a much more flexible solution to me.
Blocks: 441064
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: