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

fix: rename variable to fix register tray item #1778

Merged
merged 2 commits into from Mar 23, 2023

Conversation

evidolob
Copy link
Contributor

@evidolob evidolob commented Mar 22, 2023

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 field providerId , but we send providerName.

Screenshot/screencast of this PR

Without this fix, any tray provider menu item added in to temp sub menu:
Screenshot 2023-03-22 at 15 01 12

With this fix tray menu item adde to proper provider sub menu:

Screenshot 2023-03-22 at 14 59 52

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)

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob requested review from a team and benoitf as code owners March 22, 2023 13:06
@evidolob evidolob requested review from jeffmaury and lstocchi and removed request for a team March 22, 2023 13:06
Copy link
Collaborator

@benoitf benoitf left a 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

@gbraad
Copy link
Member

gbraad commented Mar 22, 2023

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.

@evidolob evidolob requested a review from benoitf March 23, 2023 11:05
@evidolob
Copy link
Contributor Author

@benoitf

I add test, and also provide fix for deleting provider menu item.

Could you review again?

Copy link
Collaborator

@benoitf benoitf left a 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

@gbraad
Copy link
Member

gbraad commented Mar 23, 2023

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>
@evidolob evidolob merged commit e5d9766 into containers:main Mar 23, 2023
7 checks passed
@evidolob evidolob deleted the fix-register-tray-item branch March 23, 2023 12:46
@podman-desktop-bot podman-desktop-bot added this to the 0.13.0 milestone Mar 23, 2023
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

4 participants