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

Command palette overlaps the pull-down menus #6847

Closed
lmcbout opened this issue Jan 8, 2020 · 4 comments · Fixed by #7136
Closed

Command palette overlaps the pull-down menus #6847

lmcbout opened this issue Jan 8, 2020 · 4 comments · Fixed by #7136
Labels
enhancement issues that are enhancements to current functionality - nice to haves help wanted issues meant to be picked up, require help menus issues related to the menu

Comments

@lmcbout
Copy link
Contributor

lmcbout commented Jan 8, 2020

Description

WE should close the opened pull-down menu when activating the command palette, so they do not overlap.

Reproduction Steps

-Open any pull-down menu (File, Debug, View ...

OS and Theia version:
Ubuntu 16.04
Theia: latest master
Chrome

Diagnostics:

OverlapCommandPulldownMenu

@vince-fugnitto vince-fugnitto added enhancement issues that are enhancements to current functionality - nice to haves menus issues related to the menu labels Jan 8, 2020
@garethwhittaker
Copy link
Contributor

I can take a look at implementing this enhancement and provide an update later in the week.

@akosyakov akosyakov added the help wanted issues meant to be picked up, require help label Feb 4, 2020
@akosyakov
Copy link
Member

After #6843, the pulldown menu does not get refresh after selecting some toggling options.

that sound quite bad, @vince-fugnitto did you notice it as well. Does it mean that for toggle menu items we don't show a proper state anymore in menus?

@vince-fugnitto
Copy link
Member

I believe I mentioned in person that the menu should be dismissed if the quick-open is triggered.
I believe it is a similar behavior present in VS Code and will limit the problems we might encounter.

@garethwhittaker
Copy link
Contributor

Hi there,

I've now spent some time looking around the menu and command palette related code.
The command palette keybindings and action are defined in QuickCommandFrontendContribution.

quick-command-contribution.ts

    registerCommands(commands: CommandRegistry): void {
        commands.registerCommand(quickCommand, {
            execute: () => this.quickOpenService.open('>')
        });

I'm not sure if modifying the action is actually the best approach here so I've not opened a pull request and thought it best to discuss. This is the change I've made in my fork, which does now close an active menu when opening the command palette.

my preliminary update

    @inject(BrowserMenuBarContribution)
    protected readonly browserMenuBarContribution: BrowserMenuBarContribution;

    registerCommands(commands: CommandRegistry): void {
        commands.registerCommand(quickCommand, {
            execute: () => {
                if (this.browserMenuBarContribution.menuBar) {
                    const activeMenu = this.browserMenuBarContribution.menuBar.activeMenu;
                    if (activeMenu) {
                        activeMenu.close();
                    }
                }


                return this.quickOpenService.open('>');
            }
        });

Any feedback / pointers would be greatly appreciated.

Thanks.

akosyakov pushed a commit that referenced this issue Feb 20, 2020
Fixes: #6847

Signed-off-by: Gareth Whittaker <garethwhittaker@hotmail.com>
JesterOrNot pushed a commit to JesterOrNot/theia that referenced this issue Mar 12, 2020
Fixes: eclipse-theia#6847

Signed-off-by: Gareth Whittaker <garethwhittaker@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves help wanted issues meant to be picked up, require help menus issues related to the menu
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants