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

Menu at the end of the screen renders outside #207

Closed
hbcarlos opened this issue Jul 22, 2021 · 5 comments
Closed

Menu at the end of the screen renders outside #207

hbcarlos opened this issue Jul 22, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@hbcarlos
Copy link
Member

I'm not sure if this is a bug or not.

Problem

The lumino Menu has an option in its method open to force the position of the menu. The problem is that this option is activated by default when the MenuBar calls this method on one of its child menus.

See:

newMenu.open(left, bottom, { forceX: true, forceY: true });

This makes the menu to render outside the viewport when positioning the menu at the right part of the screen.
See the top-right menu on the following image:
bad-menu

After removing the option force:
solved

Proposed Solution

Can we add an option on the constructor of the MenuBar to configure this when creating a new menubar?
Here:
https://github.com/hbcarlos/lumino/blob/a105b6f62d7e630ec2bc0095507fc7547ba29629/packages/widgets/src/menubar.ts#L710

Additional context

@hbcarlos hbcarlos added the enhancement New feature or request label Jul 22, 2021
@welcome
Copy link

welcome bot commented Jul 22, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@fcollonval
Copy link
Member

I did something similar for the ContextMenu in https://github.com/jupyterlab/lumino/pull/203/files#diff-3d07da50d2685605691ccf143d09bb0dcf713f3970255e6699c7fd3903d612cb

Don't hesitate to push a PR.

@hbcarlos
Copy link
Member Author

Thx Frédéric!! Opening a PR right now.

@krassowski
Copy link
Member

Can we close this one?

@hbcarlos
Copy link
Member Author

Yes, sorry. I forgot!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants