Make the resizing of tabs configurable

RESOLVED WONTFIX

Status

()

enhancement
RESOLVED WONTFIX
8 years ago
6 years ago

People

(Reporter: mark, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [good first bug])

Attachments

(1 obsolete attachment)

(Reporter)

Description

8 years ago
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110619 Firefox/3.6.18 (Palemoon/3.6.18)
Build ID: 20110619154722

Steps to reproduce:

Upgrading to v5 made the tabs no longer immediately resize to show as much of the tab labels as possible at all times. This was done in Bug 465086

This new behaviour should be a user preference and configurable.
Severity: normal → enhancement
OS: Other → All
Version: 5 Branch → Trunk

Comment 1

8 years ago
Can you be more specific with steps to reproduce?
(Reporter)

Comment 2

8 years ago
If you open a number of tabs, and then close one of the tabs (in the middle somewhere), the tabs don't immediately resize to fill the tab bar again, but rather collapse to the left, remaining the previous (smaller) size. 

They only resize when you move the mouse out of the tab bar.

The new behavior is fine if your browsing involves a lot of rapid closing of tabs so you don't have to move your mouse between clicks, but it should be a user configurable preference for people who browse differently and for whom getting as much information as possible about the tab at all times is more important. (basically giving the option of not having to move the mouse out of the tab bar every time you close a tab)

Comment 3

8 years ago
There is general agreement that this feature needs to be left in but users should be able to disable it in the tab options panel.

Comment 4

8 years ago
The default behavior makes sense for most users. It's easy to revert the tab sizing. Just move the cursor vertically. Once the fix for bug 652735 lands, it will be even easier.
Maintaining a separate code path to disable each new feature is costly and prevents features from being built. If you wish to configure this, you can build an add-on.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
The separate code path is already there, it depends on removeTab's byMouse parameter. I think we can add a hidden pref for this.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WONTFIX → ---
Status: REOPENED → NEW
Whiteboard: [good first bug]

Comment 6

8 years ago
I have to agree that this needs to be made a configurable option. I and many others find it annoying. There are reasons I use firefox over chrome, and if you just continue to make it more like chrome, what's the point? I will very likely revert back to FF4 or use another browser if this goes unpatched, I find the behavior highly annoying and distracting.

Comment 7

8 years ago
I second inighthawki opinion. What is a feature for one can be a bug for another. If mozilla introduces new functions they should be configurable as a user preference, otherwise they remain only a bug or... disfunction.
That new, nonconfigurable behavior of tab panel is very annoying and distracting for me too. I would heartily revert back to old behavior as soon as possible as I can't stand nor the animation nor delay of resizing tabs which depends on mouse coursor possition.
Please, fix that.
Duplicate of this bug: 672924

Comment 9

8 years ago
I would be happy if the about:config pref: browser.tabs.animate; when set to false would be updated to include the disabling of this tab re-sizing behavior, since in all reality it is a tab animation isn't?

Tab Utilities includes a hidden option to disable this feature. This is the only workaround I know of (so far).

https://addons.mozilla.org/en-US/firefox/addon/tab-utilities/

After install, go to about:config and set 'extensions.tabutils.delayResizing' to 'false'

Comment 10

