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

feat: extend menus capabilities #3947

Merged
merged 9 commits into from Sep 19, 2023

Conversation

axel7083
Copy link
Contributor

@axel7083 axel7083 commented Sep 18, 2023

What does this PR do?

Thanks to @benoitf in #3938 (comment) I understood that it was possible to link a command to an item menu.

However, this features was only implemented for the Image List dashboard. I extended it to support the ContainersList dashboard as well.

Screenshot/screencast of this PR

image

Here is the contributes used to test this PR

...
  "contributes": {
    "commands": [
      {
        "command": "my.first.command",
        "title": "My First Extension: Hello World"
      }
    ],
    "menus": {
      "dashboard/container": [
        {
          "command": "my.first.command",
          "title": "My First Extension: Hello World"
        }
      ]
    }
  }
...

What issues does this PR fix or reference?

Partially fix #3938

How to test this PR?

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
@axel7083 axel7083 requested review from benoitf and a team as code owners September 18, 2023 10:57
@axel7083 axel7083 requested review from jeffmaury and cdrage and removed request for a team September 18, 2023 10:57
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.

thanks for the contrib

I think we're missing tests for

ContributionActions.svelte (to check if we're executing commands with correct args, how not-serializable args are filtered out)

Would be also nice for ContainerList

packages/renderer/src/lib/compose/ComposeActions.svelte Outdated Show resolved Hide resolved
packages/renderer/src/lib/ContainerList.svelte Outdated Show resolved Hide resolved
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
…rgs of ContributionActions

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
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.

it looks like there is a regression in one of the existing unit test

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
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 a couple of nits but thanks again @axel7083 for this nice enhancement 🎉

packages/renderer/src/lib/actions/ActionUtils.spec.ts Outdated Show resolved Hide resolved
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
@lstocchi lstocchi merged commit 96fdf98 into containers:main Sep 19, 2023
8 checks passed
@lstocchi
Copy link
Contributor

Thanks @axel7083 !! 🚀

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.

extensions: adding tabs/actions to containers list
4 participants