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

Options of CompositeMenuNode are not actually updated in updateOptions #12948

Closed
ndoschek opened this issue Sep 27, 2023 · 0 comments · Fixed by #13425
Closed

Options of CompositeMenuNode are not actually updated in updateOptions #12948

ndoschek opened this issue Sep 27, 2023 · 0 comments · Fixed by #13425
Milestone

Comments

@ndoschek
Copy link
Contributor

Bug Description:

In my use case, I want to reuse the context menu to configure an element.
This is done via a toggleable menu item.
To improve usability, I want to propagate the configuration state to its containing parent submenu by adding an iconClass.
I noticed, that the updateOptions function in the CompositeMenuNode only updates a node's options via the nullish coalescing operator.
As a result, my submenus are not correctly updated if the configuration changes, as the icon option is never reset, even if the updated option object would set the iconClass explicitly to undefined.

I suggest to actually update the options as indicated in the function name, not only if the option values are nullish, do you agree?

ndoschek added a commit to eclipsesource/theia that referenced this issue Feb 27, 2024
- refactor updateOptions function to allow updates
- add a few test cases for updateOptions

Fixes eclipse-theia#12948
ndoschek added a commit to eclipsesource/theia that referenced this issue Feb 27, 2024
- refactor updateOptions function to allow updates
- add a unit test cases for updateOptions

Fixes eclipse-theia#12948
ndoschek added a commit to eclipsesource/theia that referenced this issue Feb 27, 2024
- refactor updateOptions function to allow updates
- add unit test cases for updateOptions

Fixes eclipse-theia#12948
ndoschek added a commit to eclipsesource/theia that referenced this issue Feb 28, 2024
- refactor updateOptions function to allow updates
- add unit test cases for updateOptions

Fixes eclipse-theia#12948
jonah-iden pushed a commit that referenced this issue Feb 28, 2024
- refactor updateOptions function to allow updates
- add unit test cases for updateOptions

Fixes #12948
@jfaltermeier jfaltermeier added this to the 1.47.0 milestone Feb 29, 2024
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 a pull request may close this issue.

2 participants