Skip to content

Hide Menu Bar #8932

Closed
Closed

Description

@392781

Allow users to hide the jarring unthemed menu bar. Nearly every editor out there has this option, RStudio should too. As an example, VS Code allows for convenient unhiding by pressing "Alt" key.

How it would look in RStudio:

Before:
image

After:

image

My personal version information:

RStudio Edition : Desktop
RStudio Version : 1.4.1103
R Version       : 4.0.3
OS Version      : Linux Mint 20

Activity

  1. ronblum commented on Feb 9, 2021

    @ronblum
    Contributor

    @392781 Thank you for the suggestion! We'll review it as we continue development of RStudio. By the way, what version of RStudio and OS are you using?

  2. 392781 commented on Feb 9, 2021

    @392781
    Author

    @ronblum Added it to original issue request. Also this request is tangentially related to #3243 (that issues refers to Windows only, my proposition is crossplatform).

  3. gtritchie commented on Feb 11, 2021

    @gtritchie
    Member

    We should get this very inexpensively with Electron, see:

    autoHideMenuBar Boolean (optional) - Auto hide the menu bar unless the Alt key is pressed. Default is false.
    

    https://www.electronjs.org/docs/all#new-browserwindowoptions

  4. added this to the v1.5 milestone on Feb 11, 2021
  5. gtritchie commented on Mar 30, 2022

    @gtritchie
    Member

    For Electron, on Linux and Windows (but not Mac):

    • add a checkbox to Global Options / General / Other: "Hide menu bar until Alt-key pressed"
    • default should be unchecked (menu always visible, current behaviour)
    • the value of this setting is used to set the autoHideMenuBar flag when constructing the main-window, and it can also be modified at runtime via win.setMenuBarVisibility()
  6. 26 remaining items

  7. modified the milestones: Backlog-1, Later on Sep 26, 2023
  8. timtmok commented on Nov 21, 2023

    @timtmok
    Contributor

    I did add my fix to this branch: https://github.com/rstudio/rstudio/tree/feature/autohide-electron-menubar

    It seemed to work for me but it didn't work for Gary. The branch is probably quite stale now. I'll target this for next release to see if there's time to figure out what's going on.

    Gary has updated the branch and doesn't see the problem anymore. I've added it to the next release.

  9. self-assigned this
    on Nov 21, 2023
  10. gtritchie commented on Nov 21, 2023

    @gtritchie
    Member

    I need to address the menu appearing in secondary windows (e.g. popped-out editors) when you tap Alt. We don't want to show the menubar on secondary windows!

  11. gtritchie commented on Nov 21, 2023

    @gtritchie
    Member

    Gary has updated the branch and doesn't see the problem anymore. I've added it to the next release.

    Waiting a couple of years and trying again is an unconventional but sometimes successful strategy.

  12. ronblum commented on Mar 6, 2024

    @ronblum
    Contributor

    Tested in RStudio Desktop 2024.04.0-daily+537 on Red Hat 9.3 and Windows 11.

    Works

    • Click on Alt makes the menu appears and disappears
    • Toggle state (checked/unchecked) persists after shutting down and restarting RStudio
    • Option is unchecked by default

    Issue 1

    1. Turn on menu hiding
    2. Make the menu appear
    3. In the Console Pane, use a keyboard shortcut, for example type Alt+- to insert the assignment operator
      • The assignment operator <- appears
      • The menu disappears
      • This only happens if the menu is shown. If it's hidden, doing this doesn't unintentionally unhide it.

    Issue 2

    1. Turn on menu hiding
    2. Make the menu appear
    3. Click anywhere with the moues
      • Clicking the mouse makes the menu disappear
  13. gtritchie commented on Mar 6, 2024

    @gtritchie
    Member

    @ronblum

    Make the menu appear. Clicking the mouse makes the menu disappear

    That is by design and is the built-in behaviour of Electron. Visual Studio code does the same (I only tested on Windows, with the menubar set to "Toggle").

    Make the menu appear... use a shortcut like Alt+- to insert the assignment operator... the menu disappears

    Also by design, and also happens in Visual Studio Code.

  14. gtritchie commented on Mar 6, 2024

    @gtritchie
    Member

    The idea with menubar hiding is that it is only shown briefly (i.e. when you are using the menu to find and select a command). It isn't meant to be something you can toggle on with "Alt" and keep around while you do other things.

  15. ronblum commented on Mar 7, 2024

    @ronblum
    Contributor

    Aha! Then verified that this all works correctly. 👍

  16. 392781 commented on May 17, 2024

    @392781
    Author

    Thanks y'all :^) Just downloaded the April release and it works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions