Closed Bug 866302 Opened 11 years ago Closed 10 years ago

Handle 100+ tabs in counter

Categories

(Firefox for Android Graveyard :: Theme and Visual Design, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 36

People

(Reporter: aaronmt, Assigned: mhaigh)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached image Screenshot
I opened my 120 bookmarks and only saw '12'

At 100, it drops the the last digit and displays and arrow at the bottom.

Expected: 120
Actual: 12 + random arrow at bottom

(This is currently from an APK in bug 863828)
When over 99 tabs, show something other than a busted tab count icon.  I've implemented with an infinity ("∞") icon atm, but this could be anything really.  I didn't want to blatently rip off Chrome ":D" but can implement any two character string.

https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=a7384a5f2c15
Attachment #8500435 - Flags: feedback?(wjohnston)
Assignee: nobody → mhaigh
I wonder if the infinity symbol is universal across languages. Axel?
Flags: needinfo?(l10n)
I vote for:

    ಠ_ಠ

Which would require expanding the icon, but i think it'd be worth it :P
Comment on attachment 8500435 [details] [diff] [review]
866302 - Handle over 100 tabs in the tab icon

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

Neat!

::: mobile/android/base/toolbar/TabCounter.java
@@ +80,5 @@
>              return;
>          }
>  
> +        // don't animate if there are still over 99 tabs open
> +        if (mCount > 99 && count > 99) {

You should make this 99 a const. I'd probably move this check under the mCount == count) one, but I don't think it matters :) For some reason, the assignment inside here makes me nervous.

@@ +108,5 @@
>  
>          mCount = count;
>      }
>  
> +    private String getNumberOfTabsToDisplay(int count) {

I'd probably name this something like "formatForDisplay"

@@ +110,5 @@
>      }
>  
> +    private String getNumberOfTabsToDisplay(int count) {
> +        if (count > 99) {
> +            return "∞";

Just make this localizable with a note in the text probably. If not that, make it a const.
Attachment #8500435 - Flags: feedback?(wjohnston) → feedback+
infinity according to CLDR is mostly "∞".

Fun fact, the only non-∞ in cldr is གྲངས་མེད in dzonga.

Given that's even worse UI wise, and given that there's no boundary text to show or not, I suggest to just hard-code this.

UX-wise, I'm not sure if people actually understand the meaning of ∞.
What about making the text in a smaller font size? 

It might not has a good legibility. But it's also a sign for the users that they have way too many tabs and they need close a few. 

This is an edge case and it's not how we would like most of our users to use the product, so I don't think we have to come up with an absolute perfect solution to fix this.
Flags: needinfo?(l10n)
Looked at reducing font size but couldn't find an easy way to do this, so fixed up nits and kept the infinity sign.  My thinking is that it's such a rare occurance that few people will ever see it, it's also kinda cool imo.
Attachment #8500435 - Attachment is obsolete: true
Attachment #8506181 - Flags: review?(wjohnston)
Comment on attachment 8506181 [details] [diff] [review]
Handle 100+ tabs in counter

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

::: mobile/android/base/toolbar/TabCounter.java
@@ +36,5 @@
>      private final int mLayoutId;
>  
>      private int mCount;
> +    public static final int MAX_VISIBLE_TABS = 99;
> +    public static final String SO_MANY_TABS_OPEN = "∞";

I have this strange feeling people will complain that they don't technically have an infinite number of tabs open. How nerdy are our users? Maybe I'm just a tiny bit math-nerdy... :) Also I like this
Attachment #8506181 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/d78c76600b5c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
After opening 100 tabs, the "∞" symbol appears.
Device: Samsung S5 (Android 4.4)
Build: Firefox for Android 36.0a1 (2014-10-19)

It's a little bit strange, because after having the "∞" symbol, you have no idea how many tabs are opened.
Granted - but given how rarely this will happen I don't see it being too much of an issue.  In an ideal world we would make the icon bigger or text smaller to accommodate, but both of these are too difficult a problem to solve given the scope of the bug. I know this doesn't make it right, but it's also in line with the behaviour in Chrome, which displays a smiley emoticon ":D".
Blocks: 1122945
I don't quite get what you've been doing here:
A few people complain about the number of tabs not been fully displayed when you have 100+ and your answer is "just make the tab number disappear for an '∞'", I seriously doubt you understood what they asked for, ie more data about their number tabs in place of just no data.

(In reply to Martyn Haigh (:mhaigh) from comment #13)
> Granted - but given how rarely this will happen I don't see it being too
> much of an issue. 
But if this is an edge case why breaking the system for the few people that use it?
If you don't think people should have this many tabs, as it CAN be understood, it's ok so you don't do anything. Bur here you're considering the issue, and solve it by just destroying the functionality that was supposed to be improved.

The arrow or notch at the bottom wasn't ideal, of course displaying the whole number would be fantastic but if you want to save the trouble of doing this, just don't do anything.

I sincerely hope this changes could be reversed as I don't see how they help any heavy tab user, precisely who they should help.
The original behavior was that Firefox's UI broke. The current behavior is definetly an improvement over that.
No longer blocks: 1122945
Ok, I know better understand what you did here, you solve a bug ! But this bug was still a feature and your fix still prevent the user from knowing anything more about his number of tabs than "it's greater than 100".
May be the UI broke but it was still perfectly working, just not showing the whole number of tabs, was it still necessary to correct it ?

Why not fix this bug by simply coding the behaviour created by the bug, as you didn't want to create dedicated process to display the whole number of tabs ?
I suppose Firefox's UI is depending on fixed-size background images, and it isn't probably deemed worth it to *rewrite* this for such rare cases.
The reason we went with this approach is that, as Markus suggests, we are using fixed width background images and changing that or dynamically changing the font size felt like it would take too long.  

The patch above hasn't handed and as you can see there was a discussion around if this was the way we wanted to go.  Given that the patch is still in flight, it suggests that maybe we don't feel too comfortable with an infinity sign instead of actual meaningful data, but this bug isn't a high enough priority for us to spend a lot of time on it atm.
I am unclear by this statement. Are we accepting this change as is or are we going to revert to the somewhat broken UI?
tracking-fennec: --- → ?
Flags: needinfo?(mhaigh)
(In reply to Martyn Haigh (:mhaigh) from comment #19)

> The patch above hasn't handed and as you can see there was a discussion
> around if this was the way we wanted to go.  Given that the patch is still
> in flight, it suggests that maybe we don't feel too comfortable with an
> infinity sign instead of actual meaningful data, but this bug isn't a high
> enough priority for us to spend a lot of time on it atm.

The patch has landed (comment 10), unless I missed a backout. We are leaving this functionality in-place. We have no current plans to display the exact number of tabs >99.
Flags: needinfo?(mhaigh)
tracking-fennec: ? → ---
Oh sorry - I didn't think this one had landed and missed comment 10.  Apologies!
Restrict Comments: true
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.