8 years ago
I don´t see any reason why this (In reply to comment #4)
> The default behavior makes sense for most users. It's easy to revert the tab
> sizing. Just move the cursor vertically. Once the fix for bug 652735 lands,
> it will be even easier.
> Maintaining a separate code path to disable each new feature is costly and
> prevents features from being built. If you wish to configure this, you can
> build an add-on.

I agree in case of completely new features. But this isn't new. This is "improvement" of old behaviour from FF4. This is a modification of code which already exists in FF4. And this is what we want - behaviour of FF4.
So there is a code. Just use it. I hate this new feature too. I've already tried to build an add-on but SDK (I know only SDK) doesn´t offer necessary API so I've failed.

Comment 11

8 years ago
You can use CSS to disable the resizing tab close behavior until this bug is RESOLVED FIXED. I'm currently using this:

.tabbrowser-tabs .tabbrowser-tab[selected="true"]:not([pinned="true"]) {
   min-width: 250px !important;
   cursor: default !important;
}

Set above tab 'min-width' to your own preference.

Comment 12

8 years ago
(In reply to rob64rock from comment #11)
> You can use CSS to disable the resizing tab close behavior until this bug is
> RESOLVED FIXED. I'm currently using this:
> 
> .tabbrowser-tabs .tabbrowser-tab[selected="true"]:not([pinned="true"]) {
>    min-width: 250px !important;
>    cursor: default !important;
> }
> 
> Set above tab 'min-width' to your own preference.
You're a genius! It also works on Fx 7 beta.

Comment 13

8 years ago
@rob64rock@yahoo.com

While I'm no expert (in fact I have almost no experience at all) with CSS, your solution still has a few issues. It only works if your closing the active tab, and the min-width attribute seems to make the selected tab always that size, with no exception. Even if the min-width is set to something far less than the tab width should be, it resizes it to that. That alone is actually more annoying to me than the original issue. ATM I'm solving the problem using the suggested tab utilities addon above. Being as it seems you know more about CSS than I do, do you know how to rewrite the snippet you posted to fix the two issues I mentioned?

Comment 14

8 years ago
(In reply to inighthawki from comment #13)
> @rob64rock@yahoo.com
> 
> While I'm no expert (in fact I have almost no experience at all) with CSS,
> your solution still has a few issues. It only works if your closing the
> active tab, and the min-width attribute seems to make the selected tab
> always that size, with no exception. Even if the min-width is set to
> something far less than the tab width should be, it resizes it to that. That
> alone is actually more annoying to me than the original issue. ATM I'm
> solving the problem using the suggested tab utilities addon above. Being as
> it seems you know more about CSS than I do, do you know how to rewrite the
> snippet you posted to fix the two issues I mentioned?

I currently looking into fixing those two issues with CSS if it's possible.

When you are using about:config pref: 
browser.tabs.closeWindowWithLastTab; set to false.

The resizing tab close behavior is very irritating and noticeable after closing the last opened tab(no pinned tabs) a new tab appears shortened it doesn't animate to it's full tab width until the cursor is moved out the tab bar. Also the incremental resizing of the tab in focus after closing focused tabs in the last tab position when the tab bar is completely filled is also weird in my opinion.

That's why I use the CSS code I shared in my previous post, I uploaded it as a style for those interested:
http://userstyles.org/styles/53190/firefox-6-disable-resizing-tab-close-behavior

Comment 15

8 years ago
(In reply to inighthawki from comment #13)
> @rob64rock@yahoo.com
> 
> While I'm no expert (in fact I have almost no experience at all) with CSS,
> your solution still has a few issues. It only works if your closing the
> active tab, and the min-width attribute seems to make the selected tab
> always that size, with no exception. Even if the min-width is set to
> something far less than the tab width should be, it resizes it to that. That
> alone is actually more annoying to me than the original issue. ATM I'm
> solving the problem using the suggested tab utilities addon above. Being as
> it seems you know more about CSS than I do, do you know how to rewrite the
> snippet you posted to fix the two issues I mentioned?

The two issues now fixed use this new CSS code completely disables the resizing tab close behavior:

Now updated: http://userstyles.org/styles/53190/firefox-6-disable-resizing-tab-close-behavior

.tabbrowser-tab:not([pinned]) {
  max-width: 250px !important;
  min-width: 100px !important;

}

.tabbrowser-tab:not([fadein]) {
 max-width: 1px !important;
 min-width: 1px !important;
 max-width: 1px;
 min-width: 1px;
}

*** You can change the code values of the top 2 preferences***
The ones already entered (250 and 100)px is the defaults(adjust to your own preference)... max-width is the default size for a tab, min-width is the smallest it'll go.. don't change anything code below tho...

To disable Open/Close tab animations also set about:config pref:
browser.tabs.animate; set to false.

Credit for above code goes to timmyfox https://bugzilla.mozilla.org/show_bug.cgi?id=574654#c25

Thanks to bogas04 for pointing me in the wright direction: https://bugzilla.mozilla.org/show_bug.cgi?id=465086#c272

Comment 16

8 years ago
Your solution seems to work, thanks a lot! It makes me somewhat mad that the solution to this is likely SO easy to change in the codebase, but has already gone through an entire major revision (firefox 6) without being fixed. Looks like I'll have to rely on this for now. :P

Comment 17

8 years ago
Add one more line, and remove the min-width setting.

.tabbrowser-tab:not([pinned]) {
  max-width: 250px !important;
}

.tabbrowser-tab:not([pinned]):not([fadein]) {
  max-width: 0.1px !important;
}

.closing-tabs-spacer {
  width: 0 !important;
}

Comment 18

8 years ago
(In reply to ithinc from comment #17)
> Add one more line, and remove the min-width setting.
> 
> .tabbrowser-tab:not([pinned]) {
>   max-width: 250px !important;
> }
> 
> .tabbrowser-tab:not([pinned]):not([fadein]) {
>   max-width: 0.1px !important;
> }
> 
> .closing-tabs-spacer {
>   width: 0 !important;
> }
Thanks ithinc for the CSS code help with also disabling it while in "Tab Overflow Mode".
Just updated: http://userstyles.org/styles/53190/firefox-6-disable-resizing-tab-close-behavior

Comment 19

8 years ago
(In reply to rob64rock from comment #18)
> (In reply to ithinc from comment #17)
> > Add one more line, and remove the min-width setting.
> > 
> > .tabbrowser-tab:not([pinned]) {
> >   max-width: 250px !important;
> > }
> > 
> > .tabbrowser-tab:not([pinned]):not([fadein]) {
> >   max-width: 0.1px !important;
> > }
> > 
> > .closing-tabs-spacer {
> >   width: 0 !important;
> > }
> Thanks ithinc for the CSS code help with also disabling it while in "Tab
> Overflow Mode".
> Just updated:
> http://userstyles.org/styles/53190/firefox-6-disable-resizing-tab-close-
> behavior

Ithinc code above broke open/close tab animations when using both 'min-width and max-width' in first line of his code above.

So, it's now updated: http://userstyles.org/styles/53190/firefox-6-disable-resizing-tab-close-behavior

  .tabbrowser-tab:not([pinned]) {
    max-width: 250px !important;
    min-width: 100px !important;
  }

  .tabbrowser-tab:not([fadein]) {
    max-width: 1px !important;
    min-width: 1px !important;
    max-width: 1px;
    min-width: 1px;
  }

  .closing-tabs-spacer {
    width: 0 !important;
  }

Now with style enabled, it disables the resizing tab close behavior(allowing tabs to snap back instantly) without disabling open/closing tab animations(if enabled) for those still wanting tab animations.

Still those who want to disable Open/Close tab animations can set about:config pref:
browser.tabs.animate; set to false.

Hopefully this will be my last post on this matter or Bug#, good luck to all that have enjoyed and found this CSS code useful.
:dao, would you like to mentor this bug? That might have good results, and get a person to work on it! :)
Flags: needinfo?(dao)

Comment 21

6 years ago
Could this bug be assigned to me? I'm have a course assignment where I need to contribute to an open source project, and this looks like a good starting point.
David, go ahead and take the bug if you'd like to give it a try!

Comment 23

6 years ago
Attachment #827077 - Flags: review?(ttaubert)
Thanks for the patch, David, but I think we don't actually want to fix this. We generally avoid adding hidden prefs for uncommon use cases - much better to use an add-on for this instead.

Let me know if you want some help finding another bug to work on :)
Status: NEW → RESOLVED
Last Resolved: 8 years ago6 years ago
Flags: needinfo?(dao)
Resolution: --- → WONTFIX
Attachment #827077 - Attachment is obsolete: true
Attachment #827077 - Flags: review?(ttaubert)
(Reporter)

Comment 25

6 years ago
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #24)
> Thanks for the patch, David, but I think we don't actually want to fix this.
> We generally avoid adding hidden prefs for uncommon use cases - much better
> to use an add-on for this instead.

Is it even possible for an add-on to control this at this level (with this kind of simplicity) as the patch offered? 

Also: The use case doesn't seem all that uncommon from what I picked up myself (in the original bug changing this behavior, in this bug, and there's a duplicate as well), but since it's more an annoyance than something breaking, people haven't been terribly vocal about it. Doesn't mean it's any less annoying and this far down the road I'd still like to see the behavior configurable, no matter how used I got to the new way it handles closed tab resizing. It'd save me a lot of mouse jerking. On a touch surface it's even worse to have to move the pointer without causing either a click or drag gesture, which I think is also something you should consider.

Comments above and partial workarounds discussed in this bug should indicate it's certainly enough of a niggle for people to spend effort on to try and make it work.
It's certainly possible for an addon to address this use case.
You need to log in before you can comment on or make changes to this bug.