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

Disable actions when deleting is on process #5739

Open
trmendes opened this issue Jan 29, 2024 · 7 comments · May be fixed by #5775
Open

Disable actions when deleting is on process #5739

trmendes opened this issue Jan 29, 2024 · 7 comments · May be fixed by #5775
Assignees
Labels
area/dashboard 📊 Concern the dashboard from Container Desktop kind/enhancement ✨ Issue for requesting an improvement

Comments

@trmendes
Copy link
Contributor

Is your enhancement related to a problem? Please describe

When I click to delete an image and the deleting process starts, I notice that Podman-Dektop will gray out the delete button to avoid double click, but the action buttons are still clickable.

In that case if, I click on play button while an image is being deleted Podman-Desktop will take me to a blank screen.

delete_and_actions.mp4

Describe the solution you'd like

When I click to delete an image and the delete process starts, I would like to have all actions and buttons for that specific image to be disabled.

Describe alternatives you've considered

Can't think of any other alternative to the delete process but, I would love to get more ideas :)

Additional context

No response

@trmendes trmendes added the kind/enhancement ✨ Issue for requesting an improvement label Jan 29, 2024
@trmendes
Copy link
Contributor Author

If we all agree on making such changes, I would love to be signed to work in such issue.
Thanks

@benoitf benoitf added the area/dashboard 📊 Concern the dashboard from Container Desktop label Jan 29, 2024
@benoitf
Copy link
Collaborator

benoitf commented Jan 29, 2024

I'm fine, I think it's ok/good at short term

at mid-term/long term we should propagate the changes to the 'backend/model' that will be reflected to the client side because if you open the details view during that time you won't see any 'in-progress' action as suggested by @deboer-tim

@deboer-tim
Copy link
Collaborator

Yes. I think we use this issue to correct the individual action enablement within each view (i.e. start action is disabled when object is in 'deleting' state). If you delete and change views quickly then the actions may not be correct, but this would be fixed when we propagate status correctly.

@trmendes
Copy link
Contributor Author

I started to look into it today, and I have a few questions and a suggestion. I would like to hear from you :).

First, it is related to the status of an object.

I see we have status being propagated in many places, and the state is represented as a string with different values like: 'DELETING', 'RUNNING', 'STOPPING', etc.

I would like to suggest and hear your ideas and concerns on having it as an enum.

Such refactor would help us to avoid invalid states and misled flows caused by typos. It seems to be big refactor since the extension API also have status as a string and a refactor could break the current API compatibility.

@trmendes
Copy link
Contributor Author

@benoitf, @deboer-tim : After a quick try, it feels to me that I would like to know more about the mid-term/long-term approach to solve this issue. The one that propagate the changes to the 'backend/model' so the client side can make usage of such information in every component.

Could you please guide me on how to follow the code, so I can find and understand better/easily our server/client architecture?

I appreciate your help :)

@benoitf
Copy link
Collaborator

benoitf commented Jan 30, 2024

FYI @trmendes in typescript you can have custom enum with string

like status : 'DELETING' | 'STARTING' you see a string but you can only choose between 2 values

about backend/frontend model, it's just to have the state being shared between 2 views
but we still need the work to be done on each view.

We added such intermediate state to provide UI feedback but they don't exists on the underlying model (docker or podman engines)
but these intermediate states could be stored in the backend

and about 'backend/model/client' side question, basically instead of updating the state in the local copy of the view, it would update the state globally. so if you open both like 'container list view' and 'container's detail view' you'll get all intermediate steps.

@trmendes
Copy link
Contributor Author

FYI @trmendes in typescript you can have custom enum with string

like status : 'DELETING' | 'STARTING' you see a string but you can only choose between 2 values

about backend/frontend model, it's just to have the state being shared between 2 views but we still need the work to be done on each view.

We added such intermediate state to provide UI feedback but they don't exists on the underlying model (docker or podman engines) but these intermediate states could be stored in the backend

and about 'backend/model/client' side question, basically instead of updating the state in the local copy of the view, it would update the state globally. so if you open both like 'container list view' and 'container's detail view' you'll get all intermediate steps.

Thanks for the reply @benoitf :)

@trmendes trmendes linked a pull request Jan 31, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard 📊 Concern the dashboard from Container Desktop kind/enhancement ✨ Issue for requesting an improvement
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

3 participants