lumino icon indicating copy to clipboard operation
lumino copied to clipboard

Support host and ref options in Menu.open

Open ianthomas23 opened this issue 1 year ago • 7 comments
trafficstars

Implements enhancement #699.

This exposes the Widget.attach optional arguments host and ref in Menu.IOptions to provide greater control over exactly where in the DOM the menu div is attached.

I have kept the names and descriptions of the options the same as in Widget.attach.

ianthomas23 avatar Apr 26 '24 10:04 ianthomas23

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

welcome[bot] avatar Apr 26 '24 10:04 welcome[bot]

You will need to run yarn run api and commit changes.

krassowski avatar Apr 26 '24 10:04 krassowski

in addition to the API update, you will need to lint the code with yarn lint. One of the tests is failing due to

[warn] packages/widgets/tests/src/menu.spec.ts

fcollonval avatar Apr 26 '24 12:04 fcollonval

Thanks for the guidance @krassowski and @fcollonval. I've added the extra documentation to Menu.open, although it could possibly be added to IOpenOptions instead, as that was my entry point into the docs. I've also switched the || to ?? in the new code whilst I was there.

ianthomas23 avatar Apr 26 '24 16:04 ianthomas23

I cannot tell if the failing macos-latest webkit-headless CI run is something that I have caused or if it is unrelated.

ianthomas23 avatar Apr 29 '24 08:04 ianthomas23

I cannot tell if the failing macos-latest webkit-headless CI run is something that I have caused or if it is unrelated.

This is due to flakiness - I let @krassowski have a second look.

fcollonval avatar Apr 29 '24 08:04 fcollonval

gentle ping to @krassowski

fcollonval avatar May 17 '24 15:05 fcollonval

Congrats on your first merged pull request in this project! :tada: congrats Thank you for contributing, we are very proud of you! :heart:

welcome[bot] avatar May 19 '24 08:05 welcome[bot]