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

Fixed FeatherGridContextMenu placement in jupyter notebook and voila #441

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

alphaparrot
Copy link

Issue number of the reported bug or feature request: #422

Describe your changes
Added a section of code that repositions the FeatherGridContextMenu widget to the actual click location, using the geometry of the page and document body. This fixes the bug in #422 (and also the original bug, documented in voila-dashboards/voila#930), which is caused by changes in Lumino originally proposed in jupyterlab/lumino#329 (comment), along with the retention of absolute positioning for this element in ipydatagrid.

Testing performed
Tested in two different notebooks (one bare-bones/MWE and one full-featured from a production setting) in jupyter notebook and voila (see attached image for example from barebones notebook). If page content changes immediately as a result of opening the filter dialog (such as an output widget getting cleared), this will cause the context menu to appear out of position. This could potentially be remedied by repositioning the menu a second time after the menu is fully opened, but this is likely to be excessive and not a good solution to that particular problem.

image

In the future, a departure from absolute positioning may be required, which may obviate the need for a repositioning operation here.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

Thank you! This is indeed not great to have to workaround this behavior, we may still want to open an issue to upstream lumino to track this

@martinRenou
Copy link
Member

martinRenou commented Sep 7, 2023

It is required that you signoff all of your commits before we can merge.

For example you can signoff your latest commit with:

git commit --amend --signoff 

@alphaparrot
Copy link
Author

Whoops, sorry about that. I think that should be fixed now.

Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

… page.

Fix involves correcting Lumino math that forces nonnegative y-coordinates.

Signed-off-by: Adiv Paradise <aparadise@muellerwp.com>
Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

None yet

3 participants