Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Ability to auto hide menubar #1752

Closed

Conversation

DhammaExplorer
Copy link

Sets whether the window menu bar should hide itself automatically. Once set the menu bar will only show when users press the single Alt key, from https://electronjs.org/docs/api/browser-window#winsetautohidemenubarhide

Sets whether the window menu bar should hide itself automatically. Once set the menu bar will only show when users press the single Alt key, from https://electronjs.org/docs/api/browser-window#winsetautohidemenubarhide
@tessus
Copy link
Collaborator

tessus commented Jul 18, 2019

Hmm, I don't think you can just change the UI without an option. You have to give people a choice.

@Outi-s
Copy link

Outi-s commented Jul 18, 2019

It's a common UI design initiative, hiding menu bar that is. If it doesn't break anything, there shouldn't be any problem.

On smaller/portable devices it'll save space too. And the whole thing is an alt away.

@laurent22
Copy link
Owner

Personally I wouldn't want the menu bar to be hidden. Do you have an example of app that does this and how they provide the option to the user?

@Outi-s
Copy link

Outi-s commented Jul 18, 2019

@laurent22 in Windows alt is either used for showing Menu Bar or to switch to it. Even in Windows Explorer.

Menu bar takes up space. For people with 11-13 inch laptops, that is precious space. Functionality of the menu bar can be accessed through a key anyway. What's the harm?

@laurent22
Copy link
Owner

Menu bar takes up space. For people with 11-13 inch laptops, that is precious space. Functionality of the menu bar can be accessed through a key anyway. What's the harm?

How about people who don't know they can press the Alt key for this? How about those who prefer to always show the menu bar?

@Outi-s
Copy link

Outi-s commented Jul 18, 2019

@laurent22 updated readme. Toggle in options?

@DhammaExplorer
Copy link
Author

DhammaExplorer commented Jul 18, 2019

Yes, I agree that the current implementation might be a problem for some users. There are three routes to go:

  1. Create a checkbox 'Auto-hide menu bar' option at 'General Options' with 'false' as default and load the config from the store at the app wrapper
  2. Call the auto-hide method after the window is open. It will only hide after the alt key is clicked, instead of the current behavior
  3. Forget about it. I can patch the files before installing.

Which route is the best?

@laurent22
Copy link
Owner

@laurent22 updated readme.

"Just add some doc" is an answer that's coming up frequently here, but I'm not very keen on this. I prefer to build an app that's usable to begin with, even without doc, and with features that can be discovered via menu, buttons, etc.

Toggle in options?

Maybe, but I'm curious how other apps provide the option. Is that usually in the View menu, or in the config screen?

@Outi-s
Copy link

Outi-s commented Jul 18, 2019

I am not sure about how other OS do this but I think Window users are fairly familiar with the hit alt to view menubar scenario.

It's in View menu sometimes, yes. We hit alt, go to the View menu option, check or uncheck Hide Menubar option. When it's not hidden, alt just switches the focus to menubar.

@DhammaExplorer
Copy link
Author

Maybe, but I'm curious how other apps provide the option. Is that usually in the View menu, or in the config screen?

Forgot the fourth option:

  1. Add an Auto-hide toggle in the View menu.

@tessus
Copy link
Collaborator

tessus commented Jul 18, 2019

Also, what happens on macOS? There's no menu bar attached to the app ayway...

@DhammaExplorer
Copy link
Author

Also, what happens on macOS? There's no menu bar attached to the app ayway...

Do you have a macOS to test it?

I had to auto-hide here because of a HiDPI small screen. When I zoom with the internal config, the UI is not pleasant:

image

Things look better starting with GDK_SCALE, but the menu is huge:

image

alt seems like a good solution for my case.

@tessus
Copy link
Collaborator

tessus commented Jul 18, 2019

Do you have a macOS to test it?

Yep, nothing happens on macOS. I guess because the menubar on mac is not attached to the window.

In any case, IMO there must be an option, because we can't just remove it for everyone. What did Laurent say?

@DhammaExplorer
Copy link
Author

Do you have a macOS to test it?

Yep, nothing happens on macOS. I guess because the menubar on mac is not attached to the window.

In any case, IMO there must be an option, because we can't just remove it for everyone. What did Laurent say?

I agree with you. IMO, a toggle within the View menu would be the best, since it already has 2 other toggles.

I can work on the implementation, if this feature is of interest.

@laurent22, what do you think about it?

@laurent22
Copy link
Owner

I agree with you. IMO, a toggle within the View menu would be the best, since it already has 2 other toggles.

I can work on the implementation, if this feature is of interest.

@laurent22, what do you think about it?

Yes I think in the View menu it makes sense. For example it could be a new item called "Toggle menu bar auto-hide".

@tessus
Copy link
Collaborator

tessus commented Aug 6, 2019

What's the status of this?

@tessus tessus added the desktop All desktop platforms label Aug 6, 2019
@DhammaExplorer
Copy link
Author

Domant status, @tessus. I'll give a feedback this week with an estimated time of completion.

@telphan
Copy link

telphan commented Sep 25, 2019

What is the status of this feature? Was it dropped?

@tessus
Copy link
Collaborator

tessus commented Sep 25, 2019

@telphan the OP closed the PR without further notice, so yep, it’s dead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop All desktop platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants