podman-desktop icon indicating copy to clipboard operation
podman-desktop copied to clipboard

Disable actions when deleting

Open trmendes opened this issue 1 year ago • 7 comments

What does this PR do?

To avoid user to perform any action on an object that is being deleted, this PR disables some actions buttons when user click on delete.

Screenshot / video of UI

https://github.com/containers/podman-desktop/assets/16507629/327419fb-e1c4-4e52-9526-fd586a5e61d2

What issues does this PR fix or reference?

Fixes #5739

How to test this PR?

Option 1) Unit Tests Option 2) Play around with creating and deleting. Expect buttons to be disabled.

trmendes avatar Jan 31 '24 12:01 trmendes

When I delete images and open the contextual menu on the image actions, I can see that some entries are still enabled (most probably entries added by extensions). Do you think it could be posisble to disable them, or disable the three dots instead?

feloy avatar Jan 31 '24 14:01 feloy

When I delete images and open the contextual menu on the image actions, I can see that some entries are still enabled (most probably entries added by extensions). Do you think it could be posisble to disable them, or disable the three dots instead?

Hi @feloy. I have noticed it too! Tomorrow I will try to check how to disable the entries added by extensions.

trmendes avatar Jan 31 '24 15:01 trmendes

I'm a little uneasy about this - for our own actions we're changing their enablement based on state, but for extensions we're just saying 'no you can't do that here'. I suppose it is ok for deletion b/c the object is going away anyway, but I worry it's removing the onus on extension developers to correctly enable their actions based on state (status in this case).

deboer-tim avatar Jan 31 '24 16:01 deboer-tim

I'm a little uneasy about this - for our own actions we're changing their enablement based on state, but for extensions we're just saying 'no you can't do that here'. I suppose it is ok for deletion b/c the object is going away anyway, but I worry it's removing the onus on extension developers to correctly enable their actions based on state (status in this case).

I agree with @deboer-tim .

What I have in mind for trying tomorrow is to have all other actions disabled for the deletion only.

trmendes avatar Jan 31 '24 18:01 trmendes

Hi @deboer-tim. Thanks for the hints. I wonder if I'm missing something.

trmendes avatar Feb 02 '24 12:02 trmendes

Hi @deboer-tim. Thanks for the hints. I wonder if I'm missing something.

@deboer-tim, @feloy: I'm leaving the 'disable menu' functionality for further discussions and, to another Issue/PR. What are your comments about?

The PR is open for another review :D.

I hope we are able to merge it soon.

trmendes avatar Feb 12 '24 10:02 trmendes

@feloy @deboer-tim looks like you didn't reply to @trmendes comments

switching to draft

benoitf avatar Mar 12 '24 17:03 benoitf

not updated, closing

benoitf avatar Aug 28 '24 12:08 benoitf