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
fix: rename variable to fix register tray item #1778
Conversation
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
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.
works as expected
do you think you could add a unit test ?
we're now trying to beg for unit tests upon bug fixes or new features
While I agree about unit tests, it might need a lot of additional mock to make this work now. Wonder if it is worth the roi at this time. May we park this for later (tech debt)? I'll let Yevhen decide on this. |
I add test, and also provide fix for deleting provider menu item. Could you review again? |
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.
just small typo on the date
We used to run a check for this on CI... which meant every 1st of Jan you would have failing builds and a big changeset with string replacements for the date ;-) |
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
253aba6
to
ca35150
Compare
What does this PR do?
It fix registration of provider tray menu, by properly sending
providerId
.And, also, fix deleting/removing provider menu item, as
Disposable
which created upon registration is not remove command from tray itself.As
TrayMenu
expects to receive object with fieldproviderId
, but we sendproviderName
.Screenshot/screencast of this PR
Without this fix, any tray provider menu item added in to
temp
sub menu:With this fix tray menu item adde to proper provider sub menu:
What issues does this PR fix or reference?
n/a
How to test this PR?
In your extension use
extensionApi.tray.registerProviderMenuItem
function to register command for your provider,ensure that your command is on proper sub menu of tray menu. (i.e. no under
temp
menu item)