-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Move MenuBar index check to an overridable method #733
base: main
Are you sure you want to change the base?
Conversation
Added a protected isValidIndex method to the MenuBar class to handle index validation before setting an index. This enables adopters to customize the validation logic, e.g., for supporting dynamic menus that may initially be empty. Resolves jupyterlab#729
Let me know whether I can do anything to help resolve the errors in the CI |
@krassowski I pushed the linter fix as a separate commit. If you prefer squashed commits, I can also happily do that |
Separate commits work well, we can squash on merge. To fix I am not sure why |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thank you @sdirix!
@krassowski Please wait with the merge. While this fix enables us to build our menus, I just realized that there are some usability edge cases remaining, e.g. the menus can be opened but do not react on hover. I had a quick glance at the code base: There are more places in which I'll come back to you. Sorry for the inconvenience! |
Added a protected isValidIndex method to the MenuBar class to handle index validation before setting an index.
This enables adopters to customize the validation logic, e.g., for supporting dynamic menus that may initially be empty.
Resolves #729