Closed Bug 896887 Opened 11 years ago Closed 11 years ago

Hide the menu bar by default on Linux

Categories

(Firefox :: Toolbars and Customization, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: jhorak, Assigned: jhorak)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:P3][Australis:M9])

Attachments

(1 file, 3 obsolete files)

Fedora would like to hide menubar by default and replace it by browser button. To do it by clean way we need about:config preference to set system wide toolbar-menubar's autohide attribute (only for new profiles).

Reference bug:
https://bugzilla.redhat.com/show_bug.cgi?id=981660
Actually, what's keeping us from making it the default everywhere?
We're going to make it default in Fedora...so +1 for default everywhere.
(that being said, you can probably set it hidden for new profiles through the default localstore.rdf)
(In reply to Mike Hommey [:glandium] from comment #1)
> Actually, what's keeping us from making it the default everywhere?

Keyboard accessibility. Linux doesn't show the menu bar when pressing Alt, you need to press Alt+[letter] without a hint what letter that might be. I believe F10 works, though, but that's not a widely known key among users.
So if Alt key shows menubar in Linux we can make it default, right? Is the only blocker?
(In reply to jhorak from comment #5)
> So if Alt key shows menubar in Linux we can make it default, right? Is the
> only blocker?

AFAIK, yes.
I see that ui.key.menuAccessKeyFocuses preference when set to true shows menu when Alt key is pressed. It's enabled for Windows here: 
http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js#2514

There might be some drawback though. It works even When menubar is not hidden (ie. it popups File menu). I'm not sure if this is an error or desired behaviour. Please let me know if that's need to be fixed.
(In reply to jhorak from comment #7)
> I see that ui.key.menuAccessKeyFocuses preference when set to true shows
> menu when Alt key is pressed. It's enabled for Windows here: 
> http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.
> js#2514
> 
> There might be some drawback though. It works even When menubar is not
> hidden (ie. it popups File menu). I'm not sure if this is an error or
> desired behaviour. Please let me know if that's need to be fixed.

I suspect that desired behavior, but I don't know.
Summary: Make default toolbar-menubar autohide attribute configurable by preference → Make application button default on Linux
Attached patch Make app button default on Linux (obsolete) — Splinter Review
Patch will make application button default on Linux and hides menubar for new profiles. It also ui.key.menuAccessKeyFocuses to true on Linux to allow access to menubar by Alt key.
Attachment #789588 - Flags: review?(jaws)
Attached patch Firefox-button.patch (obsolete) — Splinter Review
Fixed comment in patch.
Attachment #789588 - Attachment is obsolete: true
Attachment #789588 - Flags: review?(jaws)
Attachment #789589 - Flags: review?(jaws)
A few comments:
- XP_UNIX is also defined on OSX
- do we really need an overlay to do this?
- do we really want to do this now, given that Australis is around the corner?
Does australis change the application button code?
(In reply to Mike Hommey [:glandium] from comment #12)
> Does australis change the application button code?

Yes, Australis removes the application button completely in favour of a new menu button that appears at the end of the nav-bar (right-most end for LTR locales, left-most end for RTL).
(In reply to Mike Conley (:mconley) from comment #13)
> (In reply to Mike Hommey [:glandium] from comment #12)
> > Does australis change the application button code?
> 
> Yes, Australis removes the application button completely in favour of a new
> menu button that appears at the end of the nav-bar (right-most end for LTR
> locales, left-most end for RTL).

In addition, all users regardless of menu-bar visibility will have the menu button available.

Mike: With that said, is the menu-bar going to be hidden by default on Linux with Australis? I think fixing this bug might still be needed.
Flags: needinfo?(mconley)
(In reply to Jared Wein [:jaws] from comment #14)
> (In reply to Mike Conley (:mconley) from comment #13)
> > (In reply to Mike Hommey [:glandium] from comment #12)
> > > Does australis change the application button code?
> > 
> > Yes, Australis removes the application button completely in favour of a new
> > menu button that appears at the end of the nav-bar (right-most end for LTR
> > locales, left-most end for RTL).
> 
> In addition, all users regardless of menu-bar visibility will have the menu
> button available.
> 
> Mike: With that said, is the menu-bar going to be hidden by default on Linux
> with Australis? I think fixing this bug might still be needed.

If this[1] is what it looks like on Fedora by default, then yes, I think hiding the menubar by default (and showing the whole thing with a sole press of Alt) is the right call. That's way too much stuff at the top of the window.

That's my position on the matter, anyhow.

[1]: http://i.imgur.com/ttgXZk3.png
Flags: needinfo?(mconley)
Comment on attachment 789589 [details] [diff] [review]
Firefox-button.patch

(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #11)
> A few comments:
> - XP_UNIX is also defined on OSX
> - do we really need an overlay to do this?

Please address these issues.

> - do we really want to do this now, given that Australis is around the
> corner?

Even with the new Australis menu button, we'll need to make some changes here, so this bug should still get fixed.
Attachment #789589 - Flags: review?(jaws)
(In reply to Jared Wein [:jaws] from comment #16)
> > - do we really want to do this now, given that Australis is around the
> > corner?
> 
> Even with the new Australis menu button, we'll need to make some changes
> here, so this bug should still get fixed.

I don't see how this answers Gavin's question.

The question is whether we should introduce the Firefox button to Linux users only to replace it with the panel menu thingy a few versions later.
This patch is required also for Australis to hide menubar. Otherwise it is still visible when instance is started with new profile.
Again, that wasn't the question. Anyway, I'll take this as agreement that this should wait for Australis.
Summary: Make application button default on Linux → Hide the menu bar by default on Linux
Attached patch Firefox-button patch v2 (obsolete) — Splinter Review
Attaching simpler patch without overlaying.
Attachment #789589 - Attachment is obsolete: true
Attachment #793426 - Flags: review?(jaws)
Comment on attachment 793426 [details] [diff] [review]
Firefox-button patch v2

>--- a/browser/base/content/browser.xul
>+++ b/browser/base/content/browser.xul
>@@ -426,16 +426,19 @@
>     <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
>              defaultset="menubar-items"
>              mode="icons" iconsize="small" defaulticonsize="small"
>              lockiconsize="true"
> #ifdef MENUBAR_CAN_AUTOHIDE
>              toolbarname="&menubarCmd.label;"
>              accesskey="&menubarCmd.accesskey;"
> #endif
>+#ifdef XP_LINUX
>+             autohide="true"
>+#endif

Please put these new lines inside the MENUBAR_CAN_AUTOHIDE ifdef (which, unlike XP_LINUX, depends on the toolkit).

>--- a/modules/libpref/src/init/all.js
>+++ b/modules/libpref/src/init/all.js
>@@ -3864,16 +3864,18 @@ pref("print.postscript.print_command", "
> // 2 problems:
> // 1. The non-topmost panel steals focus from its parent window at showing.
> // 2. The parent of non-topmost panel is not activated when the panel is hidden.
> // So, we have no reasons we should use non-toplevel window for popup.
> pref("ui.panel.default_level_parent", true);
> 
> pref("mousewheel.system_scroll_override_on_root_content.enabled", false);
> 
>+pref("ui.key.menuAccessKeyFocuses", true);

It seems like you'll need to update http://mxr.mozilla.org/mozilla-central/source/accessible/tests/mochitest/events/test_focus_general.html?force=1#99 and http://mxr.mozilla.org/mozilla-central/source/accessible/tests/mochitest/events/test_menu.xul#156.
Thank you for fast review. Attaching patch addressing mentioned stuff.
Attachment #793426 - Attachment is obsolete: true
Attachment #793426 - Flags: review?(jaws)
Attachment #793471 - Flags: review?(dao)
Attachment #793471 - Flags: review?(dao) → review+
Whiteboard: [Australis:P?][Australis:M?]
Dao, is this ready to land on UX?
Assignee: nobody → jhorak
Status: NEW → ASSIGNED
Flags: needinfo?(dao)
Hardware: x86_64 → All
Whiteboard: [Australis:P?][Australis:M?] → [Australis:P3][Australis:M?]
Version: unspecified → Trunk
(In reply to Jared Wein [:jaws] from comment #23)
> Dao, is this ready to land on UX?

Sure.
Flags: needinfo?(dao)
https://hg.mozilla.org/projects/ux/rev/945af538c076
Whiteboard: [Australis:P3][Australis:M?] → [Australis:P3][Australis:M9][fixed-in-ux]
https://hg.mozilla.org/mozilla-central/rev/945af538c076
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:P3][Australis:M9][fixed-in-ux] → [Australis:P3][Australis:M9]
Target Milestone: --- → Firefox 28
Blocks: 940228
Depends on: 940669
But you don't use Gnome shell Application menu either.
Depends on: 966683
Depends on: 971011
Depends on: 1044170
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: