Last Comment Bug 465076 - Yet another Ctrl+Tab / All Tabs design revision (pref'd off)
: Yet another Ctrl+Tab / All Tabs design revision (pref'd off)
Status: VERIFIED FIXED
: access, ue
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All All
: -- enhancement with 7 votes (vote)
: Firefox 3.6a1
Assigned To: Dão Gottwald [:dao]
:
Mentors:
https://wiki.mozilla.org/Firefox/Spri...
: 308492 468716 474265 (view as bug list)
Depends on: 505749 457997 469774 488043 500214 505789 513982
Blocks: 447580 458866 463201 463211 463213 463318 463329 463799 463822 463969 464045 464122 464578 464721 468600 469768 470970 479590 482065 487826 487830 487835 487836 496060 498272 502460 503382 503532
  Show dependency treegraph
 
Reported: 2008-11-15 05:20 PST by Dão Gottwald [:dao]
Modified: 2013-02-11 07:03 PST (History)
58 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v1 (70.22 KB, patch)
2008-11-15 08:01 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
screenshot of v1 all tabs (105.03 KB, image/png)
2008-11-15 11:35 PST, Ed Lee :Mardak
no flags Details
experimental patch v2 (71.54 KB, patch)
2008-11-15 13:19 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v2 (72.22 KB, patch)
2008-11-15 18:01 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v2.1 (71.77 KB, patch)
2008-11-16 04:08 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v2.2 (71.99 KB, patch)
2008-11-16 13:18 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3 (76.87 KB, patch)
2008-11-17 05:43 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
screenshot of 1f0036d0003 (196.08 KB, image/png)
2008-11-17 12:25 PST, Ed Lee :Mardak
no flags Details
patch v3.1 (77.78 KB, patch)
2008-11-18 00:36 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3.2 (78.25 KB, patch)
2008-11-18 18:44 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3.3 (78.00 KB, patch)
2008-11-19 10:09 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
misalignment of tab preview (all-tabs panel) (2.79 KB, image/png)
2008-11-19 13:29 PST, (mostly gone) XtC4UaLL [:xtc4uall]
no flags Details
patch 3.4 (78.15 KB, patch)
2008-11-20 01:09 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
Selection box for all-tabs on Vista (11.17 KB, image/jpeg)
2008-11-20 03:37 PST, Henrik Skupin (:whimboo)
no flags Details
Artifacts on Vista (19.72 KB, image/jpeg)
2008-11-20 03:49 PST, Henrik Skupin (:whimboo)
no flags Details
ctrl-(shift)-tab for all-tabs (against v3.4) (5.41 KB, patch)
2008-11-20 14:51 PST, Ed Lee :Mardak
no flags Details | Diff | Splinter Review
patch v3.5 (78.16 KB, patch)
2008-11-20 17:35 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3.5 (78.46 KB, patch)
2008-11-20 17:37 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3.6 (79.83 KB, patch)
2008-11-24 11:44 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3.7 (79.92 KB, patch)
2008-11-24 13:09 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3.8 (79.98 KB, patch)
2008-12-02 04:59 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3.9 (82.26 KB, patch)
2008-12-06 11:53 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v3.10 (78.74 KB, patch)
2008-12-17 05:50 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
updated to trunk (78.33 KB, patch)
2009-01-18 05:08 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
favicon tweak (white bg + black .5 outline; white + .1; white; no bg) (497.35 KB, image/jpeg)
2009-01-29 17:52 PST, Ed Lee :Mardak
no flags Details
patch (with favicons) (80.01 KB, patch)
2009-01-29 18:11 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v4 (with favicons) (80.33 KB, patch)
2009-01-30 07:34 PST, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v4.1 (80.99 KB, patch)
2009-03-15 09:02 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v4.1 (80.91 KB, patch)
2009-04-19 10:49 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v4.2 (82.10 KB, patch)
2009-07-09 14:54 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v5 (87.57 KB, patch)
2009-07-10 12:02 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v5.1 (87.85 KB, patch)
2009-07-10 15:26 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v5.2 (89.32 KB, patch)
2009-07-11 05:49 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v5.2 (89.38 KB, patch)
2009-07-12 14:23 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v5.3 (89.36 KB, patch)
2009-07-15 23:06 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v5.4 (92.21 KB, patch)
2009-07-17 17:16 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v5.4 (92.51 KB, patch)
2009-07-17 17:25 PDT, Dão Gottwald [:dao]
no flags Details | Diff | Splinter Review
patch v5.5 (92.69 KB, patch)
2009-07-20 11:34 PDT, Dão Gottwald [:dao]
enndeakin: review+
Details | Diff | Splinter Review

Description Dão Gottwald [:dao] 2008-11-15 05:20:46 PST

    
Comment 1 Dão Gottwald [:dao] 2008-11-15 08:01:50 PST
Created attachment 348340 [details] [diff] [review]
patch v1
Comment 2 Ed Lee :Mardak 2008-11-15 11:19:13 PST
Copying over beltzner's original pastebin mockup as that won't last forever.

quickswitch UI (invoked by ctrl-tab)

 .--------------------------------------------.
 |  ####  ####  ####  ####  ####  ####  ####  |
 |  ####  ####  ####  ####  ####  ####  ####  |  <-- 7 MRU tabs
 |  bar   foo   baz   baf   bop   bim   pow   |  <-- long, narrow strip
 |                                            |
 |             ( Show all N tabs )            |  <-- button is in tab order
 '--------------------------------------------'

 while holding ctrl,
    tab     key moves through previews
    <- / -> keys move through previews
    w       key closes highlighted tab
    a, f    key transforms UI to tabfind
    
 mouse hover highlights target
 selecting a tab preview switches tabs
 selecting the "Show All Tabs" button transforms UI to tabfind

tabfind UI (invoked by ctrl-tab,a / ctrl-tab,f / ctrl-tab,show all tabs / all-tabs button / view -> all tabs) 

 .--------------------------------------------.
 |    Filter [                    ]   (X)     |
 |                                            |
 |  /---  ####  ####  ####  ####  ####  ####  |
 |  \---  ####  ####  ####  ####  ####  ####  |  <-- all tabs in tabstrip order
 |  prev   bar   baz   bar   bop   bim   pow  |  <-- page entries if needed
 |                                            |  <-- overlays browser window
 |  ####  ####  ####  ####  ####  ####  ####  |
 |  ####  ####  ####  ####  ####  ####  ####  |
 |  foo   bar   baz   bar   bop   bim   pow   |
 |                                            |
 |  ####  ####  ####  ####  ####  ####  ___\  |
 |  ####  ####  ####  ####  ####  ####  ---/  |
 |  foo   bar   baz   bar   bop   bim   next  |
 |                                            |
 '--------------------------------------------'

 don't need to hold down control
 focus starts in the "Filter" field
 down key moves into the preview field, at which point arrow keys move around
 mouse hover highlights preview
 when hovering over a preview, we should overlay a (x) closebox
Comment 3 Ed Lee :Mardak 2008-11-15 11:35:48 PST
Created attachment 348359 [details]
screenshot of v1 all tabs

Boriss: Is the tab title text supposed to only show up on hover? Where should the close button be placed?
Comment 4 Dão Gottwald [:dao] 2008-11-15 12:38:15 PST
Hold on... I'm still working on the styling.
Comment 5 Dão Gottwald [:dao] 2008-11-15 13:19:57 PST
Created attachment 348370 [details] [diff] [review]
experimental patch v2

Ed, can you please give this a try? Could be that it totally breaks Ctrl+Tab on OS X.
Comment 6 Dão Gottwald [:dao] 2008-11-15 18:01:09 PST
Created attachment 348390 [details] [diff] [review]
patch v2

still need to figure out if the CTRLTAB_BROKEN_FOCUS stuff is needed
Comment 7 Dão Gottwald [:dao] 2008-11-16 04:08:45 PST
Created attachment 348424 [details] [diff] [review]
patch v2.1

more cleanup / polish

tryserver builds:

https://build.mozilla.org/tryserver-builds/2008-11-16_02:24-dgottwald@mozilla.com-try-85be9f8c30c/
Comment 9 Henrik Skupin (:whimboo) 2008-11-16 14:43:07 PST
Ok, I gave the latest tryserver build a shot. Here my comments for the OS X version:

* The preview titles are presented differently for ctrl-tab and all-tabs. For the latter one there is an additional line between the preview and the description. Personally I like the all-tabs version which doesn't glue the text at the bottom of the preview.

* IMO it would look better if the selection focus ring wouldn't include the preview description. Instead only the preview should be surrounded which will make the text better readable. The applies more for all-tabs because the current version doesn't have a good contrast difference between the text color and the background color. Probably you forgot to set a black text color like for ctrl-tab.

* The close button for previews only appear for selections you make with the mouse. There is no visual clue that tabs can be closed when using the keyboard to navigate through the list of previews.

* The close buttons are misplaced in the all-tabs panel when the previews are scaled down so all will fit on one page. 

* Having two tabs open and opening all-tabs lets you switch between the tabs in the background by hitting the ctrl+tab keyboard shortcut. I don't think that we want to have this behavior as other existing bugs already report.

* Having the Ctrl-Tab and All-Tabs panel open you can open the find bar on OS X by hitting Cmd+F which switches the focus back to the browser window.

* Having the All-Tabs panel open you cannot use Ctrl+F to focus the search field. The shortcut doesn't seems to be assigned anymore.

* When comparing the sizes of the all-tabs elements the close button in the top right corner is too much in my opinion. There should be a smaller one. Similar to the close button for the tab previews.

* I'm still able to focus/select more then one tab when using the keyboard and mouse together. IMO this behavior is still irritating and is better solved for the native application switcher where only one application is focused/selected. IMO we should follow this way. This is covered by bug 463318.

* Having around 50 tabs open will still give you a noticeable lag (~0.75s) when navigating through the list. This is really annoying and makes it impossible to navigate through the list. 

* The initial painting shows a white background. This is still covered by bug 463303 

* Only showing at maximum 7 tabs for ctrl-tab makes it hard to get to a special tab. You have to open the all-tabs panel to select it. But while having your fingers still on ctrl+tab let you immediately return to the ctrl-tab panel. I believe that will frustrate users.

* Page Up/Down and Home/End would be some nice shortcuts to jump directly to the other side of the row/column.

* If you have open a huge amount of tabs (e.g. 75) and entering a search term which lets the panel recalculate the preview sizes the search bar moves

* Pressing Ctrl+Tab while the All-Tabs panel is open for a huge amount of tabs the Ctrl-Tab panel isn't shown. Instead we can see the repainting bug again. The whole underlying UI isn't refreshed. This only happens when you click onto the empty background before hitting Ctrl+Tab.

* Having around 75 tabs open and selecting one of the previews in the last column lets the panel resize while hovering the preview which also let the search textfield move to left/right.

* Entering some letters inside the All-Tabs panel should automatically put this letter into the search textbox. It will enhance the usability a lot IMO.

* Going out of the search textbox moving around with the arrow keys and pressing some letters let the panel not react on ESC. You have to close it with the mouse or go back to the search textbox to enable it again.
Comment 10 Dão Gottwald [:dao] 2008-11-17 05:43:56 PST
Created attachment 348548 [details] [diff] [review]
patch v3

- View > Show All Tabs menu item added
- not using box-shadow in the All Tabs panel anymore (perf)
- fixed the close button position on Mac
- closing the All Tabs panel when there's a browser command executed (such as Accel+L)
Comment 12 Dão Gottwald [:dao] 2008-11-17 12:12:35 PST
Here's a tryserver build with the CTRLTAB_BROKEN_FOCUS stuff (see patch) removed:

https://build.mozilla.org/tryserver-builds/2008-11-17_10:55-dgottwald@mozilla.com-try-1f0036d0003/

Would be nice if somebody could tell me if this breaks Ctrl+Tab on OS X.
Comment 13 Ed Lee :Mardak 2008-11-17 12:25:44 PST
Created attachment 348616 [details]
screenshot of 1f0036d0003

Here's ctrl-tab (mouse over 4th tab) and all-tab views.

Ctrl-tab doesn't always work. Sometimes it doesn't select the tab until I press and release ctrl a second time.
Comment 14 Dão Gottwald [:dao] 2008-11-17 12:28:17 PST
(In reply to comment #13)
> Created an attachment (id=348616) [details]
> screenshot of 1f0036d0003
> 
> Here's ctrl-tab (mouse over 4th tab) and all-tab views.
> 
> Ctrl-tab doesn't always work. Sometimes it doesn't select the tab until I press
> and release ctrl a second time.

Ok, Thanks. So that's still bug 463802, and the CTRLTAB_BROKEN_FOCUS stuff needs to stay.
Comment 15 Dão Gottwald [:dao] 2008-11-17 12:32:15 PST
(In reply to comment #13)
> Created an attachment (id=348616) [details]
> screenshot of 1f0036d0003

Is it only me or does font-weight:bold make the Ctrl+Tab labels too heavy?
Comment 16 Henrik Skupin (:whimboo) 2008-11-17 14:33:16 PST
(In reply to comment #12)
> https://build.mozilla.org/tryserver-builds/2008-11-17_10:55-dgottwald@mozilla.com-try-1f0036d0003/
> 
> Would be nice if somebody could tell me if this breaks Ctrl+Tab on OS X.

That breaks Ctrl-Tab on Vista for me. Most of the time the ctrl-tab panel closes immediately after it was opened. I have to focus a textbox so it stays open. 

(In reply to comment #15)
> Is it only me or does font-weight:bold make the Ctrl+Tab labels too heavy?

As what I said on bug 458866, fonts are looking bad for me at all on Vista.

(In reply to comment #10)
> - View > Show All Tabs menu item added

Bah. Please don't use Shift-Ctrl-Tab as shortcut. Users wont be able to navigate backwards trough the list of tabs as initial action anymore. But beside, will we also have a shortcut on OS X?

> - not using box-shadow in the All Tabs panel anymore (perf)

That's much better now. There is no lag noticeable anymore. Only the white background during initialization is visible. Otherwise it looks good. 

> - fixed the close button position on Mac

Not really. Now it overlays the top right corner of the tabs preview which makes it some kind cut-off at the half of the x.

> - closing the All Tabs panel when there's a browser command executed (such as
> Accel+L)

Ctrl+Tab still switches between two opened tabs in the background.

More comments soonish.
Comment 17 Dão Gottwald [:dao] 2008-11-17 14:44:18 PST
(In reply to comment #16)
> That breaks Ctrl-Tab on Vista for me. Most of the time the ctrl-tab panel
> closes immediately after it was opened. I have to focus a textbox so it stays
> open.

This sounds like bug 457997 comment 0. If you can reproduce this with the build in comment 11, that bug should probably be reopened.

> Bah. Please don't use Shift-Ctrl-Tab as shortcut. Users wont be able to
> navigate backwards trough the list of tabs as initial action anymore. But
> beside, will we also have a shortcut on OS X?

Control+Shift+Tab as well?

> That's much better now. There is no lag noticeable anymore. Only the white
> background during initialization is visible.

I don't see that white background.

> > - fixed the close button position on Mac
> 
> Not really. Now it overlays the top right corner of the tabs preview which
> makes it some kind cut-off at the half of the x.

It's aligned with the clickable area that's also highlighted.
Comment 18 Henrik Skupin (:whimboo) 2008-11-17 14:48:48 PST
Further tries on OS X and Vista follows now:

OS X
====
* If you remove an external monitor to only use the internal display the previews are clued together on my OS X box. There is no margin in-between them. It looks like a big white stripe for me for only blank tabs.

* When will you style up the Ctrl-Tab panel so it has the same design as All-Tabs?

* There is no padding anymore between the panels border and the selection box.

* The close button is only positioned correctly for non-resized previews. As soon as they have to be shrinked the close button is misplaced.

Vista
=====

* The selection box is nearly unvisible. Looks like you are using too much opacity.

* It's hard to focus the close button for each tab preview. Most of the times I'm hovering over them they are hidden and I'm unable to close the tab. Instead the All-Tabs panel gets closed.

* The right side of the All-Tabs panel seems somehow cut-off. Means the big X is half-visible and all previews on that side have a smaller selection box on the right side.
Comment 19 Henrik Skupin (:whimboo) 2008-11-17 14:58:55 PST
(In reply to comment #17)
> > That breaks Ctrl-Tab on Vista for me. Most of the time the ctrl-tab panel
> > closes immediately after it was opened. I have to focus a textbox so it stays
> > open.
> 
> This sounds like bug 457997 comment 0. If you can reproduce this with the build
> in comment 11, that bug should probably be reopened.

Probably. I'm not sure if it's the identical problem. Now its even not possible over textboxes. Please decide yourself.

> > Bah. Please don't use Shift-Ctrl-Tab as shortcut. Users wont be able to
> > navigate backwards trough the list of tabs as initial action anymore. But
> > beside, will we also have a shortcut on OS X?
> 
> Control+Shift+Tab as well?

As I said, this shortcut goes against an already known shortcut to backward navigate through the tab list. It shouldn't be used at all IMO.

> > That's much better now. There is no lag noticeable anymore. Only the white
> > background during initialization is visible.
> 
> I don't see that white background.

Please open about 100 tabs and click on the All-Tabs button. But anyway we should move this out to the other bug I've filed.

> > Not really. Now it overlays the top right corner of the tabs preview which
> > makes it some kind cut-off at the half of the x.
> 
> It's aligned with the clickable area that's also highlighted.

Please open enough tabs so the previews gets shrunken. You will notice that the close button moves over the tabs preview.
Comment 20 Marcia Knous [:marcia - use ni] 2008-11-17 15:04:35 PST
Using the build in Comment 11 on OSX, I noticed that Ctrl-Tab preview extends slightly outside the border of the browser windows when the window is normal size, but if you resize the window things can look a little funky. Not saying we have to do anything about it, but just pointing it out.
Comment 21 Dão Gottwald [:dao] 2008-11-17 15:10:47 PST
(In reply to comment #18)
> * If you remove an external monitor to only use the internal display the
> previews are clued together on my OS X box. There is no margin in-between them.
> It looks like a big white stripe for me for only blank tabs.

Screen resolution changes aren't tracked, regardless of the given patch.

> * When will you style up the Ctrl-Tab panel so it has the same design as
> All-Tabs?

I don't intend to use exactly the same styling. The interaction is different, there's no tab close button in the Ctrl+Tab previews and the panel is less vulnerable to performance issues (i.e. box-shadow can still be used) due to showing less previews.

> * The selection box is nearly unvisible. Looks like you are using too much
> opacity.

Could you please attach a screenshot?

> * It's hard to focus the close button for each tab preview. Most of the times
> I'm hovering over them they are hidden and I'm unable to close the tab. Instead
> the All-Tabs panel gets closed.

Strange, I don't see that on XP.

> * The right side of the All-Tabs panel seems somehow cut-off. Means the big X
> is half-visible and all previews on that side have a smaller selection box on
> the right side.

Sounds like another aero glass bug.
Comment 22 Dão Gottwald [:dao] 2008-11-17 15:20:17 PST
(In reply to comment #19)
> Probably. I'm not sure if it's the identical problem. Now its even not possible
> over textboxes. Please decide yourself.

Please comment in the bug. I don't have Vista.

> As I said, this shortcut goes against an already known shortcut to backward
> navigate through the tab list. It shouldn't be used at all IMO.

It's a useless shortcut for an MRU ordered list.

> > It's aligned with the clickable area that's also highlighted.
> 
> Please open enough tabs so the previews gets shrunken. You will notice that the
> close button moves over the tabs preview.

Right. The clickable area gets smaller, but the close button stays the same size. I don't see a problem with that.
Comment 23 Dão Gottwald [:dao] 2008-11-18 00:36:03 PST
Created attachment 348725 [details] [diff] [review]
patch v3.1

this disables aero glass because
Comment 24 Dão Gottwald [:dao] 2008-11-18 00:36:23 PST
(In reply to comment #23)
> Created an attachment (id=348725) [details]
> patch v3.1
> 
> this disables aero glass because

because of bug 457997
Comment 25 Dão Gottwald [:dao] 2008-11-18 01:28:07 PST
(In reply to comment #23)
> Created an attachment (id=348725) [details]
> patch v3.1

https://build.mozilla.org/tryserver-builds/2008-11-18_00:39-dgottwald@mozilla.com-try-1d69199c3af/
Comment 26 Dão Gottwald [:dao] 2008-11-18 18:44:46 PST
Created attachment 348891 [details] [diff] [review]
patch v3.2

changed the previews' hover feedback to stay when moving the mouse over the close button

https://build.mozilla.org/tryserver-builds/2008-11-18_05:29-dgottwald@mozilla.com-try-e817685c67f/
Comment 27 Nochum Sossonko [:Natch] 2008-11-19 07:59:42 PST
(In reply to comment #26)
> Created an attachment (id=348891) [details]
> patch v3.2
> 
> changed the previews' hover feedback to stay when moving the mouse over the
> close button
> 
> https://build.mozilla.org/tryserver-builds/2008-11-18_05:29-dgottwald@mozilla.com-try-e817685c67f/
Hmm.. On Vista the all-tabs button on the tab-strip isn't working, In the error console I see:
Error: this._getBox(this.tabCloseButton._tab) is null
Source File: chrome://browser/content/browser.js
Line: 7745

STR:
1) Open a few tabs.
2) Ctrl-Tab through them.
3) Hit "Show All Tabs" button on the bottom
4) Close a background tab, then close the all-tabs with the X
5) Hit the all-tabs button on the tab-strip. Walla
Comment 28 Dão Gottwald [:dao] 2008-11-19 10:09:49 PST
Created attachment 348996 [details] [diff] [review]
patch v3.3

mouseover and focus highlight unified in the ctrl+tab panel
Comment 29 Dão Gottwald [:dao] 2008-11-19 10:10:08 PST
(In reply to comment #28)
> Created an attachment (id=348996) [details]
> patch v3.3
> 
> mouseover and focus highlight unified in the ctrl+tab panel

https://build.mozilla.org/tryserver-builds/2008-11-19_07:32-dgottwald@mozilla.com-try-18b3115cec8/
Comment 30 Dão Gottwald [:dao] 2008-11-19 10:11:32 PST
(In reply to comment #27)
> Hmm.. On Vista the all-tabs button on the tab-strip isn't working, In the error
> console I see:
> Error: this._getBox(this.tabCloseButton._tab) is null
> Source File: chrome://browser/content/browser.js
> Line: 7745
> 
> STR:
> 1) Open a few tabs.
> 2) Ctrl-Tab through them.
> 3) Hit "Show All Tabs" button on the bottom
> 4) Close a background tab, then close the all-tabs with the X
> 5) Hit the all-tabs button on the tab-strip. Walla

Thanks for reporting. Can you try this again with the latest tryserver build?
Comment 31 Nochum Sossonko [:Natch] 2008-11-19 10:23:23 PST
(In reply to comment #30)
No, it doesn't happen anymore. However, the Ctrl-tab background is very light and easy to miss (I couldn't find it at first). Also the "Show All Tabs" button is part of the tab-order, i.e. tabbing focuses the button as well, is this intentional? if so maybe you should rethink that as it's not part of regular Ctrl-tabbing under any environment (ie windows Alt-tab). I would expect Ctrl-tab to just loop through the tabs themselves.
On a side note... I really hope this feature sticks in 3.1, it's really awesome, thanks!
Comment 32 Dão Gottwald [:dao] 2008-11-19 12:33:52 PST
(In reply to comment #31)
> Also the "Show All Tabs" button
> is part of the tab-order, i.e. tabbing focuses the button as well, is this
> intentional?

Yes, that's by design -- see comment 2.
Comment 33 (mostly gone) XtC4UaLL [:xtc4uall] 2008-11-19 13:29:00 PST
Created attachment 349033 [details]
misalignment of tab preview (all-tabs panel)

at least with windows XP (classic) there is a misalignment with an uneven amount of tabs in the all-tabs panel. intended?
Comment 34 Dão Gottwald [:dao] 2008-11-20 00:46:52 PST
(In reply to comment #33)
> Created an attachment (id=349033) [details]
> misalignment of tab preview (all-tabs panel)
> 
> at least with windows XP (classic) there is a misalignment with an uneven
> amount of tabs in the all-tabs panel. intended?

Not directly intended -- it's the close button on the right that pushes the search field to the left.
Comment 35 Dão Gottwald [:dao] 2008-11-20 01:09:47 PST
Created attachment 349148 [details] [diff] [review]
patch 3.4

comment 33 addressed
Comment 36 Henrik Skupin (:whimboo) 2008-11-20 03:37:43 PST
Created attachment 349166 [details]
Selection box for all-tabs on Vista

The selection box is nearly unvisible on Vista.
Comment 37 Henrik Skupin (:whimboo) 2008-11-20 03:42:19 PST
Comment on attachment 349166 [details]
Selection box for all-tabs on Vista

Sorry, that wasn't with the latest tryserver build. Now with the darker background there is a better distinction.
Comment 38 Henrik Skupin (:whimboo) 2008-11-20 03:48:04 PST
(In reply to comment #21)
> > * When will you style up the Ctrl-Tab panel so it has the same design as
> > All-Tabs?
> 
> I don't intend to use exactly the same styling. The interaction is different,
> there's no tab close button in the Ctrl+Tab previews and the panel is less
> vulnerable to performance issues (i.e. box-shadow can still be used) due to
> showing less previews.

I only meant the selection box effect. It looks much better for the all-tabs panel.

> > * It's hard to focus the close button for each tab preview. Most of the times
> > I'm hovering over them they are hidden and I'm unable to close the tab. Instead
> > the All-Tabs panel gets closed.
> 
> Strange, I don't see that on XP.

Ok, that has been solved. But if you click to fast on these close buttons the all-tabs panel is closed and leaves ugly artifacts behind. Open around 70 tabs and position the mouse on top of a close button. Now just click with a fast rate. I'll attach a screenshot.

> > * The right side of the All-Tabs panel seems somehow cut-off. Means the big X
> > is half-visible and all previews on that side have a smaller selection box on
> > the right side.
> 
> Sounds like another aero glass bug.

Has been solved.
Comment 39 Henrik Skupin (:whimboo) 2008-11-20 03:49:20 PST
Created attachment 349168 [details]
Artifacts on Vista

Closing tabs too fast by clicking the small close icon closes the all-panels tab and leaves behind ugly artifacts.
Comment 40 Henrik Skupin (:whimboo) 2008-11-20 03:54:13 PST
(In reply to comment #22)
> > As I said, this shortcut goes against an already known shortcut to backward
> > navigate through the tab list. It shouldn't be used at all IMO.
> 
> It's a useless shortcut for an MRU ordered list.

Not everyone will have a MRU list. If you turn it off users don't expect to see the all-tabs panel but switching backwards through the list. These shortcut has been in use forever. So please don't change it now. I believe a lot of ppl will agree.

> > > It's aligned with the clickable area that's also highlighted.
> > 
> > Please open enough tabs so the previews gets shrunken. You will notice that the
> > close button moves over the tabs preview.
> 
> Right. The clickable area gets smaller, but the close button stays the same
> size. I don't see a problem with that.

Yeah, it stays at the same size but it moves over the tabs preview. Shouldn't it always be displayed on the right side of the preview without this overlap?
Comment 41 Ed Lee :Mardak 2008-11-20 10:03:52 PST
Some version I tried, the all-tabs view only showed the tab's title on hover. Is that intentional/required?

Also, couldn't the close tab button be placed in the top left corner like the mockup:

https://wiki.mozilla.org/images/9/97/Alltabsview1.png
Comment 42 Ed Lee :Mardak 2008-11-20 12:12:09 PST
Dao, did you mean to also make all-tabs handle keyboard/mouse focus on hover?

Is all-tabs supposed to move the selection when you press ctrl-(shift)-tab? (Right now, pressing tab/shift tab will move focus)

For ctrl-shift-tab by itself without anything open, we could open up the all-tabs view with the current tab selected.
Comment 43 Jennifer Morrow [:Boriss] (UX) 2008-11-20 12:15:05 PST
(In reply to comment #42)
> Dao, did you mean to also make all-tabs handle keyboard/mouse focus on hover?
> 
> Is all-tabs supposed to move the selection when you press ctrl-(shift)-tab?
> (Right now, pressing tab/shift tab will move focus)
> 
> For ctrl-shift-tab by itself without anything open, we could open up the
> all-tabs view with the current tab selected.

All-tabs is persistant, meaning it isn't dismissed by releasing keys.  So, pressing tab or the arrow keys or mousing over should shift the focus.
Comment 44 Ed Lee :Mardak 2008-11-20 12:28:42 PST
Well, on os x, hovering an item will give it a hover effect and the close button, but the "really focused" tab still has its focused styling.

Additionally, pressing ctrl-tab inside all-tab causes ctrl-tab to show up and close all-tab. Pressing ctrl-shift-tab would probably just reopen the all-tabs view instead of shifting focus to the previous tab preview.

And "accel" on os x is cmd and not control.
Comment 45 Dão Gottwald [:dao] 2008-11-20 14:15:02 PST
(In reply to comment #39)
> Created an attachment (id=349168) [details]
> Artifacts on Vista
> 
> Closing tabs too fast by clicking the small close icon closes the all-panels
> tab and leaves behind ugly artifacts.

See bug 463574.

> Not everyone will have a MRU list. If you turn it off users don't expect to see
> the all-tabs panel but switching backwards through the list.

The right way to disable this is browser.ctrlTab.previews

(In reply to comment #41)
> Some version I tried, the all-tabs view only showed the tab's title on hover.
> Is that intentional/required?

That was the very first patch in this bug, right? That was a theming issue on Mac and unintentional.

> Also, couldn't the close tab button be placed in the top left corner like the
> mockup:
> 
> https://wiki.mozilla.org/images/9/97/Alltabsview1.png

Sure it could. On Windows and Linux though, the correct side for the close button is the logical end.
Comment 46 Ed Lee :Mardak 2008-11-20 14:51:57 PST
Created attachment 349291 [details] [diff] [review]
ctrl-(shift)-tab for all-tabs (against v3.4)

Here's a quick patch against v3.4 to make ctrl-shift-tab actually open all-tabs on OS X as well as allow the user to keep holding ctrl while pressing tab/shift-tab to move the selection in the all-tabs view. Right now pressing ctrl-shift-tab will focus the current tab and pressing tab will move it to the very next (in tab order) or shift-tab to previous (in tab order) unless it runs off the list and goes to the search box.
Comment 47 Dão Gottwald [:dao] 2008-11-20 14:57:31 PST
(In reply to comment #46)
> allow the user to keep holding ctrl while pressing
> tab/shift-tab to move the selection in the all-tabs view.

According to beltzner, ctrl+shift+tab should focus the search field just like pressing the button or using the menu item.
Comment 48 Dão Gottwald [:dao] 2008-11-20 14:58:20 PST
(In reply to comment #44)
> And "accel" on os x is cmd and not control.

Oops.
Comment 49 Dão Gottwald [:dao] 2008-11-20 17:35:39 PST
Created attachment 349326 [details] [diff] [review]
patch v3.5

s/accel/control/

close button position inverted for Mac and/or rtl
Comment 50 Dão Gottwald [:dao] 2008-11-20 17:37:18 PST
Created attachment 349327 [details] [diff] [review]
patch v3.5
Comment 51 Dão Gottwald [:dao] 2008-11-20 17:41:22 PST
(In reply to comment #42)
> Dao, did you mean to also make all-tabs handle keyboard/mouse focus on hover?

No... I'm pretty sure we don't want to steal the the search field's focus when moving the mouse.
Comment 52 Dão Gottwald [:dao] 2008-11-21 02:10:08 PST
(In reply to comment #49)
> Created an attachment (id=349326) [details]
> patch v3.5
> 
> s/accel/control/
> 
> close button position inverted for Mac and/or rtl

https://build.mozilla.org/tryserver-builds/2008-11-20_17:46-dgottwald@mozilla.com-try-d2241a45492/
Comment 53 Henrik Skupin (:whimboo) 2008-11-21 02:19:52 PST
(In reply to comment #45)
> > Also, couldn't the close tab button be placed in the top left corner like the
> > mockup:
> > 
> > https://wiki.mozilla.org/images/9/97/Alltabsview1.png
> 
> Sure it could. On Windows and Linux though, the correct side for the close
> button is the logical end.

Just to be curious, but do we have mockups also available for other OS as OS X? Will they all look the same way? Lately there were a lot of changes to colors, backgrounds and so on. Wouldn't it make more sense to have requirements set before doing all the design revision work? It's even hard to track things like the "selection box is nearly invisible" when the design changes even between the tryserver builds which were given on this bug.

Alex and Jennifer, do I miss the link or is there even nothing right now?
Comment 54 Dão Gottwald [:dao] 2008-11-21 02:23:26 PST
(In reply to comment #53)
> Wouldn't it make more sense to have requirements set
> before doing all the design revision work?

This bug is first and foremost about the interaction, not the styling.
Comment 55 Henrik Skupin (:whimboo) 2008-11-21 03:22:19 PST
Mmh, so what shall the summary tell me in detail? Looks like a bad wording.
Comment 56 Alex Faaborg [:faaborg] (Firefox UX) 2008-11-21 17:03:19 PST
>Just to be curious, but do we have mockups also available for other OS as OS X?
>Will they all look the same way?

>Alex and Jennifer, do I miss the link or is there even nothing right now?

The design should be platform specific, Boriss is handling the visual design on this one so she can link to where those mockups or tracking bugs are (I really haven't been following any of this too closely).
Comment 57 Scott Field 2008-11-21 20:39:22 PST
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1b2pre) Gecko/20081120 Minefield/3.1b2pre
Mac OS X 10.4.11
clean profile

show all tabs has stopped working in the 11/20 nightly. Was working int the 11/19 nightly
Comment 58 Thomas Stache 2008-11-22 03:36:16 PST
(In reply to comment #57)
> show all tabs has stopped working in the 11/20 nightly. Was working int the
> 11/19 nightly

Bug 465843, backed out for beta release.
Comment 59 Dão Gottwald [:dao] 2008-11-24 11:44:58 PST
Created attachment 349799 [details] [diff] [review]
patch v3.6

some minor visual adjustments

https://build.mozilla.org/tryserver-builds/2008-11-24_05:41-dgottwald@mozilla.com-try-37951882e7b/
Comment 60 Nochum Sossonko [:Natch] 2008-11-24 12:23:31 PST
The [x] in the All-Tab panel with only one tab closes the whole window (and possibly Firefox, if that's the only one opened), is this intentional? IMHO, if the [x] on the tab-strip itself is removed in a one tab situation, the same should apply to All-Tabs. Also, but this is more a UI decision, what does ctrl-shift-tab have to do with All-Tabs, everywhere else shift is used to reverse the effect of the command (even now ctrl-shift-tab just reverses the order of tab switching), at least on Windows. Sounds a little unintuitive, why can't another shortcut be used?
Comment 61 Dão Gottwald [:dao] 2008-11-24 13:09:14 PST
Created attachment 349812 [details] [diff] [review]
patch v3.7

(In reply to comment #60)
> IMHO, if
> the [x] on the tab-strip itself is removed in a one tab situation, the same
> should apply to All-Tabs.

Thanks, fixed.
Comment 63 John 2008-12-02 16:53:53 PST
I don't think an OS skinned command button on a translucent tab strip mixes well
Comment 64 Henrik Skupin (:whimboo) 2008-12-03 14:41:33 PST
Dao, it would be great if you could always give a comment about things which have changed in the new version. That saves us from download and test if only minor issues were fixed.
Comment 65 Dão Gottwald [:dao] 2008-12-03 16:01:41 PST
(In reply to comment #64)
> That saves us from download and test if only minor issues were fixed.

You can assume that it's a minor change if the version bump is minor and no comment was made.

Those who are curious should try bugzilla's interdiff, although it doesn't always work and distinguishing actual changes from interdiff noise can be tricky.
Comment 67 Dão Gottwald [:dao] 2008-12-10 08:13:37 PST
*** Bug 468716 has been marked as a duplicate of this bug. ***
Comment 68 Dão Gottwald [:dao] 2008-12-12 04:47:32 PST
Here's a tryserver build with the patch in bug 463802:

https://build.mozilla.org/tryserver-builds/2008-12-12_01:34-dgottwald@mozilla.com-try-b3126c3c775/dgottwald@mozilla.com-try-b3126c3c775-firefox-try-mac.dmg

Can somebody please test the Ctrl+Tab shortcut with this on OS X?
(Note that the build contains the fix for bug 430332, which caused crashes and got backed out since then, but for a brief test run this should be ok.)
Comment 69 Ed Lee :Mardak 2008-12-12 09:33:18 PST
Ctrl-Tab seems to be working when switching forwards/backwards on OS X. I'm assuming you took out the BROKENFOCUS stuff?

A separate issue is when you go into all tabs mode, how are you supposed to select the tab? Pressing enter doesn't work, but space seems to work.

But some reason it was natural for me to press ctrl to try selecting the tab. Probably because I let go of ctrl to switch into all-tabs mode, so pressing+letting go of ctrl a second time should have made it select the currently focused tab.

Additionally, when I was looking at the bug for showing the target of a submit button, I noticed the old tab listing would show the url of the tab with setOverLink:
http://hg.mozilla.org/mozilla-central/rev/c8f2a2be4d61#l3.245
Comment 70 Dão Gottwald [:dao] 2008-12-12 09:49:36 PST
(In reply to comment #69)
> Ctrl-Tab seems to be working when switching forwards/backwards on OS X. I'm
> assuming you took out the BROKENFOCUS stuff?

exactly

> A separate issue is when you go into all tabs mode, how are you supposed to
> select the tab? Pressing enter doesn't work, but space seems to work.

Enter works just like Space for me on Windows (and Linux, pretty sure). I thought button.xml#button-base handles this, but I'm not sure right now...

> Additionally, when I was looking at the bug for showing the target of a submit
> button, I noticed the old tab listing would show the url of the tab with
> setOverLink:
> http://hg.mozilla.org/mozilla-central/rev/c8f2a2be4d61#l3.245

An early version (of this UI, actually) did that in bug 436304, but the panel can overlap the statusbar and it was more noisy than useful anyway.
Comment 71 Dão Gottwald [:dao] 2008-12-17 05:50:03 PST
Created attachment 353415 [details] [diff] [review]
patch v3.10

workaround for bug 463802 removed
Comment 73 Charles Harrison 2008-12-24 12:41:18 PST
I was pointed here from a bug that I filed:
Bug 470970 -  Control-Tab and Control-Shift-Tab don't cycle through the Tab History List
https://bugzilla.mozilla.org/show_bug.cgi?id=470970

As a long-term user that has grown up with (in a computing sense) with Control-Tab and Control-Shift-Tab in an MDI cycling through the document history list, aka MRU list or sometimes Z-order, I'm really shuddering at what I'm reading here.  Please see my bug for a description of how Control-Tab and Control-Shift-Tab are *supposed* to work, at least in all Windows environments since 3.1.  This behaviour is already broken in FF, but instead of just fixing it, you seem hell bent on changing it permanently to something different so that it can never be fixed.

Control-Tab, along with its window counterpart, Alt-Tab, are the most useful shortcuts in a Windows environment.  If you must do this:
1)	Fix Control-Tab and Control-Shift-Tab to behave as they *should*;
2)	Use a shortcut other than Control-Tab or Control-Shift-Tab for this;
3)	Do NOT include it in the standard build, make it a downloadable add-on for those that want it;
Comment 75 Nochum Sossonko [:Natch] 2009-01-19 07:22:43 PST
*** Bug 474265 has been marked as a duplicate of this bug. ***
Comment 76 Michael 2009-01-19 17:34:43 PST
More on control-tab (not sure if I'm reading comment 73 a a duplicate of this comment or not).  Control tab used to cycle through tabs starting at the *current* tab.  This makes sense, because you generally want to move from where you currently are to something nearby.  But the new behavior is to always start at the beginning.  This requires:

1) Search through the thumbnails for the page you are looking for - and possibly the one where you already are (if  you know what it looks like)
2) Move through the entire list - note that the leftmost tab is most likely the oldest, since tabs open from left to right.
3) Get to the tab you want.

So if you were on tab 8 and middle clicked on two links to open two new tabs, control tab now takes 9 and 10 keystrokes respectively to reach your new tabs, whereas it used to take 1 or 2.  This is extremely inefficient.

Worse, since only 7 tabs are displayed, you may have no idea what you are cycling TO.
Comment 77 Benjamin Smedberg [:bsmedberg] 2009-01-27 11:56:11 PST
Have you considered including the favicon (perhaps as an overlay on the scaled page image) in the tab preview? For me the preview image is pretty much useless: 90% of my tabs are black-on-white and not differentiable.

Also, the close-tab button makes me nervous. I can't just slew my mouse across and point at the thing I want. I have to be really careful not to click the close-tab button by mistake.
Comment 78 Peter Lairo 2009-01-28 02:55:15 PST
The tab panel is a jarring overlaying of the UI. The MRU order is unintuitive because it conflicts with the visible tab bar order and is an abstract and ever changing mental model.

I would suggest (plead!) that CTRL+Tab either stay as it was (not have any overlay) or that the overlay be in harmony with the tab bar (see below).

  ______  ________  ______  ______  ______
 /  T1  \// *T2* \\/  T3  \/  T4  \/  T5  \  <-- tabs
|       |         |       |       |        |
|       |         |       |       |        | <-- overlays
|       |         |       |       |        |
+-------+---------+-------+-------+--------+

- The active tab (T2) should be highlighted.
- The selected and/or hovered tab should show a (different!) highlight effect.

Yes, the preview panels would get pretty small when there are many tabs (>5). A solution could be that the selected tab is made larger and the neighboring tabs dynamically taper off in size. We should never show less than 5 tabs (that's only 2 in the direction of travel) (better would be 7 tabs). There should always be some "connecting lines" between the preview panels and their tabs.

Drop MRU (or give it a different key-combo than CTRL+Tab). It cannot be implemented without sacrificing the much more important UI metaphors.
Comment 79 Dão Gottwald [:dao] 2009-01-28 15:54:13 PST
(In reply to comment #77)
> Have you considered including the favicon (perhaps as an overlay on the scaled
> page image) in the tab preview? For me the preview image is pretty much
> useless: 90% of my tabs are black-on-white and not differentiable.

Here's a tryserver build with favicons in the all-tabs panel:
https://build.mozilla.org/tryserver-builds/2009-01-28_13:44-dgottwald@mozilla.com-try-e42d5c6e1b3/

My impression is that they clutter up the panel and make it harder to focus on the snapshots.
Comment 80 Damian Shaw [Quan] 2009-01-29 01:43:21 PST
I'm quite liking the favicons, I'm finding I can either concentrate on them or the thumbnail preview. Though they're not implemented for ctrl+tab, just tab. Anyway, it's certainly feels a lot better than the old overflow menu which felt very limited (couldn't even middle click to close tabs on it). 

Is it intentional that when you ctrl+tab and mouse over "show all tabs" and let go of ctrl it opens all tabs? It seems odd but also reasonable at the same time.
Comment 81 Benjamin Smedberg [:bsmedberg] 2009-01-29 06:24:18 PST
Yeah, the favicons really help me, too. They're pretty subtle right now... I wonder whether making them bigger would help at all or just be distracting.
Comment 82 Dão Gottwald [:dao] 2009-01-29 16:29:41 PST
Added the favicons to ctrl+tab, made them bigger and slightly transparent:

https://build.mozilla.org/tryserver-builds/2009-01-29_12:21-dgottwald@mozilla.com-try-08d6fd6258e/
Comment 83 Ed Lee :Mardak 2009-01-29 17:52:19 PST
Created attachment 359670 [details]
favicon tweak (white bg + black .5 outline; white + .1; white; no bg)

4 tweaked versions of the favicon

1) white background with 1px outline rgba(0,0,0,.5)
2) white background + black .1
3) white background + no outline
4) no background + no outline
Comment 84 Dão Gottwald [:dao] 2009-01-29 18:11:30 PST
Created attachment 359675 [details] [diff] [review]
patch (with favicons)
Comment 85 Dão Gottwald [:dao] 2009-01-30 07:34:37 PST
Created attachment 359754 [details] [diff] [review]
patch v4 (with favicons)

Added a white background (thanks Ed) and a 2px padding to the favicons.
Comment 86 Dão Gottwald [:dao] 2009-01-30 07:36:04 PST
(In reply to comment #85)
> Created an attachment (id=359754) [details]
> patch v4 (with favicons)
> 
> Added a white background (thanks Ed) and a 2px padding to the favicons.

https://build.mozilla.org/tryserver-builds/2009-01-30_05:25-dgottwald@mozilla.com-try-6d8860a0716/
Comment 87 eyal gruss (eyaler) 2009-01-30 08:21:58 PST
i was wondering if there is a way to give the thumbnails the same centering as the web page. this is mostly relevant for wide screens.
for example in the this screen grab:
http://i41.tinypic.com/wat7w6.jpg
you can see that the left and right thumbnails are not centered correctly, so that a lot of the thumbnail's area is wasted.
Comment 88 Nochum Sossonko [:Natch] 2009-01-31 23:18:53 PST
Dao, do you maintain a public repo I would like to pull and integrate these patches in my build.
Comment 89 Dão Gottwald [:dao] 2009-02-01 06:00:22 PST
(In reply to comment #80)
> Is it intentional that when you ctrl+tab and mouse over "show all tabs" and let
> go of ctrl it opens all tabs? It seems odd but also reasonable at the same
> time.

Yes, that's intentional. Just like tabbing, the mouse changes focus within the available elements, and the "show all tabs" button is one of them.

(In reply to comment #87)
> i was wondering if there is a way to give the thumbnails the same centering as
> the web page. this is mostly relevant for wide screens.

The problem is that centering the snippet isn't right for left-aligned pages, and capturing the whole page means less detail. I tried making the viewport smaller using fullZoom, but that's rather expensive and messes up the scroll position.

(In reply to comment #88)
> Dao, do you maintain a public repo I would like to pull and integrate these
> patches in my build.

There's no public repository currently. I figured it wasn't worth the overhead since I work on the code alone and make the latest patch available continuously.
Comment 90 eyal gruss (eyaler) 2009-02-05 19:35:29 PST
(In reply to comment #89)
> (In reply to comment #87)
> > i was wondering if there is a way to give the thumbnails the same centering as
> > the web page. this is mostly relevant for wide screens.
> 
> The problem is that centering the snippet isn't right for left-aligned pages,
> and capturing the whole page means less detail. I tried making the viewport
> smaller using fullZoom, but that's rather expensive and messes up the scroll
> position.
> 
can't you check the alignment of the page and let the snippet have the same alignment?
Comment 91 Dão Gottwald [:dao] 2009-02-05 23:07:00 PST
No, there are too many ways to align a page layout. An interesting idea would be to do some smart analysis of the snaptshot's image data and throw away the side with the least diversity -- might work but would likely be slow. At that point we could just use fullZoom.
Comment 92 Dão Gottwald [:dao] 2009-03-15 09:02:17 PDT
Created attachment 367485 [details] [diff] [review]
patch v4.1

updated to latest trunk
Comment 94 Henrik Skupin (:whimboo) 2009-04-11 02:18:13 PDT
(In reply to comment #93)
> https://build.mozilla.org/tryserver-builds/2009-03-15_06:44-dgottwald@mozilla.com-try-c6892973413/

Dao, this build isn't available anymore. Could you kick-off a new one?
Comment 98 eyal gruss (eyaler) 2009-05-22 14:51:02 PDT
how about implementing here the idea of bug 404416: Show keyboard shortcuts (⌘1 through ⌘9) in the "All Tabs" menu ?
Comment 99 Dão Gottwald [:dao] 2009-05-22 15:37:55 PDT
(In reply to comment #98)
> how about implementing here the idea of bug 404416: Show keyboard shortcuts (⌘1
> through ⌘9) in the "All Tabs" menu ?

That doesn't seem to fit with the UI here.
Comment 100 Dão Gottwald [:dao] 2009-05-23 06:05:02 PDT
https://build.mozilla.org/tryserver-builds/dgottwald@mozilla.com-try-569ad6b9fbc/

Note that the Ctrl-Tab extension now basically has the same UI if you use it with Firefox 3.5:
https://addons.mozilla.org/firefox/addon/5244
Comment 101 Dão Gottwald [:dao] 2009-07-09 14:54:18 PDT
Created attachment 387741 [details] [diff] [review]
patch v4.2

fixed a focus issue

http://build.mozilla.org/tryserver-builds/dgottwald@mozilla.com-try-3e432e227dcb
Comment 102 Dão Gottwald [:dao] 2009-07-10 12:02:03 PDT
Created attachment 387918 [details] [diff] [review]
patch v5

This adds a pref for enabling/disabling the all-tabs panel, similar to the existing one for Ctrl+Tab.

Prefs are:
browser.allTabs.previews
browser.ctrlTab.previews
Comment 103 Peter Lairo 2009-07-10 13:56:24 PDT
(In reply to comment #102)
> browser.ctrlTab.previews

Are there plans to make the CTRL+Tab panel OFF and drop the MRU by default? Both are real usability killers. (I *was* a heavy CTRL+Tab user until the panel & MRU ruined it for me)
Comment 104 Dão Gottwald [:dao] 2009-07-10 13:57:22 PDT
(In reply to comment #102)
> Created an attachment (id=387918) [details]
> patch v5
> 
> This adds a pref for enabling/disabling the all-tabs panel, similar to the
> existing one for Ctrl+Tab.
> 
> Prefs are:
> browser.allTabs.previews
> browser.ctrlTab.previews

https://build.mozilla.org/tryserver-builds/dgottwald@mozilla.com-try-e1f7c48d628c/
Comment 105 Vlado Valastiak [:wladow] @ Mozilla.sk 2009-07-10 14:15:19 PDT
Comment on attachment 387918 [details] [diff] [review]
patch v5

>+# Ctrl-Tab
>+ctrlTab.showAll.label=Show all %S tabs

This is a good candidate for PluralForm ;)
Comment 106 AKIHIRO Misaki (a.k.a Kuden) 2009-07-10 14:53:32 PDT
(In reply to comment #102)
> This adds a pref for enabling/disabling the all-tabs panel, similar to the
> existing one for Ctrl+Tab.
> 
> Prefs are:
> browser.allTabs.previews
> browser.ctrlTab.previews

If you require two designs of .tabs-alltabs-button,
I hope this for the theme developer. 
Now, the design switch of .tabs-alltabs-box-animate is not easy. 

Plan 1:
<stack class="tabs-alltabs-stack" previews="true/false">
  <hbox class="tabs-alltabs-box-animate"/>
  <toolbarbutton class="tabs-alltabs-button">
   <menupopup class="tabs-alltabs-popup"/>
  </toolbarbutton>
</stack>

browser.allTabs.previews;true -> <stack class="tabs-alltabs-stack" previews="true">
browser.allTabs.previews;false -> <stack class="tabs-alltabs-stack" previews="false">

Plan 2:
<stack>
  <hbox class="tabs-alltabs-box-animate" previews="true/false"/>
  <toolbarbutton class="tabs-alltabs-button">
   <menupopup class="tabs-alltabs-popup"/>
  </toolbarbutton>
</stack>

browser.allTabs.previews;true -> <hbox class="tabs-alltabs-box-animate previews="true">
browser.allTabs.previews;false -> <hbox class="tabs-alltabs-box-animate" previews="false">
Comment 107 Dão Gottwald [:dao] 2009-07-10 15:00:03 PDT
(In reply to comment #105)
> >+# Ctrl-Tab
> >+ctrlTab.showAll.label=Show all %S tabs
> 
> This is a good candidate for PluralForm ;)

Indeed, thanks.

(In reply to comment #106)
> If you require two designs of .tabs-alltabs-button,
> I hope this for the theme developer.

A theme may provide a different design depending on the all-tabs pref. The tryserver build from above does that on Windows and Linux, but not on OS X.

> Now, the design switch of .tabs-alltabs-box-animate is not easy.

I don't think it makes a lot of sense to style tabs-alltabs-box-animate differently depending on that pref.
Comment 108 Dão Gottwald [:dao] 2009-07-10 15:26:23 PDT
Created attachment 387961 [details] [diff] [review]
patch v5.1

using PluralForm
Comment 109 AKIHIRO Misaki (a.k.a Kuden) 2009-07-10 16:02:35 PDT
(In reply to comment #107)
> A theme may provide a different design depending on the all-tabs pref. The
> tryserver build from above does that on Windows and Linux, but not on OS X.

You say that this is different by the design of theme. 

> I don't think it makes a lot of sense to style tabs-alltabs-box-animate
> differently depending on that pref.

New tab button, All tabs button, and Tab scrollbox arrow of Windows default theme are special designs that look like the tab. 
These are different from the design of global toolbarbutton. 

A special design might not need the change in .tabs-alltabs-box-animate. 
However, there might be a design for which the change is necessary.
This depends on the design of theme, too. 

There is no method of change now.
Comment 110 Dão Gottwald [:dao] 2009-07-10 16:44:44 PDT
(In reply to comment #109)
> A special design might not need the change in .tabs-alltabs-box-animate. 
> However, there might be a design for which the change is necessary.

It might be desirable in some cases, but certainly not necessary. .tabs-alltabs-box-animate is expected to contain a texture that overlays the all-tabs button momentarily when the tab bar overflows. That works pretty much regardless of what the all-tabs does and whether it uses a different icon or even a different button appearance depending on [menu="true"].

By the way, I'm using your Past Modern theme right now and the button, including the overflow animation, seems to look right for both pref states.

Also note that browser.allTabs.previews is currently thought to be an interim solution. When we reach a point where we're confident that the new UI is a win for the majority of our users, it's likely that we would drop support for the old UI.
Comment 111 Dão Gottwald [:dao] 2009-07-10 16:47:45 PDT
(In reply to comment #110)
> depending on [menu="true"].

err, [type="menu"]
Comment 112 Dão Gottwald [:dao] 2009-07-10 17:11:54 PDT
*** Bug 308492 has been marked as a duplicate of this bug. ***
Comment 113 AKIHIRO Misaki (a.k.a Kuden) 2009-07-10 17:12:50 PDT
(In reply to comment #110)
> By the way, I'm using your Past Modern theme right now and the button,
> including the overflow animation, seems to look right for both pref states.

Well... It is not a topic of piece person of me. 

If two designs are necessary, the theme developer will design them. 
However, please enable two designs. 

> Also note that browser.allTabs.previews is currently thought to be an interim
> solution. When we reach a point where we're confident that the new UI is a win
> for the majority of our users, it's likely that we would drop support for the
> old UI.

All right.
I also hope for it. 
If the user wants old UI, it might be work of Extension.
Comment 114 Dão Gottwald [:dao] 2009-07-11 05:49:17 PDT
Created attachment 388054 [details] [diff] [review]
patch v5.2

Previous patches had the constraint that the tab preview image size generally depended on what would fit the Ctrl+Tab panel. The Ctrl+Tab panel resizes the images dynamically now, allowing them to be bigger in the all-tabs panel.

http://build.mozilla.org/tryserver-builds/dgottwald@mozilla.com-try-5130fa015e78
Comment 115 Dão Gottwald [:dao] 2009-07-12 14:23:28 PDT
Created attachment 388157 [details] [diff] [review]
patch v5.2

The previous patch skipped the Ctrl+Tab browser chrome test if the pref is set to false, which is bad. It just sets the pref to true now.
Comment 116 Nochum Sossonko [:Natch] 2009-07-13 13:02:19 PDT
So, a few comments:

1) The panels are disabled now by default, will that be the default once this lands?
2) When using the ctrl-tab panel, the tabs are being sorted in MRU order, which brings up some usability issues:
  a) If you ctrl-tab quickly (so as not to bring up the panel), then ctrl-tab again, you land in an endless cycle of tab a (currently selected)->tab b (next in MRU order)->tab a, etc.
  b) and this is much the same as the point a, but manifests a bit differently, if you tab switch (say twice) then tab switch again, you end up in a very confusing cycle.
3) If the panels are disabled by default (1), can we get a checkbox under Options->Tabs to enable them?

I'm not sure how to go about satisfying the MRU requirement and the usability issue, but if the tabs could move around a bit less, that would certainly help. I don't think switching between the same two tabs is what the ctrl-tab panel is for.
Comment 117 Nochum Sossonko [:Natch] 2009-07-13 13:19:45 PDT
All tabs panel:

1) keyboard bindings are a bit weird:
  a) Pressing up/down takes you up and down through the tabs from left to right, but if there is a column that doesn't have a tab on the bottom-most row, that column will be skipped.
  b) going through the tabs with left/right arrow keys goes through the tabs left to right, up and down, and then will land on the search textbox. You can't get out of the textbox with the left/right arrowkeys after that.
  c) In the textbox, hitting up/down behaves differently than other textboxes (move to begining/end of text) and moves out of the textbox.
2) On my computer, the hovering effect seems a bit slowish (I get a bit of lag between hovers), my computer is somewhat slow, so that may be expected.

IMO, the left/right arrowkeys should not move to the searchbox, it should be in the tab order only when using the up/down keys. Even then, I'm not sure how to handle (c).
Comment 118 Dão Gottwald [:dao] 2009-07-13 13:39:45 PDT
(In reply to comment #116)
> 1) The panels are disabled now by default, will that be the default once this
> lands?

That's the plan, as this might need more work and polish, and 3.6 is expected to be a very quick release.

> 2) When using the ctrl-tab panel, the tabs are being sorted in MRU order, which
> brings up some usability issues:

I'm not sure you're really describing issues; it's what I'd expect from an MRU interface. See also Alt+Tab. But if you see possibilities for improving this, please spin them off to new bugs, newsgroup threads, etc.

> I don't think switching between the same two tabs is what the ctrl-tab panel is
> for.

It's actually the most important use case, as the other tab will be on the top of the user's mental memory, the one that's most likely to be used next, etc.

> 3) If the panels are disabled by default (1), can we get a checkbox under
> Options->Tabs to enable them?

We should probably consider this for the Ctrl+Tab panel, when it's enabled by default.
Comment 119 Dão Gottwald [:dao] 2009-07-13 16:08:51 PDT
(In reply to comment #117)
> All tabs panel:
> 
> 1) keyboard bindings are a bit weird:
>   a) Pressing up/down takes you up and down through the tabs from left to
> right, but if there is a column that doesn't have a tab on the bottom-most row,
> that column will be skipped.

I hate that code, but I'll have a look at it once more.

>   b) going through the tabs with left/right arrow keys goes through the tabs
> left to right, up and down, and then will land on the search textbox. You can't
> get out of the textbox with the left/right arrowkeys after that.

By design, left/right keys shouldn't leave the textbox, even if it's empty. That's an a11y requirement. If left/right keys didn't move /to/ the search field, then it would be strange that up/down do. And if up/down didn't move to the search field, it would seem strange or at least inconsistent that they can leave it...

>   c) In the textbox, hitting up/down behaves differently than other textboxes
> (move to begining/end of text) and moves out of the textbox.

That's also by design, see comment 2. I think I could live without it, as keyboard users are more likely to try Tab.
Comment 120 Dão Gottwald [:dao] 2009-07-15 23:06:00 PDT
Created attachment 388875 [details] [diff] [review]
patch v5.3

fixed this:

>   a) Pressing up/down takes you up and down through the tabs from left to
> right, but if there is a column that doesn't have a tab on the bottom-most row,
> that column will be skipped.

Neil kindly agreed to review this.
Comment 121 Dão Gottwald [:dao] 2009-07-15 23:49:24 PDT
Tryserver builds will appear here:
http://build.mozilla.org/tryserver-builds/dgottwald@mozilla.com-try-314420eaf2f8
Comment 122 Hideo Oshima 2009-07-16 06:10:56 PDT
(In reply to comment #120)
> Created an attachment (id=388875) [details]
> patch v5.3
> 
> fixed this:
> 
> >   a) Pressing up/down takes you up and down through the tabs from left to
> > right, but if there is a column that doesn't have a tab on the bottom-most row,
> > that column will be skipped.
> 
> Neil kindly agreed to review this.

I cannot build with Debian GNU/Linux unstable.

Build log:
/usr/bin/python2.5 /home/hideo/develop/mozilla/config/JarMaker.py \
	   -j ../../../../dist/bin/chrome \
	  -t /home/hideo/develop/mozilla -f jar  -DNDEBUG -DTRIMMED -DOSTYPE=\"Linux2.6\" -DOSARCH=Linux -DMOZILLA_VERSION=\"1.9.2a1pre\" -DMOZILLA_VERSION_U=1.9.2a1pre -DD_INO=d_ino -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DHAVE_INT16_T=1 -DHAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_UINT=1 -DHAVE_UNAME_DOMAINNAME_FIELD=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_ATTRIBUTE=1 -DHAVE_DIRENT_H=1 -DHAVE_GETOPT_H=1 -DHAVE_SYS_BITYPES_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GNU_LIBC_VERSION_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_MALLOC_H=1 -DHAVE_X11_XKBLIB_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_SYS_CDEFS_H=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DHAVE_DLADDR=1 -DFUNCPROTO=15 -DHAVE_XSHM=1 -DHAVE_FT_BITMAP_SIZE_Y_PPEM=1 -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 -DHAVE_FT_LOAD_SFNT_TABLE=1 -DHAVE_FT_SELECT_SIZE=1 -D_REENTRANT=1 -DHAVE_RANDOM=1 -DHAVE_STRERROR=1 -DHAVE_LCHOWN=1 -DHAVE_FCHMOD=1 -DHAVE_SNPRINTF=1 -DHAVE_MEMMOVE=1 -DHAVE_RINT=1 -DHAVE_STAT64=1 -DHAVE_LSTAT64=1 -DHAVE_TRUNCATE64=1 -DHAVE_SETBUF=1 -DHAVE_ISATTY=1 -DHAVE_FLOCKFILE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_STRTOK_R=1 -DHAVE_RES_NINIT=1 -DHAVE_GNU_GET_LIBC_VERSION=1 -DHAVE_LANGINFO_CODESET=1 -DVA_COPY=va_copy -DHAVE_VA_COPY=1 -DHAVE_I18N_LC_MESSAGES=1 -DMOZ_EMBEDDING_LEVEL_DEFAULT=1 -DMOZ_EMBEDDING_LEVEL_BASIC=1 -DMOZ_EMBEDDING_LEVEL_MINIMAL=1 -DMOZ_PHOENIX=1 -DMOZ_BUILD_APP=browser -DMOZ_DEFAULT_TOOLKIT=\"cairo-gtk2\" -DMOZ_X11=1 -DMOZ_WIDGET_GTK2=1 -DMOZ_ENABLE_XREMOTE=1 -DMOZ_DISTRIBUTION_ID=\"org.mozilla\" -DMOZ_PANGO=1 -DMOZ_ENABLE_GCONF=1 -DMOZ_ENABLE_GNOMEUI=1 -DMOZ_ENABLE_DBUS=1 -DMOZ_ENABLE_LIBNOTIFY=1 -DIBMBIDI=1 -DMOZ_VIEW_SOURCE=1 -DACCESSIBILITY=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DNS_PRINTING=1 -DNS_PRINT_PREVIEW=1 -DMOZ_NO_XPCOM_OBSOLETE=1 -DMOZ_OGG=1 -DATTRIBUTE_ALIGNED_MAX=64 -DMOZ_WAVE=1 -DMOZ_SYDNEYAUDIO=1 -DMOZ_MEDIA=1 -DHAVE_LIBASOUND=1 -DMOZ_XTF=1 -DMOZ_CRASHREPORTER=1 -DHAVE_CURL_CURL_H=1 -DMOZ_CRASHREPORTER_ENABLE_PERCENT=100 -DMOZ_MATHML=1 -DMOZ_ENABLE_CANVAS=1 -DMOZ_SVG=1 -DMOZ_SMIL=1 -DMOZ_UPDATE_CHANNEL=default -DMOZ_PLACES=1 -DMOZ_FEEDS=1 -DMOZ_STORAGE=1 -DMOZ_SAFE_BROWSING=1 -DMOZ_URL_CLASSIFIER=1 -DMOZ_LOGGING=1 -DSIZEOF_INT_P=4 -DMOZ_MEMORY_SIZEOF_PTR_2POW=2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_LINUX=1 -DMOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1 -DHAVE___CXA_DEMANGLE=1 -DHAVE__UNWIND_BACKTRACE=1 -DMOZ_USER_DIR=\".mozilla\" -DMOZ_ENABLE_LIBXUL=1 -DHAVE_STDINT_H=1 -DHAVE_INTTYPES_H=1 -DMOZ_TREE_CAIRO=1 -DHAVE_UINT64_T=1 -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_RDF=1 -DMOZ_MORKREADER=1 -DMOZ_DLL_SUFFIX=\".so\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1 -DMOZ_ACCESSIBILITY_ATK=1 -DATK_MAJOR_VERSION=1 -DATK_MINOR_VERSION=26 -DATK_REV_VERSION=0  \
	  /home/hideo/develop/mozilla/browser/themes/gnomestripe/browser/jar.mn
processing /home/hideo/develop/mozilla/browser/themes/gnomestripe/browser/jar.mn
Traceback (most recent call last):
  File "/home/hideo/develop/mozilla/config/JarMaker.py", line 463, in <module>
    main()
  File "/home/hideo/develop/mozilla/config/JarMaker.py", line 460, in main
    jardir=options.j)
  File "/home/hideo/develop/mozilla/config/JarMaker.py", line 231, in makeJar
    localedirs)
  File "/home/hideo/develop/mozilla/config/JarMaker.py", line 300, in processJarSection
    outHelper, jf)
  File "/home/hideo/develop/mozilla/config/JarMaker.py", line 332, in _processEntryLine
    raise RuntimeError("file not found: " + src)
RuntimeError: file not found: KUI-close.png
make[7]: *** [libs] エラー 1
Comment 123 Dão Gottwald [:dao] 2009-07-16 09:56:14 PDT
(In reply to comment #122)
Chances are that you didn't apply the patch correctly. You need to use hg import or git-apply.
Comment 124 Neil Deakin 2009-07-17 11:01:22 PDT
Comment on attachment 388875 [details] [diff] [review]
patch v5.3

>+var tabPreviewPanelHelper = {
>+  opening: function (host) {
>+    host.panel.hidden = false;
>+
>+    var handler = this._generateHandler(host);
>+    host.panel.addEventListener("popuphiding", handler, false);
>+    host.panel.addEventListener("popupshown", handler, false);
>+

These listeners don't seem to get removed anywhere.


>+    host.panel.setAttribute("norestorefocus", "true");

Can this just be set in the xul directly?


>+  _popupshown: function (host) {
>+    if ("setupGUI" in host)
>+      host.setupGUI();
>+  },
>+  _popuphiding: function (host) {

Do these two event handlers deal with the case where a child popup is closed? For instance, the filter field's context menu?


>+  get selected () this._selectedIndex < 0 ?
>+                    document.activeElement :
>+                    this.thumbnails.item(this._selectedIndex),

Why document.activeElement?


>   updatePreview: function ctrlTab__updatePreview(aThumbnail, aTab) {
>+    if (aThumbnail == this.showAllButton)
>+      return;
>+
>     do {
>       if (aThumbnail._tab) {
>         if (aThumbnail._tab == aTab)
>           break;
>         aThumbnail._tab.removeEventListener("DOMAttrModified", this, false);
>       }
>       aThumbnail._tab = aTab;
>       if (aTab)
>         aTab.addEventListener("DOMAttrModified", this, false);
>     } while (false);

Why is a loop used here?


>+  advanceFocus: function ctrlTab_advanceFocus(aForward) {
...
>+      } while (this.selected.hidden);

When would a tab button in the ctrlTab view be hidden?


>+  showAllTabs: function ctrlTab_pick(aThumbnail) {

ctrlTab_pick should ctrlTab_showAllTabs

Also, the functions are inconsistent whether they use one or two underscores.


>+  open: function ctrlTab_open() {
>+    if (this.isOpen)
>+      return;
>+
>+    allTabs.close();
>+
>+    document.addEventListener("keyup", this, true);

To ensure it gets removed, is 'close' always guaranteed to be called when the key listener is no longer needed?


>+  _openPanel: function ctrlTab_openPanel() {
>+    tabPreviewPanelHelper.opening(this);
>+
>+    this.panel.width = Math.min(screen.availWidth * .99,
>+                                this.canvasWidth * 1.25 * this.tabThumbnailCount);

Why .99 ? Are we just wanting to account for a border of some kind, or do you specifically mean to make the size just a bit smaller than the screen? The height, or the other hand, doesn't have this check.


>+  setupGUI: function ctrlTab_setupGUI() {
>+    this.selected.focus();
>+    this._selectedIndex = -1;

I don't understand what -1 means here.


>+    this._trackMouseOver = false;
>+    setTimeout(function (self) {
>+      if (self.isOpen)
>+        self._trackMouseOver = true;
>+    }, 0, this);
>+  },

What is this timer for? Add a comment here if it is needed to indicate what this is waiting for.


>         if (isOpen && event.ctrlKey) {
>           switch (event.charCode) {
>-            case this.closeCharCode:
>-              gBrowser.removeTab(this.selected._tab);
>+            case this.keys.close:
>+              this.remove(this.selected);
>               break;

Should the delete key remove the tab as well? 


>+  readPref: function allTabs_readPref() {
>+    var allTabsButton = document.getAnonymousElementByAttribute(
>+                          gBrowser.tabContainer, "anonid", "alltabs-button");
>+    if (gPrefService.getBoolPref(this.prefName)) {
>+      allTabsButton.removeAttribute("type");
>+      allTabsButton.setAttribute("command", "Browser:ShowAllTabs");
>+    } else {
>+      allTabsButton.setAttribute("type", "menu");
>+      allTabsButton.removeAttribute("command");
>+      allTabsButton.removeAttribute("oncommand");

This removes the oncommand, but never sets it again. Is that intended?


>+  closeTab: function allTabs_closeTab(event) {
>+    if (event.type != "click" || event.button == 1) {

I only see closeTab being called from a command event listener.


>+  open: function allTabs_open(aToggle) {

open doesn't seem to be called with an argument anywhere.


>+    this.panel.addEventListener("keypress", this, true);
>+    this._browserCommandSet.addEventListener("command", this, false);

Is these listener supposed to be removed when the panel is closed?


>+          case event.DOM_VK_RETURN:
>+            if (event.target == this.filterField) {
>+              // If there's a pending search, kick it off now.
>+              if (this.filterField._timer)

This shouldn't be relying on a field of the textbox that supposed to be private.


>+  _addBox: function allTabs_addBox(aTab) {
>+    var box = document.createElement("button");
>+    box.setAttribute("class", "allTabs-thumbnail");

box.className = "allTabs-thumbnail";


>+  _getBox: function allTabs_getBox(aTab) {
>+    var boxes = this.container.childNodes;
>+    for (let i = 0; i < boxes.length; i++)
>+      if (boxes[i]._tab == aTab)
>+        return boxes[i];
>+    return null;
>+  },

Callers of _getBox don't null-check the result. Is the return null just to avoid a warning?


>+      this.tabCloseButton.left = thumbnail.left -
>+                                 container.left +
>+                                 parseInt(this.container.left) +
>+                                 (alignLeft ? 0 :
>+                                  thumbnail.width - this.tabCloseButton.boxObject.width);

I'd be consistent and use getBoundingClientRect instead of the box object here as well.


>+  _updatePreview: function allTabs_updatePreview(aBox) {
>+    aBox.setAttribute("label", aBox._tab.label);
>+    aBox.setAttribute("tooltiptext", aBox._tab.label);
>+    aBox.setAttribute("crop", aBox._tab.crop);
>+    if (aBox._tab.image)
>+      aBox.setAttribute("icon", aBox._tab.image);
>+    else
>+      aBox.removeAttribute("icon");

Many of there can be set as properties instead of attributes.


>+
>+  _onKeyPress: function allTabs_onKeyPress(event) {

Why does allTabs have two different key listeners? If they do different things, this should be clearer or commented.


>+      switch (event.keyCode) {
>+        case event.DOM_VK_UP:
>+          if (this._visible) {
>+            let boxes = this._visibleBoxes;
>+            boxes[Math.floor(boxes.length / this._columns) * this._columns - 1].focus();

Can't Math.floor(boxes.length / this._columns) end up being 0?


>+  _advanceFocusVertically: function allTabs_advanceFocusVertically(event) {
>+    var box = document.commandDispatcher.focusedElement;

Active element should be sufficient here.

You use the word box a lot here. Maybe it would clearer to use a word that describes them better?


>diff --git a/browser/base/content/browser-tabPreviews.xml b/browser/base/content/browser-tabPreviews.xml
>+<!DOCTYPE bindings [
>+<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
>+%browserDTD;
>+]>

I don't any of the entities being used anywhere.


>+        <xul:hbox class="ctrlTab-favicon-container" xbl:inherits="hidden=noicon">
>+          <xul:image class="ctrlTab-favicon" xbl:inherits="src=icon"/>
>+        </xul:hbox>

Why not just use 'image' instead of 'icon', then you can set it with .image


>+/* ::::: Keyboard UI Panel ::::: */
>+.KUI-panel-closebutton {
>+  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image");

There should be a means of referring to this binding via a type attribute or other tag. If not, a bug should be created. A general imagebutton type element is certainly needed.


>-#ctrlTab-pages {
>+#allTabs-tab-close-button {
>+  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image");
>+}
...
>+#allTabs-tab-close-button {
>+  margin: 0;

You could merge these two rules.


>   tabPreviews.init();
>-  ctrlTab.init();
>+  ctrlTab.readPref();
>+  gPrefService.addObserver(ctrlTab.prefName, ctrlTab, false);
>+  gPrefService.addObserver(allTabs.prefName, allTabs, false);

I wonder if it would be better to just have one observer listening to a pref branch, and name the preferences to fit in one hierarchy.


>+/* All Tabs */
>+
>+#allTabs-panel {
>+  /* compensate the widget border and padding to center the panel correctly */
>+  margin-left: -13px;
>+}

'compenstate *for* the widget border...'

Which border is this anyway?


>+.allTabs-thumbnail-label {
>+  -moz-transform: translate(0, -1px);
>+}

This rule would be better grouped with the other thumbnail rules.
Comment 125 Dão Gottwald [:dao] 2009-07-17 15:41:45 PDT
Responding to the comments that need a response, the others will be addressed directly:

> >+var tabPreviewPanelHelper = {
> >+  opening: function (host) {
> >+    host.panel.hidden = false;
> >+
> >+    var handler = this._generateHandler(host);
> >+    host.panel.addEventListener("popuphiding", handler, false);
> >+    host.panel.addEventListener("popupshown", handler, false);
> >+
> 
> These listeners don't seem to get removed anywhere.

They're removed in the handler that _generateHandler returns.

> >+    host.panel.setAttribute("norestorefocus", "true");
> 
> Can this just be set in the xul directly?

Sure, it can. I figured it would make more sense here, since tabPreviewPanelHelper takes over the focus restoring.

> >+  _popupshown: function (host) {
> >+    if ("setupGUI" in host)
> >+      host.setupGUI();
> >+  },
> >+  _popuphiding: function (host) {
> 
> Do these two event handlers deal with the case where a child popup is closed?
> For instance, the filter field's context menu?

Yep, _generateHandler takes care of that.

> >+  get selected () this._selectedIndex < 0 ?
> >+                    document.activeElement :
> >+                    this.thumbnails.item(this._selectedIndex),
> 
> Why document.activeElement?

Because keeping track of _selectedIndex seems like an avoidable complication. When the panel is open, document.activeElement should always point to the selected item.

> >     do {
> >       if (aThumbnail._tab) {
> >         if (aThumbnail._tab == aTab)
> >           break;
> >         aThumbnail._tab.removeEventListener("DOMAttrModified", this, false);
> >       }
> >       aThumbnail._tab = aTab;
> >       if (aTab)
> >         aTab.addEventListener("DOMAttrModified", this, false);
> >     } while (false);
> 
> Why is a loop used here?

So that 'break' can be used ;)

> >+  advanceFocus: function ctrlTab_advanceFocus(aForward) {
> ...
> >+      } while (this.selected.hidden);
> 
> When would a tab button in the ctrlTab view be hidden?

When there are more provided buttons than actual tabs. For instance when you press Ctrl-Tab with three tabs in that browser window.

> >+  open: function ctrlTab_open() {
> >+    if (this.isOpen)
> >+      return;
> >+
> >+    allTabs.close();
> >+
> >+    document.addEventListener("keyup", this, true);
> 
> To ensure it gets removed, is 'close' always guaranteed to be called when the
> key listener is no longer needed?

The listener gets removed in the admittedly weirdly-named suspendGUI method, which is guaranteed to be called.

> >+    this.panel.width = Math.min(screen.availWidth * .99,
> >+                                this.canvasWidth * 1.25 * this.tabThumbnailCount);
> 
> Why .99 ? Are we just wanting to account for a border of some kind, or do you
> specifically mean to make the size just a bit smaller than the screen?

Yeah, just to make it a bit smaller than the screen.

> The height, on the other hand, doesn't have this check.

The height is just estimated for the vertical alignment, not actually set. The vertical screen bounds shouldn't be reached, but if they were, I don't think limiting the estimated height would help.

> >+  setupGUI: function ctrlTab_setupGUI() {
> >+    this.selected.focus();
> >+    this._selectedIndex = -1;
> 
> I don't understand what -1 means here.

_selectedIndex is used to track the selected item as long as the panel isn't visible (for bug 498272). When the panel is open, it's not used anymore.

> >         if (isOpen && event.ctrlKey) {
> >           switch (event.charCode) {
> >-            case this.closeCharCode:
> >-              gBrowser.removeTab(this.selected._tab);
> >+            case this.keys.close:
> >+              this.remove(this.selected);
> >               break;
> 
> Should the delete key remove the tab as well?

I guess it would make sense. That idea didn't come up before.

> >+    if (gPrefService.getBoolPref(this.prefName)) {
> >+      allTabsButton.removeAttribute("type");
> >+      allTabsButton.setAttribute("command", "Browser:ShowAllTabs");
> >+    } else {
> >+      allTabsButton.setAttribute("type", "menu");
> >+      allTabsButton.removeAttribute("command");
> >+      allTabsButton.removeAttribute("oncommand");
> 
> This removes the oncommand, but never sets it again. Is that intended?

The oncommand gets added automatically based on the command attribute. I don't know why.

> >+  closeTab: function allTabs_closeTab(event) {
> >+    if (event.type != "click" || event.button == 1) {
> 
> I only see closeTab being called from a command event listener.

Seems like some legacy code slipped in. Will check/fix.

> >+  open: function allTabs_open(aToggle) {
> 
> open doesn't seem to be called with an argument anywhere.

ditto

> >+    this.panel.addEventListener("keypress", this, true);
> >+    this._browserCommandSet.addEventListener("command", this, false);
> 
> Is these listener supposed to be removed when the panel is closed?

Although the listener just calls this.close, which is a no-op when the panel is closed, it would make a lot of sense to remove it before that...

> >+          case event.DOM_VK_RETURN:
> >+            if (event.target == this.filterField) {
> >+              // If there's a pending search, kick it off now.
> >+              if (this.filterField._timer)
> 
> This shouldn't be relying on a field of the textbox that supposed to be
> private.

This is for bug 463635, but I think I can solve it differently.

> Callers of _getBox don't null-check the result. Is the return null just to
> avoid a warning?

Yes.

> >+  _onKeyPress: function allTabs_onKeyPress(event) {
> 
> Why does allTabs have two different key listeners? If they do different things,
> this should be clearer or commented.

One uses capture and the other doesn't. I'll see if the handlers can be merged, maybe checking event.eventPhase.

> >+/* ::::: Keyboard UI Panel ::::: */
> >+.KUI-panel-closebutton {
> >+  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image");
> 
> There should be a means of referring to this binding via a type attribute or
> other tag. If not, a bug should be created. A general imagebutton type element
> is certainly needed.

Filed bug 504945.

> >   tabPreviews.init();
> >-  ctrlTab.init();
> >+  ctrlTab.readPref();
> >+  gPrefService.addObserver(ctrlTab.prefName, ctrlTab, false);
> >+  gPrefService.addObserver(allTabs.prefName, allTabs, false);
> 
> I wonder if it would be better to just have one observer listening to a pref
> branch, and name the preferences to fit in one hierarchy.

I'm open to that if it ends up being more convenient, but I can't even think of appropriate names.

> >+/* All Tabs */
> >+
> >+#allTabs-panel {
> >+  /* compensate the widget border and padding to center the panel correctly */
> >+  margin-left: -13px;
> >+}
> 
> 'compenstate *for* the widget border...'
> 
> Which border is this anyway?

Not a CSS border but something that -moz-appearance:menupopup enforces.
Comment 126 Dão Gottwald [:dao] 2009-07-17 16:24:26 PDT
> >+  _updatePreview: function allTabs_updatePreview(aBox) {

> >+    aBox.setAttribute("label", aBox._tab.label);

> >+    aBox.setAttribute("tooltiptext", aBox._tab.label);

> >+    aBox.setAttribute("crop", aBox._tab.crop);

> >+    if (aBox._tab.image)

> >+      aBox.setAttribute("icon", aBox._tab.image);

> >+    else

> >+      aBox.removeAttribute("icon");

> 

> Many of there can be set as properties instead of attributes.

Most of these properties would only work if the binding is already constructed, which isn't necessarily the case.
Comment 127 Dão Gottwald [:dao] 2009-07-17 17:16:01 PDT
Created attachment 389235 [details] [diff] [review]
patch v5.4

I replaces the inconsistent uses of "thumbnail" and "box" with "preview".

Not sure what this exactly means:

> >+.allTabs-thumbnail-label {
> >+  -moz-transform: translate(0, -1px);
> >+}
> 
> This rule would be better grouped with the other thumbnail rules.
Comment 128 Dão Gottwald [:dao] 2009-07-17 17:25:39 PDT
Created attachment 389238 [details] [diff] [review]
patch v5.4

just missed some occurrences of "thumbnail"
Comment 129 Neil Deakin 2009-07-17 19:05:23 PDT
> Not sure what this exactly means:
> 
> > >+.allTabs-thumbnail-label {
> > >+  -moz-transform: translate(0, -1px);
> > >+}
> > 
> > This rule would be better grouped with the other thumbnail rules.

I just meant that you have some thumbnail rules, followed by some rules that apply to the panel in general, then this last thumbnail rule. It would be better to move this last thumbnail-related rule up with the others.
Comment 130 Dão Gottwald [:dao] 2009-07-18 00:12:34 PDT
(In reply to comment #129)
> I just meant that you have some thumbnail rules, followed by some rules that
> apply to the panel in general, then this last thumbnail rule. It would be
> better to move this last thumbnail-related rule up with the others.

The idea was that the first set of rules are shared by both panels, followed by a set that's specific to Ctrl-Tab and another one for All Tabs. Of course, that's not necessarily the best way to organize things.
Comment 132 Neil Deakin 2009-07-20 08:43:16 PDT
Comment on attachment 389238 [details] [diff] [review]
patch v5.4

> >+    host.panel.setAttribute("norestorefocus", "true");
> 
> Can this just be set in the xul directly?

It would be simpler and less work to set it in the xul directly though, rather than attempting to set it repeatedly.


> > Why is a loop used here?
> 
> So that 'break' can be used ;)

I'd just write it as:

if (aThumbnail._tab != aTab) {
  if (aThumbnail._tab)
    aThumbnail._tab.removeEventListener("DOMAttrModified", this, false);
  aThumbnail._tab = aTab;
  if (aTab)
    aTab.addEventListener("DOMAttrModified", this, false);
}


> _selectedIndex is used to track the selected item as long as the panel isn't
> visible (for bug 498272). When the panel is open, it's not used anymore.

Does _selectedIndex get reset when the popup is closed?


> +  _onKeyPress: function allTabs_onKeyPress(event) {
> +    if (event.eventPhase == event.CAPTURING_PHASE) {

Perhaps use a sepearate function _onCapturingKeyPress ?


>+      switch (event.keyCode) {
>+        case event.DOM_VK_UP:
>+          if (this._visible) {
>+            let boxes = this._visibleBoxes;
>+            boxes[Math.floor(boxes.length / this._columns) * this._columns - 1].focus();
>
> Can't Math.floor(boxes.length / this._columns) end up being 0?

Actually,thinking about this some more, I'd expect that pressing up from the filter field would just select the last preview.


The two keypress handlers on allTabs are added every time the popup is opened, (although it will overwrite), but are only removed when closing the browser. Would it be more optimal to remove them on popup close as well?
Comment 133 Dão Gottwald [:dao] 2009-07-20 11:06:19 PDT
(In reply to comment #132)
> > _selectedIndex is used to track the selected item as long as the panel isn't
> > visible (for bug 498272). When the panel is open, it's not used anymore.
> 
> Does _selectedIndex get reset when the popup is closed?

It gets reset when the popup opens, right after the selected preview is focused (see setupGUI method).

> Actually,thinking about this some more, I'd expect that pressing up from the
> filter field would just select the last preview.

The problem with that is, the last preview can be in the first column, and from there you couldn't cycle through the previews by pressing up repeatedly.
Comment 134 Dão Gottwald [:dao] 2009-07-20 11:34:23 PDT
Created attachment 389522 [details] [diff] [review]
patch v5.5

Moved the norestorefocus attribute, rewrote the non-looping loop, added _onCapturingKeyPress and moved the keypress listener removal to when the popup closes.
Comment 135 Neil Deakin 2009-07-20 12:09:31 PDT
>+    if ((aPreview._tab || null) != aTab) {
>+      if (aPreview._tab)

Why do you need the special check against null here?


> _selectedIndex is used to track the selected item as long as the panel isn't
> visible (for bug 498272). When the panel is open, it's not used anymore.

> Does _selectedIndex get reset when the popup is closed?

What I mean is that selectedIndex appears to only be updated when the popup is not open, and reset when it is about to be opened.
Is it used for some purpose while it is closed?


> Perhaps use a sepearate function _onCapturingKeyPress ?

Actually, I meant a separate function where _onKeyPress is called, but it isn't a big issue.


> The problem with that is, the last preview can be in the first column, and from
> there you couldn't cycle through the previews by pressing up repeatedly.

I wouldn't expect to be able to. I'd expect pressing up to go to the last item, and then pressing up again would move up a row.
Comment 136 Dão Gottwald [:dao] 2009-07-20 12:34:17 PDT
(In reply to comment #135)
> >+    if ((aPreview._tab || null) != aTab) {
> >+      if (aPreview._tab)
> 
> Why do you need the special check against null here?

If _tab doesn't exist, comparing it with something other than 'null' or 'undefined' will produce a strict warning.

> What I mean is that selectedIndex appears to only be updated when the popup is
> not open, and reset when it is about to be opened.
> Is it used for some purpose while it is closed?

No, it's not used after that. ctrlTab.selected shouldn't accessed either at that point. Maybe it should throw if ctrlTab.isOpen is false...

> > The problem with that is, the last preview can be in the first column, and from
> > there you couldn't cycle through the previews by pressing up repeatedly.
> 
> I wouldn't expect to be able to. I'd expect pressing up to go to the last item,
> and then pressing up again would move up a row.

Right, but the interesting part starts when you reach the first row. Unless you want to be captured in that column, we need to move to another column. So, cycling happens anyway. But your suggested way would cycle through a random subset of the previews.
Comment 137 Neil Deakin 2009-07-20 13:06:47 PDT
(In reply to comment #136)
> > What I mean is that selectedIndex appears to only be updated when the popup is
> > not open, and reset when it is about to be opened.
> > Is it used for some purpose while it is closed?
> 
> No, it's not used after that. ctrlTab.selected shouldn't accessed either at
> that point. Maybe it should throw if ctrlTab.isOpen is false...

OK, so when ctrl+tab is pressed but before the popup is open, selectedIndex will be 1. If advanceFocus is called at this point, selectedIndex will be updated. But while the popup is open, selectedIndex will be -1 and not needed.

So essentially, selectedIndex is only needed for the 100ms between when ctrl+tab is pressed and the popup is opened.

Is this correct?
Comment 138 Dão Gottwald [:dao] 2009-07-20 13:09:16 PDT
That's correct.
Comment 139 Dão Gottwald [:dao] 2009-07-20 21:44:16 PDT
http://hg.mozilla.org/mozilla-central/rev/0bcfdbd54fbc

Prefs are browser.ctrlTab.previews and browser.allTabs.previews. Nightly testers and whoever's interested should feel free to use them and report bugs.

Also, issues mentioned in this bug that haven't been resolved yet should be spun off to new bugs.

Thanks everyone.
Comment 140 Hasse 2009-07-21 00:51:41 PDT
Comment on attachment 389522 [details] [diff] [review]
patch v5.5

>--- a/browser/locales/en-US/chrome/browser/browser.properties
>+++ b/browser/locales/en-US/chrome/browser/browser.properties
 
>+# Ctrl-Tab
>+# LOCALIZATION NOTE (ctrlTab.showAll.label): #1 represents the number
>+# of tabs in the current browser window. It will always be 2 at least.
>+# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
>+ctrlTab.showAll.label=;Show all #1 tabs

Will this button be visible when there are two tabs in a window, or is the lowest number of tabs 3? When I test this with two tabs, Ctrl+Tab simply switches to the other tab.

When localizing this to Swedish, I would have to use a different pronoun if there are two tabs ("all two" would be incorrect). Unfortunately, our current plural rule doesn't allow this.
Comment 141 Dão Gottwald [:dao] 2009-07-21 01:00:55 PDT
(In reply to comment #140)
> Will this button be visible when there are two tabs in a window, or is the
> lowest number of tabs 3? When I test this with two tabs, Ctrl+Tab simply
> switches to the other tab.

The panel will only show up when there are at least three tabs. However, while it's open, closing a tab with Ctrl+W can lead to two tabs.
Comment 142 sibbl 2009-07-22 08:50:01 PDT
Is it right that I don't get a glass dialog when I want to list all tabs on Windows 7? The background of the Ctrl+Tab dialog is glass, but when I list all tabs I just get a gray background. 
(Using English Windows 7 build 7600)
Comment 143 Dão Gottwald [:dao] 2009-07-22 08:52:28 PDT
(In reply to comment #142)
> Is it right that I don't get a glass dialog when I want to list all tabs on
> Windows 7?

It's currently disabled because our aero glass support is broken. See https://bugzilla.mozilla.org/showdependencytree.cgi?id=458866&hide_resolved=1
Comment 144 sibbl 2009-07-22 09:29:00 PDT
(In reply to comment #143)
> 
> It's currently disabled because our aero glass support is broken. See
> https://bugzilla.mozilla.org/showdependencytree.cgi?id=458866&hide_resolved=1

Alright, I just wondered because it worked some hours ago.
Comment 145 [not reading bugmail] 2009-07-31 19:58:55 PDT
This bug appears to be very similar in nature to the work being done for bug 501490 and bug 474056 to implement the Windows 7 taskbar previews per tab.  

I couldn't help but notice while this is a great feature, where does the mention of using Ctrl+Tab come into play with this feature?  

If this is to show All tabs, the tab previews are borderline on distinguishable and illegibly on a full window having 4 tabs open on a 1024x768 display.  This window might look better if it didn't look like iTunes meets Linux on Windows (ie it doesn't at least follow basic theme or platform specific rules, which if we want this to be perf'd on by default, this should be reviewed).  For example, the spacing could be adjusted down and look more like a native dialog or popup window. The large close button X is out of place on a standard windows platform.
Comment 146 Henrik Skupin (:whimboo) 2009-09-08 00:08:06 PDT
*** Bug 515095 has been marked as a duplicate of this bug. ***
Comment 147 [not reading bugmail] 2009-09-16 20:23:23 PDT
What improvements are we going for with switching the design from the 3.5.x branch Showcase View (list all tabs) with this?
Comment 148 Henrik Skupin (:whimboo) 2009-11-13 13:51:27 PST
Marking as verified fixed. Nothing major has been regressed. If regressions arise those should be handled as new bugs.
Comment 149 Henrik Skupin (:whimboo) 2009-11-16 11:56:51 PST
Given my comment 9 on this bug I have filed a couple of new bugs and marked them dependent on bug 505404.

Note You need to log in before you can comment on or make changes to this bug.