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: add generic action to task #6453

Merged
merged 3 commits into from Mar 20, 2024
Merged

feat: add generic action to task #6453

merged 3 commits into from Mar 20, 2024

Conversation

lstocchi
Copy link
Contributor

@lstocchi lstocchi commented Mar 18, 2024

What does this PR do?

It adds a new property to a task to implement a custom behavior like show an 'open folder' action.
This will be used with the export container action. When the export is executing/has been executed the user could open the taskmanager, click on the open folder link to open the directory where the container content will be saved

Screenshot / video of UI

N/A

What issues does this PR fix or reference?

it is part of #6355

How to test this PR?

  1. run test
  • Tests are covering the bug fix or the new feature

@lstocchi lstocchi marked this pull request as ready for review March 18, 2024 15:42
@lstocchi lstocchi requested review from benoitf and a team as code owners March 18, 2024 15:42
@lstocchi lstocchi requested review from dgolovin and jeffmaury and removed request for a team March 18, 2024 15:42
Signed-off-by: lstocchi <lstocchi@redhat.com>
Signed-off-by: lstocchi <lstocchi@redhat.com>
@deboer-tim
Copy link
Collaborator

I'm finding it hard to follow the comments and changes afterwards, but if this went from a 'folder URI' to a function -which could do anything - why keep the property named 'folder'? Wouldn't it make sense to allow things like 'open file' or 'open logs' as well? Maybe even 'open browser'? Those seem just as likely for other tasks, and would only require a label as well.

@lstocchi
Copy link
Contributor Author

lstocchi commented Mar 19, 2024

I'm finding it hard to follow the comments and changes afterwards, but if this went from a 'folder URI' to a function -which could do anything - why keep the property named 'folder'? Wouldn't it make sense to allow things like 'open file' or 'open logs' as well? Maybe even 'open browser'? Those seem just as likely for other tasks, and would only require a label as well.

It was always a function, the thing discussed was how to pass the info ( as a string or as a Uri) to the backend.
BTW yes, it could be used for anything. But the same for the goToTask.
So you would suggest to have something generic like action: { title, function }, so that the title is the text displayed and function is the one executed when clicking?

@deboer-tim
Copy link
Collaborator

I'm finding it hard to follow the comments and changes afterwards, but if this went from a 'folder URI' to a function -which could do anything - why keep the property named 'folder'? Wouldn't it make sense to allow things like 'open file' or 'open logs' as well? Maybe even 'open browser'? Those seem just as likely for other tasks, and would only require a label as well.

It was always a function, the thing discussed was how to pass the info ( as a string or as a Uri) to the backend. BTW yes, it could be used for anything. But the same for the goToTask. So you would suggest to have something generic like action: { title, function }, so that the title is the text displayed and function is the one executed when clicking?

Yes, I think that's what I'm suggesting. Maybe it is even worth replacing goToTask (not necessarily in this PR...) or allowing more than one. We should keep some consistency in the labels, but this gives any task a simple and generic way to link to relevant things, whether it's a status page, logs, a folder, help, etc.

Signed-off-by: lstocchi <lstocchi@redhat.com>
@lstocchi lstocchi requested a review from benoitf March 19, 2024 20:56
@lstocchi
Copy link
Contributor Author

@deboer-tim updated 👍

@lstocchi lstocchi changed the title feat: add open folder action to task feat: add generic action to task Mar 19, 2024
@deboer-tim
Copy link
Collaborator

Thanks for the change. 👍🏼

Copy link
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lstocchi lstocchi merged commit 31f446a into containers:main Mar 20, 2024
8 checks passed
@lstocchi lstocchi deleted the i6355_3 branch March 20, 2024 08:24
@podman-desktop-bot podman-desktop-bot added this to the 1.9.0 milestone Mar 20, 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 this pull request may close these issues.

None yet

5 participants