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

Make rebind of CommandPalette optional #65

Merged
merged 2 commits into from
Feb 12, 2021
Merged

Conversation

planger
Copy link
Member

@planger planger commented Feb 9, 2021

container.rebind(CommandPalette).to(TheiaCommandPalette);
if (container.isBound(CommandPalette)) {
container.rebind(CommandPalette).to(TheiaCommandPalette);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but shouldn't we do a "normal" bind if it is not already bound?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think it doesn't really make sense to bind it if the CommandPalette isn't bound. If it isn't bound, the diagram editor doesn't want to have one, so we shouldn't then bind the TheiaCommandPalette either. Wdyt?

Copy link
Contributor

@martin-fleck-at martin-fleck-at Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, sorry, I somehow was not thinking about that! You are absolutely right! Or is there a way to bind an "empty" command palette? @tortmayr

Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retested this change with the current master and everything still works very well. It seems that the popup now also vanishes already when opening the context menu but this may also be due to the Theia update. Nevertheless, everything still works fine, please just remove the last commit as the yarn.lock on master is now the correct one.

@planger
Copy link
Member Author

planger commented Feb 12, 2021

Thanks @martin-fleck-at! I force-pushed the single-commit without the yarn.lock change.

Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you very much Philip!

@martin-fleck-at martin-fleck-at merged commit 62d6d86 into master Feb 12, 2021
@martin-fleck-at martin-fleck-at deleted the planger/issues/188 branch February 12, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make rebind of CommandPalette in Theia optional if CommandPalette isn't bound
3 participants