Closed Bug 656329 Opened 13 years ago Closed 13 years ago

Use a Honeycomb-style action bar on Android tablets

Categories

(Firefox for Android Graveyard :: General, enhancement)

All
Android
enhancement
Not set
normal

Tracking

(firefox8 fixed, fennec8+)

VERIFIED FIXED
Firefox 8
Tracking Status
firefox8 --- fixed
fennec 8+ ---

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

(Whiteboard: [inbound])

Attachments

(4 files, 18 obsolete files)

24.87 KB, patch
mbrubeck
: review+
Details | Diff | Splinter Review
11.86 KB, patch
mbrubeck
: review+
Details | Diff | Splinter Review
5.40 KB, patch
mbrubeck
: review+
Details | Diff | Splinter Review
10.75 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
As part of the https://wiki.mozilla.org/Fennec/Features/TabletUI project, "tablet mode" in Fennec will use an action bar at the top of the screen, instead of the existing toolbars.

Related Android documentation:
http://developer.android.com/sdk/android-3.0-highlights.html
http://developer.android.com/guide/topics/ui/actionbar.html
tracking-fennec: --- → ?
tracking-fennec: ? → 6+
Attached patch WIP (obsolete) — Splinter Review
This works, probably needs a little testing and polishing.
Status: NEW → ASSIGNED
Whiteboard: [has wip]
tracking-fennec: 6+ → 7+
Attached patch WIP 2 (obsolete) — Splinter Review
To do:
* "Home" button.
* Tab list in arrowbox (WIP patch has a dummy/placeholder)
* Need a real icon for the tab button.
Attachment #533428 - Attachment is obsolete: true
Depends on: 664149
Attached patch WIP 3 (obsolete) — Splinter Review
This adds an arrowbox popup for the tab list.  The tabs do not actually appear, however, because of some CSS or XBL issue I haven't figured out yet.  The latest mockups replace this popup with a sidebar, which might be easier to implement anyway...
Attachment #533788 - Attachment is obsolete: true
Keywords: uiwanted
Attached patch part 1 (obsolete) — Splinter Review
This is a minimal patch to change the urlbar into a fixed "action bar" with buttons for tabs, back/forward, and bookmark.  It removes the right sidebar, but keeps tabs in the left sidebar.

Test build at http://people.mozilla.com/~mbrubeck/fennec-action-bar.apk

TODO (in followup patches):

* Artwork/styling.
* Add a button and popup for the app menu.
* Make the <browser> shorter so it can't scroll behind the action bar.  (This especially affects pages that use touch events.)
* Re-style the tab bar to be a vertical list with thumbnails and titles.
Attachment #539233 - Attachment is obsolete: true
Attachment #539352 - Flags: review?(mark.finkle)
Comment on attachment 539352 [details] [diff] [review]
part 1

* Remove dump in toggleTabSidebar
* Add changes to /core/gingerbread/browser.css as well
Attachment #539352 - Flags: review?(mark.finkle) → review+
Blocks: 664149
No longer depends on: 664149
Attached patch part 1.1 (obsolete) — Splinter Review
This patch takes a first run at adding a menu-button in tablet mode. Bit disappointed that the arrowbox loses its call-out when you set the position, need to find why...

Also, menu items added by extensions end up with the label reading 'undefined'. Probably a bigger issue than the missing call-out.
Attachment #541491 - Flags: review?(mark.finkle)
This moves the "tabs" button to the right, and turns the tab sidebar into a floating panel on the right-hand side of the screen.  This patch is a work-in-progress.  It's functional, but needs some cleanup before review.
Attached patch part 2.1 (obsolete) — Splinter Review
Updated menu-adding patch that applies over the top of the part 2 patch and fixes a couple of bugs.
Attachment #541491 - Attachment is obsolete: true
Attachment #541491 - Flags: review?(mark.finkle)
Just starting to look at this project. 

Something that I use in FF3/4 a LOT is CTRL+F to find in page. Some users
configure preferences to start search upon user typing. Currently "Find in page"
is a menu item. I would like to see it as a dedicated or optional button
(n00b question: will the Action Bar be customizable as in FF4?), and/or 
a menu choice on a popup menu (if present) on press-and-hold on html page.

I'm not aware of any built-in Honeycomb method for search, so if we're 
shooting for a rigidly Honeycomb-like action this could be out of scope.
Attached patch part 3: Fix viewport height (obsolete) — Splinter Review
This is now working; it fixes some scrolling and content-size issues.  I think I want to clean it up a bit too before asking for review.
Something about the part 2 patch breaks things in browser.js, for me - you get the error "Error: this._chromeTab.updateThumbnail is not a function", and pages appear to either never stop loading or never start. It also breaks session restore.

My guess is that "this._chromeTab = document.getElementById("tabs").addTab();" in browser.js isn't working for some reason, but I don't really know yet, and I don't see how anything in part 2 could break this, but it does (everything is fine before applying that patch).

Maybe there's a reliance on document structure somewhere?
Having played a bit more, it seems the thumbnailing breaks if the tab-bar hasn't been visible at some point (so if you remove the initial hide in resizeHandler, everything works).

Is this some kind of lazy-creation in XUL going on? Can we override it?
The problem appears to be that XBL isn't bound to hidden elements - Apparently this can be solved by flushing the style before hiding...

Trying to figure out where and what to flush, but I suppose we didn't hit this before because we were moving it out of the way rather than hiding it.
For now, I can't think of a trivial way to fix this other than using some other method to hide the tab side-bar, or not using XBL to define tab methods.

The problem is with the tab side-bar being hidden when a tab is created - if that's the case, the XBL won't bind on the created tab, and there's no way I know of to force this without first unhiding its tab-list ancestor.
try using collapse instead of hidden, or just set width/height to zero
Indeed, setting collapsed instead of hidden has the same effect and doesn't break XBL binding. Thanks!
This rolls together my original part 2 patch, plus Chris's "collapsed" change and some other fixes.
Attachment #541552 - Attachment is obsolete: true
Attachment #542196 - Attachment is obsolete: true
Attachment #542546 - Flags: review?(mark.finkle)
Addresses review comments.  Carrying r=mfinkle.
Attachment #539352 - Attachment is obsolete: true
Attachment #542598 - Flags: review+
Just adding a checkin comment.
Attachment #542546 - Attachment is obsolete: true
Attachment #542546 - Flags: review?(mark.finkle)
Attachment #542599 - Flags: review?(mark.finkle)
Attached patch part 3 (v2): Fix viewport height (obsolete) — Splinter Review
Attachment #542600 - Flags: review?(mark.finkle)
Attachment #541854 - Attachment is obsolete: true
Comment on attachment 541576 [details] [diff] [review]
part 2.1

Let's move this patch to bug 664149.
Attachment #541576 - Attachment is obsolete: true
Comment on attachment 542599 [details] [diff] [review]
part 2 (v2): move tab sidebar to the right

Some TODOs found while testing this patch:

* Tab bar is not treated as a popup (does not dismiss with the back button or tapping elsewhere) - should use pushPopup/popPopup to fix this.
* Tab bar sometimes has the wrong height.
* "New tab opened" notification popup no longer appears.
Attachment #542599 - Flags: review?(mark.finkle)
Fix popup behavior and resizing issues, and make sure Gingerbread theme is updated too.
Attachment #542599 - Attachment is obsolete: true
Attachment #543257 - Flags: review?(mark.finkle)
Add missing file.
Attachment #543257 - Attachment is obsolete: true
Attachment #543257 - Flags: review?(mark.finkle)
Attachment #543265 - Flags: review?(mark.finkle)
Attached patch part 3 (v3): fix viewport height (obsolete) — Splinter Review
Rebase on top of part 1+2, and make sure it fixes Gingerbread theme too.

There is an updated test build for Android at http://people.mozilla.com/~mbrubeck/fennec-action-bar-2.apk
Attachment #542600 - Attachment is obsolete: true
Attachment #542600 - Flags: review?(mark.finkle)
Attachment #543268 - Flags: review?(mark.finkle)
Attachment #543268 - Attachment description: part 3 → part 3 (v3): fix viewport height
Attached patch part 3 (v4): Fix viewport height (obsolete) — Splinter Review
Fixed a stupid bug in the last patch that broke panning in non-tablet mode.
Attachment #543268 - Attachment is obsolete: true
Attachment #543268 - Flags: review?(mark.finkle)
Attachment #543281 - Flags: review?(mark.finkle)
TODO: NewTabPopup still needs some changes to work in tablet mode.
Attachment #543265 - Flags: review?(mark.finkle) → review+
Attachment #543281 - Flags: review?(mark.finkle) → review+
tracking-fennec: 7+ → 8+
For whatever reason, part 1 of this patch now breaks input on about pages.
The breakage is due to the change of the this.canCancelPan variable - If you remove the || Utils.IsTablet() from the end of its calculation, it works again. I'm not exactly sure what this variable is used for exactly, so I don't know if this change is necessary or not.
Attached patch part 4: Add a preference (obsolete) — Splinter Review
This adds a preference "browser.ui.layout.tablet" that can be used to force "tablet mode" on or off.  By default it will be enabled based on the screen size, just as it is now.

This affects only the changes to the main browser UI in this bug; it does not override previous tweaks we've made to large-screen behavior, like the pref styles or the form helper behavior.  The main goal is to be able to check in this code and easily disable it until it is ready to ship.
Attachment #550530 - Flags: review?(mark.finkle)
Comment on attachment 550530 [details] [diff] [review]
part 4: Add a preference

This patch isn't quite complete yet.
Attachment #550530 - Flags: review?(mark.finkle)
Attached patch part 1Splinter Review
Just rebasing the existing patches, and copying some changes from the default theme to the gingerbread theme that were missed before.
Attachment #550899 - Flags: review+
Attached patch part 2Splinter Review
Attachment #550900 - Flags: review+
Attached patch part 3Splinter Review
Attachment #542598 - Attachment is obsolete: true
Attachment #543265 - Attachment is obsolete: true
Attachment #543281 - Attachment is obsolete: true
Attachment #550902 - Flags: review+
Add a preference "browser.ui.layout.tablet" that can be used to force the tablet layout on (1) or off (0).  When we ship the feature it will default to -1, which will enable tablet mode automatically based on the screen size.  For now it defaults to 0.

My plan is to check in parts 1-4 immediately, then file followup bugs for the remaining issues, visual polish, and any design changes we make.  We can change the pref as we decide to enable this in the various nightly and release channels.
Attachment #550530 - Attachment is obsolete: true
Attachment #550903 - Flags: review?(mark.finkle)
Attachment #550903 - Flags: review?(mark.finkle) → review+
Some browser-chrome tests need to be changed to work with these patches.
(In reply to comment #36)
> Some browser-chrome tests need to be changed to work with these patches.

Nope, I was wrong.  No regressions found on TryServer.

Pushed to inbound as a single folded patch containing parts 1-4.  This bug will be resolved when the patch lands; I'll file bugs next week for all of the known follow-up work.

https://hg.mozilla.org/integration/mozilla-inbound/rev/3e764c25c144
Whiteboard: [has wip] → [inbound]
http://hg.mozilla.org/mozilla-central/rev/3e764c25c144
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 8
Depends on: 677109
No longer depends on: 677109
Blocks: 677669
Depends on: 677670
Depends on: 678108
Samsung Galaxy Tab 10.1
Mozilla/5.0 (Android, Linux armv7l; rv:9.0a1) Gecko/20110906 Firefox/9.0a1 Fennec/9.0a1
Status: RESOLVED → VERIFIED
No longer blocks: 653136
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: